split: use ctx.rev() instead of %d % ctx
authorGregory Szorc <gregory.szorc@gmail.com>
Sat, 24 Feb 2018 11:20:24 -0800
changeset 36408 83bade6206d4
parent 36407 a75cab94e936
child 36409 72da480db4a5
split: use ctx.rev() instead of %d % ctx And rename a variable for clarity while we're here. This is part of our effort to wean off basectx.__int__. Differential Revision: https://phab.mercurial-scm.org/D2430
hgext/split.py
--- a/hgext/split.py	Sat Feb 24 11:14:28 2018 -0800
+++ b/hgext/split.py	Sat Feb 24 11:20:24 2018 -0800
@@ -173,6 +173,6 @@
 
     return committed[-1]
 
-def dorebase(ui, repo, src, dest):
+def dorebase(ui, repo, src, destctx):
     rebase.rebase(ui, repo, rev=[revsetlang.formatspec('%ld', src)],
-                  dest=revsetlang.formatspec('%d', dest))
+                  dest=revsetlang.formatspec('%d', destctx.rev()))