Răsfoiți Sursa

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 <sop@google.com>
Shawn O. Pearce 17 ani în urmă
părinte
comite
521cd3ce67
1 a modificat fișierele cu 2 adăugiri și 1 ștergeri
  1. 2 1
      subcmds/init.py

+ 2 - 1
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: