Mercurial > public > mercurial-scm > hg
diff hgext/convert/git.py @ 12144:be9c4131a8f4
clone, patch, convert: use hex(nullid) instead of '0'*40
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Thu, 02 Sep 2010 12:08:13 +0200 |
parents | 33010ff1fd6f |
children | 6b7077df4aa5 |
line wrap: on
line diff
--- 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: