D2426: histedit: use ctx.rev() instead of %d % ctx
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Sat Feb 24 19:31:16 UTC 2018
indygreg created this revision.
Herald added a reviewer: durin42.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
Weaning off basectx.__int__.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D2426
AFFECTED FILES
hgext/histedit.py
CHANGE DETAILS
diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -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') %
To: indygreg, durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list