summaryrefslogtreecommitdiffstats
path: root/manifest_xml.py
diff options
context:
space:
mode:
authorDavid James <davidjames@google.com>2014-01-30 10:11:17 -0800
committerDavid James <davidjames@google.com>2014-01-30 10:14:54 -0800
commitb8433dfd2f078617b724e4dc4f709330cc90f1e7 (patch)
tree8fe84460fcde55ed6d37d54d3ffab3116263134b /manifest_xml.py
parentf2fe2d9b865f0122589d329d356644a80233c770 (diff)
downloadgit-repo-d902c888d65fd017def30f41b6a84632c4d5665a.tar.gz
repo: Fix 'remove-project' regression with multiple projects.v1.12.10
In CL:50715, I updated repo to handle multiple projects, but the remove-projects code path was not updated accordingly. Update it. Change-Id: Icd681d45ce857467b584bca0d2fdcbf24ec6e8db
Diffstat (limited to 'manifest_xml.py')
-rw-r--r--manifest_xml.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/manifest_xml.py b/manifest_xml.py
index c5f3bcc9..f2ac77a5 100644
--- a/manifest_xml.py
+++ b/manifest_xml.py
@@ -519,12 +519,15 @@ class XmlManifest(object):
519 self._repo_hooks_project.enabled_repo_hooks = enabled_repo_hooks 519 self._repo_hooks_project.enabled_repo_hooks = enabled_repo_hooks
520 if node.nodeName == 'remove-project': 520 if node.nodeName == 'remove-project':
521 name = self._reqatt(node, 'name') 521 name = self._reqatt(node, 'name')
522 try: 522
523 del self._projects[name] 523 if name not in self._projects:
524 except KeyError:
525 raise ManifestParseError('remove-project element specifies non-existent ' 524 raise ManifestParseError('remove-project element specifies non-existent '
526 'project: %s' % name) 525 'project: %s' % name)
527 526
527 for p in self._projects[name]:
528 del self._paths[p.relpath]
529 del self._projects[name]
530
528 # If the manifest removes the hooks project, treat it as if it deleted 531 # If the manifest removes the hooks project, treat it as if it deleted
529 # the repo-hooks element too. 532 # the repo-hooks element too.
530 if self._repo_hooks_project and (self._repo_hooks_project.name == name): 533 if self._repo_hooks_project and (self._repo_hooks_project.name == name):