summaryrefslogtreecommitdiffstats
path: root/manifest.py
diff options
context:
space:
mode:
authorShawn O. Pearce <sop@google.com>2008-11-04 08:22:07 -0800
committerShawn O. Pearce <sop@google.com>2008-11-04 09:45:59 -0800
commit2450a2987afcf3d01a4d43fffe590b02880d9aa7 (patch)
treeadcfcf649c387da978bc1ddf22f0883ce984c679 /manifest.py
parentf5c25a68d832f7eed55f939f97098071b20f753a (diff)
downloadgit-repo-2450a2987afcf3d01a4d43fffe590b02880d9aa7.tar.gz
Assume the manifest branch matches the branch name in Git
Whatever branch name we checked the manifest out from is the name we want to reflect throughout the rest of the projects, e.g. within the special "m/" remote space. This reduces the difference between different branches within the manifest file. Signed-off-by: Shawn O. Pearce <sop@google.com>
Diffstat (limited to 'manifest.py')
-rw-r--r--manifest.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/manifest.py b/manifest.py
index 3d5e092c..b928cdfe 100644
--- a/manifest.py
+++ b/manifest.py
@@ -18,7 +18,7 @@ import sys
18import xml.dom.minidom 18import xml.dom.minidom
19 19
20from git_config import GitConfig, IsId 20from git_config import GitConfig, IsId
21from project import Project, MetaProject, R_TAGS 21from project import Project, MetaProject, R_HEADS
22from remote import Remote 22from remote import Remote
23from error import ManifestParseError 23from error import ManifestParseError
24 24
@@ -97,6 +97,12 @@ class Manifest(object):
97 97
98 def _Load(self): 98 def _Load(self):
99 if not self._loaded: 99 if not self._loaded:
100 m = self.manifestProject
101 b = m.GetBranch(m.CurrentBranch).merge
102 if b.startswith(R_HEADS):
103 b = b[len(R_HEADS):]
104 self.branch = b
105
100 self._ParseManifest(True) 106 self._ParseManifest(True)
101 107
102 local = os.path.join(self.repodir, LOCAL_MANIFEST_NAME) 108 local = os.path.join(self.repodir, LOCAL_MANIFEST_NAME)
@@ -123,11 +129,6 @@ class Manifest(object):
123 "no <manifest> in %s" % \ 129 "no <manifest> in %s" % \
124 self.manifestFile 130 self.manifestFile
125 131
126 if is_root_file:
127 self.branch = config.getAttribute('branch')
128 if not self.branch:
129 self.branch = 'default'
130
131 for node in config.childNodes: 132 for node in config.childNodes:
132 if node.nodeName == 'remote': 133 if node.nodeName == 'remote':
133 remote = self._ParseRemote(node) 134 remote = self._ParseRemote(node)