D10278: extdiff: avoid nullid
joerg.sonnenberger (Joerg Sonnenberger)
phabricator at mercurial-scm.org
Sun Mar 28 20:00:20 UTC 2021
joerg.sonnenberger created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D10278
AFFECTED FILES
hgext/extdiff.py
CHANGE DETAILS
diff --git a/hgext/extdiff.py b/hgext/extdiff.py
--- a/hgext/extdiff.py
+++ b/hgext/extdiff.py
@@ -91,7 +91,7 @@
from mercurial.i18n import _
from mercurial.node import (
- nullid,
+ nullrev,
short,
)
from mercurial import (
@@ -565,18 +565,18 @@
repo, [from_rev] + [to_rev], b'nowarn'
)
ctx1a = scmutil.revsingle(repo, from_rev, None)
- ctx1b = repo[nullid]
+ ctx1b = repo[nullrev]
ctx2 = scmutil.revsingle(repo, to_rev, None)
else:
ctx1a, ctx2 = scmutil.revpair(repo, revs)
if not revs:
ctx1b = repo[None].p2()
else:
- ctx1b = repo[nullid]
+ ctx1b = repo[nullrev]
# Disable 3-way merge if there is only one parent
if do3way:
- if ctx1b.node() == nullid:
+ if ctx1b.rev() == nullrev:
do3way = False
matcher = scmutil.match(ctx2, pats, opts)
To: joerg.sonnenberger, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list