[PATCH 3/4] remote-hg: try the 'tip' if no checkout present

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 contrib/remote-helpers/git-remote-hg | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg
index c6d0367..3cdc1e2 100755
--- a/contrib/remote-helpers/git-remote-hg
+++ b/contrib/remote-helpers/git-remote-hg
@@ -440,6 +440,8 @@ def list_head(repo, cur):
         head = cur
         node = repo['.']
         if not node:
+            node = repo['tip']
+        if not node:
             return
         if head == 'default':
             head = 'master'
-- 
1.8.0

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]