rebase: convert "oldrev" to revnum earlier
authorMartin von Zweigbergk <martinvonz@google.com>
Thu, 05 Apr 2018 10:13:45 -0700
changeset 37377 3dfd7f018c69
parent 37376 25940470c7e6
child 37378 953db9e00eeb
rebase: convert "oldrev" to revnum earlier It was done in 3 places before, now just 1. Differential Revision: https://phab.mercurial-scm.org/D3139
hgext/rebase.py
--- a/hgext/rebase.py	Thu Apr 05 10:12:10 2018 -0700
+++ b/hgext/rebase.py	Thu Apr 05 10:13:45 2018 -0700
@@ -243,7 +243,7 @@
                     activebookmark = l
                 else:
                     args = l.split(':')
-                    oldrev = args[0]
+                    oldrev = repo[args[0]].rev()
                     newrev = args[1]
                     if newrev in legacystates:
                         continue
@@ -251,12 +251,12 @@
                         destrev = repo[args[2]].rev()
                     else:
                         destrev = legacydest
-                    destmap[repo[oldrev].rev()] = destrev
+                    destmap[oldrev] = destrev
                     if newrev in (nullid, revtodostr):
-                        state[repo[oldrev].rev()] = revtodo
+                        state[oldrev] = revtodo
                         # Legacy compat special case
                     else:
-                        state[repo[oldrev].rev()] = repo[newrev].rev()
+                        state[oldrev] = repo[newrev].rev()
 
         except IOError as err:
             if err.errno != errno.ENOENT: