summaryrefslogtreecommitdiffstats
path: root/manifest_xml.py
diff options
context:
space:
mode:
authorShawn O. Pearce <sop@google.com>2009-07-03 15:29:02 -0700
committerShawn O. Pearce <sop@google.com>2009-07-03 20:03:38 -0700
commitcc6c79643e1cafad565424caabe581e7b548bf6f (patch)
tree29fe305852e0488f54548e1d2a9d3e39f8d39f85 /manifest_xml.py
parent2095179beec754d2d5bfe175215e736b7ff838e9 (diff)
downloadgit-repo-cc6c79643e1cafad565424caabe581e7b548bf6f.tar.gz
Make refs/remotes/m management the manifest object's responsibility
I plan to have the new submodule manifest format use a different layout for the m refs than the XML manifest format has used in the past. Thus we need to move the behavior management into the manifest object, and out of the project, so we can change it. Signed-off-by: Shawn O. Pearce <sop@google.com>
Diffstat (limited to 'manifest_xml.py')
-rw-r--r--manifest_xml.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/manifest_xml.py b/manifest_xml.py
index 97df75bd..66cdf3e3 100644
--- a/manifest_xml.py
+++ b/manifest_xml.py
@@ -29,6 +29,7 @@ from error import ManifestParseError
29 29
30MANIFEST_FILE_NAME = 'manifest.xml' 30MANIFEST_FILE_NAME = 'manifest.xml'
31LOCAL_MANIFEST_NAME = 'local_manifest.xml' 31LOCAL_MANIFEST_NAME = 'local_manifest.xml'
32R_M = 'refs/remotes/m/'
32 33
33class _Default(object): 34class _Default(object):
34 """Project defaults within the manifest.""" 35 """Project defaults within the manifest."""
@@ -168,6 +169,10 @@ class XmlManifest(Manifest):
168 self._Load() 169 self._Load()
169 return self._default 170 return self._default
170 171
172 def SetMRefs(self, project):
173 if self.branch:
174 project._InitAnyMRef(R_M + self.branch)
175
171 def _Unload(self): 176 def _Unload(self):
172 self._loaded = False 177 self._loaded = False
173 self._projects = {} 178 self._projects = {}