##// END OF EJS Templates
histedit: respect revsetalias entries (issue4311)...
Augie Fackler -
r21950:af44c7a1 stable
parent child Browse files
Show More
@@ -158,6 +158,7 b' from mercurial import context'
158 158 from mercurial import hg
159 159 from mercurial import node
160 160 from mercurial import repair
161 from mercurial import scmutil
161 162 from mercurial import util
162 163 from mercurial import obsolete
163 164 from mercurial import merge as mergemod
@@ -567,11 +568,11 b' def _histedit(ui, repo, *freeargs, **opt'
567 568 remote = None
568 569 root = findoutgoing(ui, repo, remote, force, opts)
569 570 else:
570 rootrevs = list(repo.set('roots(%lr)', revs))
571 if len(rootrevs) != 1:
571 rr = list(repo.set('roots(%ld)', scmutil.revrange(repo, revs)))
572 if len(rr) != 1:
572 573 raise util.Abort(_('The specified revisions must have '
573 574 'exactly one common root'))
574 root = rootrevs[0].node()
575 root = rr[0].node()
575 576
576 577 keep = opts.get('keep', False)
577 578 revs = between(repo, root, topmost, keep)
@@ -324,6 +324,30 b' try with --rev'
324 324 date: Thu Jan 01 00:00:00 1970 +0000
325 325 summary: a
326 326
327 Verify that revsetalias entries work with histedit:
328 $ cat >> $HGRCPATH <<EOF
329 > [revsetalias]
330 > grandparent(ARG) = p1(p1(ARG))
331 > EOF
332 $ echo extra commit >> c
333 $ hg ci -m 'extra commit to c'
334 $ HGEDITOR=cat hg histedit 'grandparent(.)'
335 pick ece0b8d93dda 6 c
336 pick 803ef1c6fcfd 7 e
337 pick 9c863c565126 8 extra commit to c
338
339 # Edit history between ece0b8d93dda and 9c863c565126
340 #
341 # Commits are listed from least to most recent
342 #
343 # Commands:
344 # p, pick = use commit
345 # e, edit = use commit, but stop for amending
346 # f, fold = use commit, but combine it with the one above
347 # d, drop = remove commit from history
348 # m, mess = edit message without changing commit content
349 #
350 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
327 351
328 352 should also work if a commit message is missing
329 353 $ BUNDLE="$TESTDIR/missing-comment.hg"
General Comments 0
You need to be logged in to leave comments. Login now