diff --git a/subcmds/manifest.py b/subcmds/manifest.py index 072c9ff..d9f242e 100644 --- a/subcmds/manifest.py +++ b/subcmds/manifest.py @@ -25,7 +25,7 @@ class Manifest(PagedCommand): common = False helpSummary = "Manifest inspection utility" helpUsage = """ -%prog [-o {-|NAME.xml} [-r]] +%prog [-o {-|NAME.xml}] [-m MANIFEST.xml] [-r] """ _helpDescription = """ @@ -50,6 +50,8 @@ in a Git repository for use during future 'repo init' invocations. p.add_option('-r', '--revision-as-HEAD', dest='peg_rev', action='store_true', help='Save revisions as current HEAD') + p.add_option('-m', '--manifest-name', + help='temporary manifest to use for this sync', metavar='NAME.xml') p.add_option('--suppress-upstream-revision', dest='peg_rev_upstream', default=True, action='store_false', help='If in -r mode, do not write the upstream field. ' @@ -62,6 +64,10 @@ in a Git repository for use during future 'repo init' invocations. metavar='-|NAME.xml') def _Output(self, opt): + # If alternate manifest is specified, override the manifest file that we're using. + if opt.manifest_name: + self.manifest.Override(opt.manifest_name, False) + if opt.output_file == '-': fd = sys.stdout else: