summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn O. Pearce <sop@google.com>2009-04-21 08:26:32 -0700
committerShawn O. Pearce <sop@google.com>2009-04-21 08:28:06 -0700
commit05f66b6836ffa4a0a309a4909cb3f8c4a7351727 (patch)
tree9e12c76532af7eebe67d462d215740b5e2953d8c
parenteb7af87bcfc67798b58a99422988b9c368d7d642 (diff)
downloadgit-repo-05f66b6836ffa4a0a309a4909cb3f8c4a7351727.tar.gz
Fix 'repo sync' rebase logic on a published branchv1.6.7
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 <sop@google.com>
-rw-r--r--project.py9
1 files 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):
682 branch.name, 682 branch.name,
683 len(upstream_gain)) 683 len(upstream_gain))
684 return 684 return
685 elif upstream_gain: 685 elif pub == head:
686 # We can fast-forward safely. 686 # All published commits are merged, and thus we are a
687 # strict subset. We can fast-forward safely.
687 # 688 #
688 def _doff(): 689 def _doff():
689 self._FastForward(rev) 690 self._FastForward(rev)
690 self._CopyFiles() 691 self._CopyFiles()
691 syncbuf.later1(self, _doff) 692 syncbuf.later1(self, _doff)
692 return 693 return
693 else:
694 # Trivially no changes in the upstream.
695 #
696 return
697 694
698 if merge == rev: 695 if merge == rev:
699 try: 696 try: