summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/manifest-format.txt16
-rw-r--r--manifest.py10
2 files changed, 26 insertions, 0 deletions
diff --git a/docs/manifest-format.txt b/docs/manifest-format.txt
index 5c014d6d..562e66e2 100644
--- a/docs/manifest-format.txt
+++ b/docs/manifest-format.txt
@@ -22,6 +22,7 @@ following DTD:
22<!DOCTYPE manifest [ 22<!DOCTYPE manifest [
23 <!ELEMENT manifest (remote*, 23 <!ELEMENT manifest (remote*,
24 default?, 24 default?,
25 remove-project*,
25 project*, 26 project*,
26 add-remote*)> 27 add-remote*)>
27 28
@@ -47,6 +48,9 @@ following DTD:
47 <!ATTLIST add-remote fetch CDATA #REQUIRED> 48 <!ATTLIST add-remote fetch CDATA #REQUIRED>
48 <!ATTLIST add-remote review CDATA #IMPLIED> 49 <!ATTLIST add-remote review CDATA #IMPLIED>
49 <!ATTLIST add-remote project-name CDATA #IMPLIED> 50 <!ATTLIST add-remote project-name CDATA #IMPLIED>
51
52 <!ELEMENT remove-project (EMPTY)>
53 <!ATTLIST remove-project name CDATA #REQUIRED>
50]> 54]>
51 55
52A description of the elements and their attributes follows. 56A description of the elements and their attributes follows.
@@ -155,6 +159,18 @@ the majority of the project's object database to be obtained through
155these additional remotes. 159these additional remotes.
156 160
157 161
162Element remove-project
163----------------------
164
165Deletes the named project from the internal manifest table, possibly
166allowing a subsequent project element in the same manifest file to
167replace the project with a different source.
168
169This element is mostly useful in the local_manifest.xml, where
170the user can remove a project, and possibly replace it with their
171own definition.
172
173
158Local Manifest 174Local Manifest
159============== 175==============
160 176
diff --git a/manifest.py b/manifest.py
index 9137371f..32a7e513 100644
--- a/manifest.py
+++ b/manifest.py
@@ -138,6 +138,16 @@ class Manifest(object):
138 self.manifestFile 138 self.manifestFile
139 139
140 for node in config.childNodes: 140 for node in config.childNodes:
141 if node.nodeName == 'remove-project':
142 name = self._reqatt(node, 'name')
143 try:
144 del self._projects[name]
145 except KeyError:
146 raise ManifestParseError, \
147 'project %s not found' % \
148 (name)
149
150 for node in config.childNodes:
141 if node.nodeName == 'remote': 151 if node.nodeName == 'remote':
142 remote = self._ParseRemote(node) 152 remote = self._ParseRemote(node)
143 if self._remotes.get(remote.name): 153 if self._remotes.get(remote.name):