Patchwork D2430: split: use ctx.rev() instead of %d % ctx

login
register
mail settings
Submitter phabricator
Date Feb. 24, 2018, 7:31 p.m.
Message ID <differential-rev-PHID-DREV-p3ictcydqmnke3opsg34-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/28333/
State Superseded
Headers show

Comments

phabricator - Feb. 24, 2018, 7:31 p.m.
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  And rename a variable for clarity while we're here.
  
  This is part of our effort to wean off basectx.__int__.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/split.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/hgext/split.py b/hgext/split.py
--- a/hgext/split.py
+++ b/hgext/split.py
@@ -172,6 +172,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()))