From 26f77e0ee43213d37ee839c2ff80e2af44a251b7 Mon Sep 17 00:00:00 2001 From: Adam Waldenberg Date: Tue, 3 Nov 2015 23:00:17 +0100 Subject: [PATCH] The XML output now prints repositories in a proper XML list. If one repository is found, the following format is used: name If multiple repositories are found, the following format is used: name name ... --- gitinspector/format.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gitinspector/format.py b/gitinspector/format.py index 92c221c..ef751be 100644 --- a/gitinspector/format.py +++ b/gitinspector/format.py @@ -122,7 +122,17 @@ def output_header(repos): elif __selected_format__ == "xml": print("") print("\t" + version.__version__ + "") - print("\t" + repos_string + "") + + if len(repos) <= 1: + print("\t" + repos_string + "") + else: + print("\t") + + for repo in repos: + print("\t\t" + repo.name + "") + + print("\t") + print("\t" + time.strftime("%Y/%m/%d") + "") else: print(textwrap.fill(_(INFO_ONE_REPOSITORY if len(repos) <= 1 else INFO_MANY_REPOSITORIES).format(