diff options
author | Shawn O. Pearce <sop@google.com> | 2009-07-03 17:24:17 -0700 |
---|---|---|
committer | Shawn O. Pearce <sop@google.com> | 2009-07-03 20:50:52 -0700 |
commit | 5f947bba69de81f58f1adef10225c04727fa0ed5 (patch) | |
tree | 96da97d3e570c4b2238c807700060c144b333d09 /manifest_xml.py | |
parent | b3d2c9214be60f575d64b3af3b87a3632de04ba0 (diff) | |
download | git-repo-5f947bba69de81f58f1adef10225c04727fa0ed5.tar.gz |
init: add -o, --origin to name manifest remote
The -o option permits the user to control the name of the manifest's
remote, which normally is hardcoded to be 'origin', but can differ
because we derive it at runtime from the configuration file.
Signed-off-by: Shawn O. Pearce <sop@google.com>
Diffstat (limited to 'manifest_xml.py')
-rw-r--r-- | manifest_xml.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/manifest_xml.py b/manifest_xml.py index 45896be9..d888653d 100644 --- a/manifest_xml.py +++ b/manifest_xml.py | |||
@@ -189,7 +189,10 @@ class XmlManifest(Manifest): | |||
189 | def _Load(self): | 189 | def _Load(self): |
190 | if not self._loaded: | 190 | if not self._loaded: |
191 | m = self.manifestProject | 191 | m = self.manifestProject |
192 | b = m.GetBranch(m.CurrentBranch).merge | 192 | b = m.GetBranch(m.CurrentBranch) |
193 | if b.remote and b.remote.name: | ||
194 | m.remote.name = b.remote.name | ||
195 | b = b.merge | ||
193 | if b is not None and b.startswith(R_HEADS): | 196 | if b is not None and b.startswith(R_HEADS): |
194 | b = b[len(R_HEADS):] | 197 | b = b[len(R_HEADS):] |
195 | self.branch = b | 198 | self.branch = b |