diff tests/drawdag.py @ 47055: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 59fa3890d40a
children 6000f5b25c9b
line wrap: on
line diff
--- a/tests/drawdag.py	Mon Apr 19 20:38:52 2021 -0400
+++ b/tests/drawdag.py	Mon Mar 29 01:52:06 2021 +0200
@@ -86,7 +86,6 @@
 import itertools
 import re
 
-from mercurial.node import nullid
 from mercurial.i18n import _
 from mercurial import (
     context,
@@ -299,7 +298,7 @@
         self._added = added
         self._parents = parentctxs
         while len(self._parents) < 2:
-            self._parents.append(repo[nullid])
+            self._parents.append(repo[repo.nullid])
 
     def filectx(self, key):
         return simplefilectx(key, self._added[key])
@@ -388,7 +387,7 @@
         content = content.replace(br'\n', b'\n').replace(br'\1', b'\1')
         files[name][path] = content
 
-    committed = {None: nullid}  # {name: node}
+    committed = {None: repo.nullid}  # {name: node}
 
     # for leaf nodes, try to find existing nodes in repo
     for name, parents in edges.items():