summaryrefslogtreecommitdiffstats
path: root/manifest_xml.py
diff options
context:
space:
mode:
Diffstat (limited to 'manifest_xml.py')
-rw-r--r--manifest_xml.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/manifest_xml.py b/manifest_xml.py
index 86f20202..39656975 100644
--- a/manifest_xml.py
+++ b/manifest_xml.py
@@ -868,6 +868,7 @@ https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md
868 'project: %s' % name) 868 'project: %s' % name)
869 869
870 path = node.getAttribute('path') 870 path = node.getAttribute('path')
871 dest_path = node.getAttribute('dest-path')
871 groups = node.getAttribute('groups') 872 groups = node.getAttribute('groups')
872 if groups: 873 if groups:
873 groups = self._ParseList(groups) 874 groups = self._ParseList(groups)
@@ -876,6 +877,10 @@ https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md
876 if remote: 877 if remote:
877 remote = self._get_remote(node) 878 remote = self._get_remote(node)
878 879
880 named_projects = self._projects[name]
881 if dest_path and not path and len(named_projects) > 1:
882 raise ManifestParseError('extend-project cannot use dest-path when '
883 'matching multiple projects: %s' % name)
879 for p in self._projects[name]: 884 for p in self._projects[name]:
880 if path and p.relpath != path: 885 if path and p.relpath != path:
881 continue 886 continue
@@ -889,6 +894,12 @@ https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md
889 p.revisionId = None 894 p.revisionId = None
890 if remote: 895 if remote:
891 p.remote = remote.ToRemoteSpec(name) 896 p.remote = remote.ToRemoteSpec(name)
897 if dest_path:
898 del self._paths[p.relpath]
899 relpath, worktree, gitdir, objdir, _ = self.GetProjectPaths(name, dest_path)
900 p.UpdatePaths(relpath, worktree, gitdir, objdir)
901 self._paths[p.relpath] = p
902
892 if node.nodeName == 'repo-hooks': 903 if node.nodeName == 'repo-hooks':
893 # Only one project can be the hooks project 904 # Only one project can be the hooks project
894 if repo_hooks_project is not None: 905 if repo_hooks_project is not None: