diff --git a/docs/manifest-format.md b/docs/manifest-format.md index a39f97e80c405890435e010263c271c1f007e862..b439dcb7ba2728c16ce6077cc7371e6269d8040c 100644 --- a/docs/manifest-format.md +++ b/docs/manifest-format.md @@ -89,6 +89,7 @@ following DTD: <!ATTLIST extend-project path CDATA #IMPLIED> <!ATTLIST extend-project groups CDATA #IMPLIED> <!ATTLIST extend-project revision CDATA #IMPLIED> + <!ATTLIST extend-project remote CDATA #IMPLIED> <!ELEMENT remove-project EMPTY> <!ATTLIST remove-project name CDATA #REQUIRED> @@ -306,6 +307,9 @@ belongs. Same syntax as the corresponding element of `project`. Attribute `revision`: If specified, overrides the revision of the original project. Same syntax as the corresponding element of `project`. +Attribute `remote`: If specified, overrides the remote of the original +project. Same syntax as the corresponding element of `project`. + ### Element annotation Zero or more annotation elements may be specified as children of a diff --git a/manifest_xml.py b/manifest_xml.py index 4f7bd49850b1c670114f98c98e27e7415faea8f7..035cc61b1db36efe0518d2bc1142463cd06c4bee 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')