From 5f947bba69de81f58f1adef10225c04727fa0ed5 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Fri, 3 Jul 2009 17:24:17 -0700 Subject: 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 --- manifest_xml.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'manifest_xml.py') 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): def _Load(self): if not self._loaded: m = self.manifestProject - b = m.GetBranch(m.CurrentBranch).merge + b = m.GetBranch(m.CurrentBranch) + if b.remote and b.remote.name: + m.remote.name = b.remote.name + b = b.merge if b is not None and b.startswith(R_HEADS): b = b[len(R_HEADS):] self.branch = b -- cgit v1.2.3-54-g00ecf