diff options
| -rw-r--r-- | project.py | 4 | ||||
| -rw-r--r-- | subcmds/download.py | 5 |
2 files changed, 8 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 | ||
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) |
