From 05f66b6836ffa4a0a309a4909cb3f8c4a7351727 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Tue, 21 Apr 2009 08:26:32 -0700 Subject: Fix 'repo sync' rebase logic on a published branch If the current branch is published, but all published commits are merged into the manifest revision, but there is also at least one unpublished commit on the current branch, we should rebase the unpublished commit, rather than creating a merge commit. Signed-off-by: Shawn O. Pearce --- project.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/project.py b/project.py index 304480a8..adb72b27 100644 --- a/project.py +++ b/project.py @@ -682,18 +682,15 @@ class Project(object): branch.name, len(upstream_gain)) return - elif upstream_gain: - # We can fast-forward safely. + elif pub == head: + # All published commits are merged, and thus we are a + # strict subset. We can fast-forward safely. # def _doff(): self._FastForward(rev) self._CopyFiles() syncbuf.later1(self, _doff) return - else: - # Trivially no changes in the upstream. - # - return if merge == rev: try: -- cgit v1.2.3-54-g00ecf