changeset 384:fc37cb795b51

activate a tipmost bookmark (git branch) after clone
author Adrian Sampson <adrian@radbox.org>
date Tue, 10 May 2011 21:13:18 -0700
parents 61865ad88740
children 154334e1e7e0
files hggit/git_handler.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hggit/git_handler.py
+++ b/hggit/git_handler.py
@@ -110,6 +110,11 @@
             elif not self.paths:
                 # intial cloning
                 self.update_remote_branches('default', refs)
+                
+                # "Activate" a tipmost bookmark.
+                bms = self.repo['tip'].bookmarks()
+                if bms:
+                    bookmarks.setcurrent(self.repo, bms[0])
         else:
             self.ui.status(_("nothing new on the server\n"))