diff options
author | Pierre Tardy <pierre.tardy@intel.com> | 2012-05-04 12:18:12 +0200 |
---|---|---|
committer | Shawn O. Pearce <sop@google.com> | 2012-05-24 09:04:20 -0700 |
commit | 3d125940f6223efe62e35b795f57e7e717b4528e (patch) | |
tree | 518bdd11c5cd3e5f57afdf16a3e1fe3ec1df8370 /project.py | |
parent | a94f162b9fe85389f3e1c9555628d9229105e15d (diff) | |
download | git-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 'project.py')
-rw-r--r-- | project.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1670,8 +1670,10 @@ class Project(object): | |||
1670 | if GitCommand(self, cmd).Wait() != 0: | 1670 | if GitCommand(self, cmd).Wait() != 0: |
1671 | raise GitError('%s rebase %s ' % (self.name, upstream)) | 1671 | raise GitError('%s rebase %s ' % (self.name, upstream)) |
1672 | 1672 | ||
1673 | def _FastForward(self, head): | 1673 | def _FastForward(self, head, ffonly=False): |
1674 | cmd = ['merge', head] | 1674 | cmd = ['merge', head] |
1675 | if ffonly: | ||
1676 | cmd.append("--ff-only") | ||
1675 | if GitCommand(self, cmd).Wait() != 0: | 1677 | if GitCommand(self, cmd).Wait() != 0: |
1676 | raise GitError('%s merge %s ' % (self.name, head)) | 1678 | raise GitError('%s merge %s ' % (self.name, head)) |
1677 | 1679 | ||