remote-hg: try the 'tip' if no checkout present
authorFelipe Contreras <felipe.contreras@gmail.com>
Mon, 12 Nov 2012 17:41:07 +0000 (18:41 +0100)
committerJeff King <peff@peff.net>
Mon, 12 Nov 2012 20:34:53 +0000 (15:34 -0500)
There's no concept of HEAD in mercurial, but let's try our best to do
something sensible.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
contrib/remote-helpers/git-remote-hg

index bf5e5b473d39f95d0cfb7a42aacdcd2761d59734..a9a1e8fa584e981db5cdb9ea201dbea70f97127d 100755 (executable)
@@ -439,6 +439,8 @@ def list_head(repo, cur):
         # fake bookmark from current branch
         head = cur
         node = repo['.']
+        if not node:
+            node = repo['tip']
         if not node:
             return
         if head == 'default':