diff options
Diffstat (limited to 'project.py')
-rw-r--r-- | project.py | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1535,6 +1535,7 @@ class Project: | |||
1535 | syncbuf, | 1535 | syncbuf, |
1536 | force_sync=False, | 1536 | force_sync=False, |
1537 | force_checkout=False, | 1537 | force_checkout=False, |
1538 | force_rebase=False, | ||
1538 | submodules=False, | 1539 | submodules=False, |
1539 | errors=None, | 1540 | errors=None, |
1540 | verbose=False, | 1541 | verbose=False, |
@@ -1680,14 +1681,15 @@ class Project: | |||
1680 | if pub: | 1681 | if pub: |
1681 | not_merged = self._revlist(not_rev(revid), pub) | 1682 | not_merged = self._revlist(not_rev(revid), pub) |
1682 | if not_merged: | 1683 | if not_merged: |
1683 | if upstream_gain: | 1684 | if upstream_gain and not force_rebase: |
1684 | # The user has published this branch and some of those | 1685 | # The user has published this branch and some of those |
1685 | # commits are not yet merged upstream. We do not want | 1686 | # commits are not yet merged upstream. We do not want |
1686 | # to rewrite the published commits so we punt. | 1687 | # to rewrite the published commits so we punt. |
1687 | fail( | 1688 | fail( |
1688 | LocalSyncFail( | 1689 | LocalSyncFail( |
1689 | "branch %s is published (but not merged) and is " | 1690 | "branch %s is published (but not merged) and is " |
1690 | "now %d commits behind" | 1691 | "now %d commits behind. Fix this manually or rerun " |
1692 | "with the --rebase option to force a rebase." | ||
1691 | % (branch.name, len(upstream_gain)), | 1693 | % (branch.name, len(upstream_gain)), |
1692 | project=self.name, | 1694 | project=self.name, |
1693 | ) | 1695 | ) |