diff hgext/remotefilelog/shallowrepo.py @ 47012:d55b71393907

node: replace nullid and friends with nodeconstants class The introduction of 256bit hashes require changes to nullid and other constant magic values. Start pushing them down from repository and revlog where sensible. Differential Revision: https://phab.mercurial-scm.org/D9465
author Joerg Sonnenberger <joerg@bec.de>
date Mon, 29 Mar 2021 01:52:06 +0200
parents 89a2afe31e82
children 6000f5b25c9b
line wrap: on
line diff
--- a/hgext/remotefilelog/shallowrepo.py	Mon Apr 19 20:38:52 2021 -0400
+++ b/hgext/remotefilelog/shallowrepo.py	Mon Mar 29 01:52:06 2021 +0200
@@ -9,7 +9,7 @@
 import os
 
 from mercurial.i18n import _
-from mercurial.node import hex, nullid, nullrev
+from mercurial.node import hex, nullrev
 from mercurial import (
     encoding,
     error,
@@ -206,8 +206,8 @@
                 m1 = ctx.p1().manifest()
                 files = []
                 for f in ctx.modified() + ctx.added():
-                    fparent1 = m1.get(f, nullid)
-                    if fparent1 != nullid:
+                    fparent1 = m1.get(f, self.nullid)
+                    if fparent1 != self.nullid:
                         files.append((f, hex(fparent1)))
                 self.fileservice.prefetch(files)
             return super(shallowrepository, self).commitctx(