hgext/convert/git.py
changeset 12144 be9c4131a8f4
parent 11134 33010ff1fd6f
child 13756 6b7077df4aa5
--- a/hgext/convert/git.py	Thu Sep 02 11:20:23 2010 +0200
+++ b/hgext/convert/git.py	Thu Sep 02 12:08:13 2010 +0200
@@ -7,6 +7,7 @@
 
 import os
 from mercurial import util
+from mercurial.node import hex, nullid
 from mercurial.i18n import _
 
 from common import NoRepo, commit, converter_source, checktool
@@ -59,7 +60,7 @@
         return heads
 
     def catfile(self, rev, type):
-        if rev == "0" * 40:
+        if rev == hex(nullid):
             raise IOError()
         data, ret = self.gitread("git cat-file %s %s" % (type, rev))
         if ret: