summaryrefslogtreecommitdiffstats
path: root/subcmds/manifest.py
diff options
context:
space:
mode:
authorConley Owens <cco3@android.com>2012-10-03 16:49:12 -0700
committerGerrit Code Review <noreply-gerritcodereview@google.com>2012-10-03 16:49:12 -0700
commit3ff9decfd4e2f1fed71658d0f78a17895f80ff5f (patch)
tree5ecf68da509291eaf368772f3f5c3571060651a8 /subcmds/manifest.py
parent9779565abf06d2f1e48548197be350a06c1eab9b (diff)
parent14a6674e32b3000dbe8b7c96b0d1bb4fb0021720 (diff)
downloadgit-repo-3ff9decfd4e2f1fed71658d0f78a17895f80ff5f.tar.gz
Merge "manifest: record the original revision when in -r mode."
Diffstat (limited to 'subcmds/manifest.py')
-rw-r--r--subcmds/manifest.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/subcmds/manifest.py b/subcmds/manifest.py
index cd196531..43887654 100644
--- a/subcmds/manifest.py
+++ b/subcmds/manifest.py
@@ -48,6 +48,11 @@ in a Git repository for use during future 'repo init' invocations.
48 p.add_option('-r', '--revision-as-HEAD', 48 p.add_option('-r', '--revision-as-HEAD',
49 dest='peg_rev', action='store_true', 49 dest='peg_rev', action='store_true',
50 help='Save revisions as current HEAD') 50 help='Save revisions as current HEAD')
51 p.add_option('--suppress-upstream-revision', dest='peg_rev_upstream',
52 default=True, action='store_false',
53 help='If in -r mode, do not write the upstream field. '
54 'Only of use if the branch names for a sha1 manifest are '
55 'sensitive.')
51 p.add_option('-o', '--output-file', 56 p.add_option('-o', '--output-file',
52 dest='output_file', 57 dest='output_file',
53 default='-', 58 default='-',
@@ -60,7 +65,8 @@ in a Git repository for use during future 'repo init' invocations.
60 else: 65 else:
61 fd = open(opt.output_file, 'w') 66 fd = open(opt.output_file, 'w')
62 self.manifest.Save(fd, 67 self.manifest.Save(fd,
63 peg_rev = opt.peg_rev) 68 peg_rev = opt.peg_rev,
69 peg_rev_upstream = opt.peg_rev_upstream)
64 fd.close() 70 fd.close()
65 if opt.output_file != '-': 71 if opt.output_file != '-':
66 print >>sys.stderr, 'Saved manifest to %s' % opt.output_file 72 print >>sys.stderr, 'Saved manifest to %s' % opt.output_file