summaryrefslogtreecommitdiffstats
path: root/manifest_xml.py
diff options
context:
space:
mode:
authorShawn O. Pearce <sop@google.com>2009-07-03 16:24:57 -0700
committerShawn O. Pearce <sop@google.com>2009-07-03 20:03:38 -0700
commit75b87c8a5171b26947d0a13d970f09defac736e3 (patch)
treeb8d3eb561b8faa2d3fc73e04d402128fdca1b8b3 /manifest_xml.py
parentabb7a3dfecdfe98b30594219f24c5c3d5e11e990 (diff)
downloadgit-repo-75b87c8a5171b26947d0a13d970f09defac736e3.tar.gz
Abstract manifest branch creation from init to the manifest object
This permits the XML style manifest to use 'default', while other types can use their own creation strategy for the current branch. Signed-off-by: Shawn O. Pearce <sop@google.com>
Diffstat (limited to 'manifest_xml.py')
-rw-r--r--manifest_xml.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/manifest_xml.py b/manifest_xml.py
index 66cdf3e3..45896be9 100644
--- a/manifest_xml.py
+++ b/manifest_xml.py
@@ -169,6 +169,12 @@ class XmlManifest(Manifest):
169 self._Load() 169 self._Load()
170 return self._default 170 return self._default
171 171
172 def InitBranch(self):
173 m = self.manifestProject
174 if m.CurrentBranch is None:
175 return m.StartBranch('default')
176 return True
177
172 def SetMRefs(self, project): 178 def SetMRefs(self, project):
173 if self.branch: 179 if self.branch:
174 project._InitAnyMRef(R_M + self.branch) 180 project._InitAnyMRef(R_M + self.branch)