Pārlūkot izejas kodu

Do not change branch.foo.merge in case of manifest sync

In case of manifest/smart sync repo changes ".merge" config
option from branch to SHA. Doing 'repo upload' fails as
repo tries to upload to a remote branch that looks like SHA
(e.g. refs/for/23423423423423423423423)

Do not update the .merge in case if revision is SHA.

Change-Id: I9139708fa17f21eec5a7e23c3255333626bf529e
Anatol Pomazau 14 gadi atpakaļ
vecāks
revīzija
cd7c5deca0
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 3 1
      project.py

+ 3 - 1
project.py

@@ -1102,7 +1102,9 @@ class Project(object):
                    len(local_changes) - cnt_mine)
 
     branch.remote = self.GetRemote(self.remote.name)
-    branch.merge = self.revisionExpr
+    if not ID_RE.match(self.revisionExpr):
+      # in case of manifest sync the revisionExpr might be a SHA1
+      branch.merge = self.revisionExpr
     branch.Save()
 
     if cnt_mine > 0 and self.rebase: