使用repo sync时,如果当前仓库有检出本地分支,假设为dev, 对应的远程track分支为origin/dev。 而manifest.xml中指定的track分支为origin/master,那么在repo sync时会自动将当前的dev分支的远程track分支修改为origin/master, 不仅如此,同时还会将origin/master上的修改rebase到本地的这个dev分支上。
projectA/: manifest switched refs/heads/dev...master project projectA/ First, rewinding head to replay your work on top of it... Applying: y
diff --git a/project.py b/project.py index 22e4a5d..3ce6500 100644 --- a/project.py +++ b/project.py @@ -1169,6 +1169,8 @@ class Project(object): syncbuf.info(self, 'manifest no longer tracks %s', branch.merge) + syncbuf.fail(self, "branch is not consistent:%s, %s" %(branch.merge, self.revisionExpr)) + return if cnt_mine < len(local_changes): # Upstream rebased. Not everything in HEAD
repo sync 时自动切换当前分支的remote track分支的问题
原文地址:http://blog.csdn.net/crylearner/article/details/38072373