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
This commit is contained in:
Anatol Pomazau 2012-03-20 13:45:00 -07:00 committed by Shawn O. Pearce
parent e02ac0af2e
commit cd7c5deca0

View File

@ -1102,7 +1102,9 @@ class Project(object):
len(local_changes) - cnt_mine) len(local_changes) - cnt_mine)
branch.remote = self.GetRemote(self.remote.name) 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() branch.Save()
if cnt_mine > 0 and self.rebase: if cnt_mine > 0 and self.rebase: