Patchwork D10278: extdiff: avoid nullid

login
register
mail settings
Submitter phabricator
Date March 28, 2021, 8 p.m.
Message ID <differential-rev-PHID-DREV-afnscxe3aflgnhi3mdgf-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48593/
State Superseded
Headers show

Comments

phabricator - March 28, 2021, 8 p.m.
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




To: joerg.sonnenberger, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

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)