hg2git.py: Map 'HEAD', 'default' and '' hg branches to 'master' in git
authorRocco Rutte <pdmef@gmx.net>
Mon, 22 Oct 2007 07:44:12 +0000 (09:44 +0200)
committerRocco Rutte <pdmef@gmx.net>
Mon, 22 Oct 2007 07:44:12 +0000 (09:44 +0200)
Also add a note where HEAD is comming from.

Signed-off-by: Rocco Rutte <pdmef@gmx.net>
hg2git.py

index 1f631e7254256d3652e89cf22c46126b4abd966e..aa6ad700440b344ea944c3fd9a68b982a8486508 100755 (executable)
--- a/hg2git.py
+++ b/hg2git.py
@@ -44,7 +44,8 @@ def fixup_user(user,authors):
   return '%s %s' % (name,mail)
 
 def get_branch(name):
-  if name=='HEAD':
+  # HEAD may be from CVS imports into hg
+  if name=='HEAD' or name=='default' or name=='':
     name=cfg_master
   return name