Patchwork D3138: rebase: make "destnode" consistently a revnum and rename it to "destrev"

login
register
mail settings
Submitter phabricator
Date April 5, 2018, 5:47 p.m.
Message ID <differential-rev-PHID-DREV-d6kxtlqfehs246alkz77-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/30392/
State Superseded
Headers show

Comments

phabricator - April 5, 2018, 5:47 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/rebase.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel
phabricator - April 5, 2018, 5:59 p.m.
quark accepted this revision.
quark added a comment.


  Thanks. I was not too happy about the old code using `rev` as `node`s. But I didn't spend much time changing them.

REPOSITORY
  rHG Mercurial

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

To: martinvonz, #hg-reviewers, quark
Cc: quark, mercurial-devel

Patch

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -248,10 +248,10 @@ 
                     if newrev in legacystates:
                         continue
                     if len(args) > 2:
-                        destnode = args[2]
+                        destrev = repo[args[2]].rev()
                     else:
-                        destnode = legacydest
-                    destmap[repo[oldrev].rev()] = repo[destnode].rev()
+                        destrev = legacydest
+                    destmap[repo[oldrev].rev()] = destrev
                     if newrev in (nullid, revtodostr):
                         state[repo[oldrev].rev()] = revtodo
                         # Legacy compat special case