Patchwork D7354: index: use `index.get_rev` in `histedit.processreplacement`

login
register
mail settings
Submitter phabricator
Date Nov. 8, 2019, 4:29 p.m.
Message ID <differential-rev-PHID-DREV-7tlq5v6jzpmnyoic3mio-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/42961/
State Superseded
Headers show

Comments

phabricator - Nov. 8, 2019, 4:29 p.m.
marmoute created this revision.
Herald added a reviewer: durin42.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D7354

AFFECTED FILES
  hgext/histedit.py

CHANGE DETAILS




To: marmoute, durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -2517,9 +2517,9 @@ 
         del final[n]
     # we expect all changes involved in final to exist in the repo
     # turn `final` into list (topologically sorted)
-    nm = state.repo.changelog.nodemap
+    get_rev = state.repo.changelog.index.get_rev
     for prec, succs in final.items():
-        final[prec] = sorted(succs, key=nm.get)
+        final[prec] = sorted(succs, key=get_rev)
 
     # computed topmost element (necessary for bookmark)
     if new: