manifest_xml: refactor manifest parsing from client management
We conflate the manifest & parsing logic with the management of the
repo client checkout in a single class. This makes testing just one
part (the manifest parsing) hard as it requires a full checkout too.
Start splitting the two apart into separate classes to make it easy
to reason about & test.
Change-Id: Iaf897c93db9c724baba6044bfe7a589c024523b2
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/288682
Reviewed-by: Michael Mortensen <mmortensen@google.com>
Tested-by: Mike Frysinger <vapier@google.com>
diff --git a/subcmds/help.py b/subcmds/help.py
index 1e16019..c219a76 100644
--- a/subcmds/help.py
+++ b/subcmds/help.py
@@ -65,7 +65,7 @@
def gitc_supported(cmd):
if not isinstance(cmd, GitcAvailableCommand) and not isinstance(cmd, GitcClientCommand):
return True
- if self.manifest.isGitcClient:
+ if self.client.isGitcClient:
return True
if isinstance(cmd, GitcClientCommand):
return False
@@ -127,7 +127,7 @@
self.wrap.end_paragraph(1)
self.wrap.end_paragraph(0)
- out = _Out(self.manifest.globalConfig)
+ out = _Out(self.client.globalConfig)
out._PrintSection('Summary', 'helpSummary')
cmd.OptionParser.print_help()
out._PrintSection('Description', 'helpDescription')