From bd0aae95f56d46cef665e11f2ee88581b88fcfce Mon Sep 17 00:00:00 2001 From: Kyunam Jo Date: Tue, 4 Feb 2020 11:38:53 +0900 Subject: Add a way to override the remote using This commit supports for the 'remote' attribute in . This avoids the need to perform a followed by a in local manifests. Change-Id: I9f9347913337ec9d159bc264d15ce97881ae5398 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/253092 Tested-by: Kyunam Jo Reviewed-by: Mike Frysinger --- manifest_xml.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'manifest_xml.py') diff --git a/manifest_xml.py b/manifest_xml.py index 4f7bd498..035cc61b 100644 --- a/manifest_xml.py +++ b/manifest_xml.py @@ -599,6 +599,9 @@ class XmlManifest(object): if groups: groups = self._ParseGroups(groups) revision = node.getAttribute('revision') + remote = node.getAttribute('remote') + if remote: + remote = self._get_remote(node) for p in self._projects[name]: if path and p.relpath != path: @@ -607,6 +610,8 @@ class XmlManifest(object): p.groups.extend(groups) if revision: p.revisionExpr = revision + if remote: + p.remote = remote.ToRemoteSpec(name) if node.nodeName == 'repo-hooks': # Get the name of the project and the (space-separated) list of enabled. repo_hooks_project = self._reqatt(node, 'in-project') -- cgit v1.2.3-54-g00ecf