summaryrefslogtreecommitdiffstats
path: root/subcmds/download.py
diff options
context:
space:
mode:
authorPierre Tardy <pierre.tardy@intel.com>2012-05-04 12:18:12 +0200
committerShawn O. Pearce <sop@google.com>2012-05-24 09:04:20 -0700
commit3d125940f6223efe62e35b795f57e7e717b4528e (patch)
tree518bdd11c5cd3e5f57afdf16a3e1fe3ec1df8370 /subcmds/download.py
parenta94f162b9fe85389f3e1c9555628d9229105e15d (diff)
downloadgit-repo-3d125940f6223efe62e35b795f57e7e717b4528e.tar.gz
repo download: add --ff-only option
Allows to ff-only a gerrit patch This patch is necessary to automatically ensure that the patch will be correctly submitted on ff-only gerrit projects You can now use: repo download (--ff-only|-f) project changeid/patchnumber This is useful to automate verification of fast forward status of a patch in the context of build automation, and commit gating (e.g. buildbot) Change-Id: I403a667557a105411a633e62c8eec23d93724b43 Signed-off-by: Erwan Mahe <erwan.mahe@intel.com> Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
Diffstat (limited to 'subcmds/download.py')
-rw-r--r--subcmds/download.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/subcmds/download.py b/subcmds/download.py
index f79f485b..0ea45c3f 100644
--- a/subcmds/download.py
+++ b/subcmds/download.py
@@ -39,6 +39,9 @@ makes it available in your project's local working directory.
39 p.add_option('-r','--revert', 39 p.add_option('-r','--revert',
40 dest='revert', action='store_true', 40 dest='revert', action='store_true',
41 help="revert instead of checkout") 41 help="revert instead of checkout")
42 p.add_option('-f','--ff-only',
43 dest='ffonly', action='store_true',
44 help="force fast-forward merge")
42 45
43 def _ParseChangeIds(self, args): 46 def _ParseChangeIds(self, args):
44 if not args: 47 if not args:
@@ -87,5 +90,7 @@ makes it available in your project's local working directory.
87 project._CherryPick(dl.commit) 90 project._CherryPick(dl.commit)
88 elif opt.revert: 91 elif opt.revert:
89 project._Revert(dl.commit) 92 project._Revert(dl.commit)
93 elif opt.ffonly:
94 project._FastForward(dl.commit, ffonly=True)
90 else: 95 else:
91 project._Checkout(dl.commit) 96 project._Checkout(dl.commit)