Mercurial > hg-git
diff hggit/git_handler.py @ 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 | f55869b556f0 |
children | 154334e1e7e0 |
line wrap: on
line diff
--- a/hggit/git_handler.py Tue Apr 05 13:31:28 2011 +0200 +++ b/hggit/git_handler.py Tue May 10 21:13:18 2011 -0700 @@ -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"))