From 2f3c3316e497faafa1e6f3e9cb40828d0eeb9812 Mon Sep 17 00:00:00 2001 From: Michael Kelly Date: Tue, 21 Jul 2020 19:40:38 -0700 Subject: Update revisionId if required when using extend-project When a hard revision ID is provided in a regular project tag then the revisionId is updated as well if it is a commit hash. The difference is that if the revisionExpr is a commit, git-repo needs to update refs/remotes/m/master with update-ref not symbolic-ref, as the latter must refer to another ref, not to a specific commit. Change-Id: I215a62dabb30225e480ad2c731416d775fc0c750 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/310963 Tested-by: Michael Kelly Reviewed-by: Mike Frysinger --- manifest_xml.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'manifest_xml.py') diff --git a/manifest_xml.py b/manifest_xml.py index 39656975..68ead53c 100644 --- a/manifest_xml.py +++ b/manifest_xml.py @@ -887,13 +887,11 @@ https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md if groups: p.groups.extend(groups) if revision: - p.revisionExpr = revision - if IsId(revision): - p.revisionId = revision - else: - p.revisionId = None + p.SetRevision(revision) + if remote: p.remote = remote.ToRemoteSpec(name) + if dest_path: del self._paths[p.relpath] relpath, worktree, gitdir, objdir, _ = self.GetProjectPaths(name, dest_path) -- cgit v1.2.3-54-g00ecf