Mercurial > hg
changeset 36404:6905c4ec312c
histedit: use ctx.rev() instead of %d % ctx
Weaning off basectx.__int__.
Differential Revision: https://phab.mercurial-scm.org/D2426
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 24 Feb 2018 10:53:47 -0800 |
parents | 10de411d7207 |
children | 0b57596253b8 |
files | hgext/histedit.py |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/histedit.py Sat Feb 24 10:56:15 2018 -0800 +++ b/hgext/histedit.py Sat Feb 24 10:53:47 2018 -0800 @@ -577,7 +577,7 @@ Commit message is edited in all cases. This function works in memory.""" - ctxs = list(repo.set('%d::%d', firstctx, lastctx)) + ctxs = list(repo.set('%d::%d', firstctx.rev(), lastctx.rev())) if not ctxs: return None for c in ctxs: @@ -730,8 +730,9 @@ return ctx, [(self.node, (parentctxnode,))] parentctx = repo[parentctxnode] - newcommits = set(c.node() for c in repo.set('(%d::. - %d)', parentctx, - parentctx)) + newcommits = set(c.node() for c in repo.set('(%d::. - %d)', + parentctx.rev(), + parentctx.rev())) if not newcommits: repo.ui.warn(_('%s: cannot fold - working copy is not a ' 'descendant of previous commit %s\n') %