aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Gaio <miguel.gaio@renault.com>2020-07-17 14:09:13 +0200
committerMike Frysinger <vapier@google.com>2020-11-12 09:00:08 +0000
commit1f20776dbb3b87ba39928dc4baba58f9c2d17c80 (patch)
tree5a5e1711ae9b00d0fc935a3e6b6bfa12c3b11d4f
parent16c1328fecdbd950bb4f2c24f9c49a8ed0992c50 (diff)
downloadrepo-1f20776dbb3b87ba39928dc4baba58f9c2d17c80.tar.gz
manifest_xml: correct project revisionId for extend-project
Using sha1 manifest, project's revisionId is initialized first by the manifest. An update of a projet revision by extend-project node does not apply to the revisionId which is therefore kept to the initial value. Resets revisionId value when revision is updated by an extend-project node. Change-Id: I873af283890cebaeaabde966f04b125642af929f Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/275715 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Miguel Gaio <miguel.gaio@renault.com>
-rw-r--r--manifest_xml.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/manifest_xml.py b/manifest_xml.py
index f2d04df..bf730ca 100644
--- a/manifest_xml.py
+++ b/manifest_xml.py
@@ -31,7 +31,7 @@ else:
urllib.parse = urlparse
import gitc_utils
-from git_config import GitConfig
+from git_config import GitConfig, IsId
from git_refs import R_HEADS, HEAD
import platform_utils
from project import RemoteSpec, Project, MetaProject
@@ -705,6 +705,10 @@ https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md
p.groups.extend(groups)
if revision:
p.revisionExpr = revision
+ if IsId(revision):
+ p.revisionId = revision
+ else:
+ p.revisionId = None
if remote:
p.remote = remote.ToRemoteSpec(name)
if node.nodeName == 'repo-hooks':