Patchwork D2426: histedit: use ctx.rev() instead of %d % ctx

login
register
mail settings
Submitter phabricator
Date Feb. 25, 2018, 1:53 a.m.
Message ID <8e7bde78199de7cdaeaa0dfc424fcea2@localhost.localdomain>
Download mbox | patch
Permalink /patch/28343/
State Not Applicable
Headers show

Comments

phabricator - Feb. 25, 2018, 1:53 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG6905c4ec312c: histedit: use ctx.rev() instead of %d % ctx (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2426?vs=6058&id=6071

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

AFFECTED FILES
  hgext/histedit.py

CHANGE DETAILS




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

Patch

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') %