From 521cd3ce67a3621dbbad906f8402dbde8a1e9e63 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Mon, 9 Mar 2009 18:53:20 -0700 Subject: [PATCH] Support "repo init -b foo && repo sync" to switch baselines We now correctly support re-initializing an existing client to point to a different branch of the same manifest repository, effectively allowing the client to switch the baseline it is operating on. Signed-off-by: Shawn O. Pearce --- subcmds/init.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subcmds/init.py b/subcmds/init.py index 4f994300..937296bb 100644 --- a/subcmds/init.py +++ b/subcmds/init.py @@ -126,7 +126,8 @@ default.xml will be used. m.Sync_NetworkHalf() m.Sync_LocalHalf() - m.StartBranch('default') + if is_new: + m.StartBranch('default') def _LinkManifest(self, name): if not name: