Patchwork D2431: histedit: resolve revs before evaluating %ld revset

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

Comments

phabricator - Feb. 25, 2018, 1:54 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG72da480db4a5: histedit: resolve revs before evaluating %ld revset (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2431?vs=6063&id=6076

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

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
@@ -1356,11 +1356,12 @@ 
     When keep is false, the specified set can't have children."""
     ctxs = list(repo.set('%n::%n', old, new))
     if ctxs and not keep:
+        revs = [ctx.rev() for ctx in ctxs]
         if (not obsolete.isenabled(repo, obsolete.allowunstableopt) and
-            repo.revs('(%ld::) - (%ld)', ctxs, ctxs)):
+            repo.revs('(%ld::) - (%ld)', revs, revs)):
             raise error.Abort(_('can only histedit a changeset together '
                                 'with all its descendants'))
-        if repo.revs('(%ld) and merge()', ctxs):
+        if repo.revs('(%ld) and merge()', revs):
             raise error.Abort(_('cannot edit history that contains merges'))
         root = ctxs[0] # list is already sorted by repo.set
         if not root.mutable():