--- a/hgext/git/index.py Sun Dec 13 18:29:22 2020 -0800
+++ b/hgext/git/index.py Tue Dec 01 21:54:46 2020 +0100
@@ -5,11 +5,14 @@
import sqlite3
from mercurial.i18n import _
+from mercurial.node import (
+ nullhex,
+ nullid,
+)
from mercurial import (
encoding,
error,
- node as nodemod,
pycompat,
)
@@ -278,7 +281,7 @@
for pos, commit in enumerate(walker):
if prog is not None:
prog.update(pos)
- p1 = p2 = nodemod.nullhex
+ p1 = p2 = nullhex
if len(commit.parents) > 2:
raise error.ProgrammingError(
(
@@ -315,9 +318,7 @@
)
new_files = (p.delta.new_file for p in patchgen)
files = {
- nf.path: nf.id.hex
- for nf in new_files
- if nf.id.raw != nodemod.nullid
+ nf.path: nf.id.hex for nf in new_files if nf.id.raw != nullid
}
for p, n in files.items():
# We intentionally set NULLs for any file parentage