diff options
| -rw-r--r-- | manifest_xml.py | 7 | ||||
| -rw-r--r-- | subcmds/manifest.py | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/manifest_xml.py b/manifest_xml.py index be74bf49..22758cfd 100644 --- a/manifest_xml.py +++ b/manifest_xml.py | |||
| @@ -626,6 +626,13 @@ https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md | |||
| 626 | return set(x.strip() for x in exclude.split(',')) | 626 | return set(x.strip() for x in exclude.split(',')) |
| 627 | 627 | ||
| 628 | @property | 628 | @property |
| 629 | def UseLocalManifests(self): | ||
| 630 | return self._load_local_manifests | ||
| 631 | |||
| 632 | def SetUseLocalManifests(self, value): | ||
| 633 | self._load_local_manifests = value | ||
| 634 | |||
| 635 | @property | ||
| 629 | def HasLocalManifests(self): | 636 | def HasLocalManifests(self): |
| 630 | return self._load_local_manifests and self.local_manifests | 637 | return self._load_local_manifests and self.local_manifests |
| 631 | 638 | ||
diff --git a/subcmds/manifest.py b/subcmds/manifest.py index 00587d8d..0fbdeac0 100644 --- a/subcmds/manifest.py +++ b/subcmds/manifest.py | |||
| @@ -70,6 +70,8 @@ to indicate the remote ref to push changes to via 'repo upload'. | |||
| 70 | help='output manifest in JSON format (experimental)') | 70 | help='output manifest in JSON format (experimental)') |
| 71 | p.add_option('--pretty', default=False, action='store_true', | 71 | p.add_option('--pretty', default=False, action='store_true', |
| 72 | help='format output for humans to read') | 72 | help='format output for humans to read') |
| 73 | p.add_option('--no-local-manifests', default=False, action='store_true', | ||
| 74 | dest='ignore_local_manifests', help='ignore local manifests') | ||
| 73 | p.add_option('-o', '--output-file', | 75 | p.add_option('-o', '--output-file', |
| 74 | dest='output_file', | 76 | dest='output_file', |
| 75 | default='-', | 77 | default='-', |
| @@ -85,6 +87,9 @@ to indicate the remote ref to push changes to via 'repo upload'. | |||
| 85 | fd = sys.stdout | 87 | fd = sys.stdout |
| 86 | else: | 88 | else: |
| 87 | fd = open(opt.output_file, 'w') | 89 | fd = open(opt.output_file, 'w') |
| 90 | |||
| 91 | self.manifest.SetUseLocalManifests(not opt.ignore_local_manifests) | ||
| 92 | |||
| 88 | if opt.json: | 93 | if opt.json: |
| 89 | print('warning: --json is experimental!', file=sys.stderr) | 94 | print('warning: --json is experimental!', file=sys.stderr) |
| 90 | doc = self.manifest.ToDict(peg_rev=opt.peg_rev, | 95 | doc = self.manifest.ToDict(peg_rev=opt.peg_rev, |
