This is an archive of the discontinued Mercurial Phabricator instance.

node: replace nullid and friends with nodeconstants class
ClosedPublic

Authored by joerg.sonnenberger on Nov 30 2020, 6:23 AM.

Details

Summary

The introduction of 256bit hashes require changes to nullid and other
constant magic values. Start pushing them down from repository and
revlog where sensible.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

joerg.sonnenberger retitled this revision from [POC] node: replace nullid and friends with nodeconstants class to node: replace nullid and friends with nodeconstants class [WIP].Mar 28 2021, 8:55 PM
joerg.sonnenberger edited the summary of this revision. (Show Details)
joerg.sonnenberger updated this revision to Diff 26621.
durin42 requested changes to this revision.Mar 30 2021, 4:21 PM

Fails tests, eg:

--- tests/test-push-checkheads-unpushed-D7.t
+++ tests/test-push-checkheads-unpushed-D7.t.err
@@ -65,27 +65,16 @@
   $ mkcommit C0
   created new head
   $ hg debugobsolete `getid "desc(A0)"` `getid "desc(A1)"`
-  1 new obsolescence markers
-  obsoleted 1 changesets
+  abort: cannot import name 'noderev' from 'mercurial.node' (/tmp/hgtests.5j0okzgk/install/lib/python/mercurial/node.py)
+  abort: cannot import name 'noderev' from 'mercurial.node' (/tmp/hgtests.5j0okzgk/install/lib/python/mercurial/node.py)
   $ hg debugobsolete `getid "desc(A1)"` `getid "desc(A2)"`
-  1 new obsolescence markers
-  obsoleted 1 changesets
+  abort: cannot import name 'noderev' from 'mercurial.node' (/tmp/hgtests.5j0okzgk/install/lib/python/mercurial/node.py)
+  abort: cannot import name 'noderev' from 'mercurial.node' (/tmp/hgtests.5j0okzgk/install/lib/python/mercurial/node.py)
   $ hg debugobsolete --record-parents `getid "desc(A2)"`
-  1 new obsolescence markers
-  obsoleted 1 changesets
+  abort: cannot import name 'noderev' from 'mercurial.node' (/tmp/hgtests.5j0okzgk/install/lib/python/mercurial/node.py)
   $ hg log -G --hidden
-  @  0f88766e02d6 (draft): C0
-  |
-  | x  c1f8d089020f (draft): A2
-  |/
-  | x  ba93660aff8d (draft): A1
-  | |
-  | o  74ff5441d343 (draft): B0
-  |/
-  | x  8aaa48160adc (draft): A0
-  |/
-  o  1e4be0697311 (public): root
-
+  abort: cannot import name 'noderev' from 'mercurial.node' (/tmp/hgtests.5j0okzgk/install/lib/python/mercurial/node.py)
+  [255]

(among others)

This revision now requires changes to proceed.Mar 30 2021, 4:21 PM
baymax updated this revision to Diff 27133.Apr 20 2021, 12:22 PM

✅ refresh by Heptapod after a successful CI run (🐙 💚)

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.
joerg.sonnenberger retitled this revision from node: replace nullid and friends with nodeconstants class [WIP] to node: replace nullid and friends with nodeconstants class.Apr 20 2021, 1:49 PM
joerg.sonnenberger edited the summary of this revision. (Show Details)
joerg.sonnenberger updated this revision to Diff 27148.