Mercurial > hg
comparison hgext/split.py @ 36408:83bade6206d4
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
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 24 Feb 2018 11:20:24 -0800 |
parents | 7b86aa31b004 |
children | 5ba0cf22e4d0 |
comparison
equal
deleted
inserted
replaced
36407:a75cab94e936 | 36408:83bade6206d4 |
---|---|
171 scmutil.cleanupnodes(repo, {ctx.node(): [c.node() for c in committed]}, | 171 scmutil.cleanupnodes(repo, {ctx.node(): [c.node() for c in committed]}, |
172 operation='split') | 172 operation='split') |
173 | 173 |
174 return committed[-1] | 174 return committed[-1] |
175 | 175 |
176 def dorebase(ui, repo, src, dest): | 176 def dorebase(ui, repo, src, destctx): |
177 rebase.rebase(ui, repo, rev=[revsetlang.formatspec('%ld', src)], | 177 rebase.rebase(ui, repo, rev=[revsetlang.formatspec('%ld', src)], |
178 dest=revsetlang.formatspec('%d', dest)) | 178 dest=revsetlang.formatspec('%d', destctx.rev())) |