summaryrefslogtreecommitdiffstats
path: root/manifest_xml.py
diff options
context:
space:
mode:
authorLuis Hector Chavez <lhchavez@google.com>2018-03-15 09:54:08 -0700
committerLuis Hector Chavez <lhchavez@google.com>2018-03-15 09:55:54 -0700
commit7d52585ec4719ce0314c6d1a20216fc0128d6883 (patch)
tree1356e1f9d4b6846cabee9400ca1cf7fedb73c94a /manifest_xml.py
parent1f365701b32fbf657fc8277d1fee3656f2501383 (diff)
downloadgit-repo-7d52585ec4719ce0314c6d1a20216fc0128d6883.tar.gz
Add a way to override the revision of an <extend-project>
This change adds support for the 'revision' attribute in <extend-project>. This avoids the need to perform a <remove-project> followed by a <project> in local manifests. Change-Id: Id2834fcfc1ae0d74b3347bed3618f250bf696b1f
Diffstat (limited to 'manifest_xml.py')
-rw-r--r--manifest_xml.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/manifest_xml.py b/manifest_xml.py
index 0654222e..60d61168 100644
--- a/manifest_xml.py
+++ b/manifest_xml.py
@@ -571,12 +571,15 @@ class XmlManifest(object):
571 groups = node.getAttribute('groups') 571 groups = node.getAttribute('groups')
572 if groups: 572 if groups:
573 groups = self._ParseGroups(groups) 573 groups = self._ParseGroups(groups)
574 revision = node.getAttribute('revision')
574 575
575 for p in self._projects[name]: 576 for p in self._projects[name]:
576 if path and p.relpath != path: 577 if path and p.relpath != path:
577 continue 578 continue
578 if groups: 579 if groups:
579 p.groups.extend(groups) 580 p.groups.extend(groups)
581 if revision:
582 p.revisionExpr = revision
580 if node.nodeName == 'repo-hooks': 583 if node.nodeName == 'repo-hooks':
581 # Get the name of the project and the (space-separated) list of enabled. 584 # Get the name of the project and the (space-separated) list of enabled.
582 repo_hooks_project = self._reqatt(node, 'in-project') 585 repo_hooks_project = self._reqatt(node, 'in-project')