Show More
@@ -158,6 +158,7 b' from mercurial import context' | |||||
158 | from mercurial import hg |
|
158 | from mercurial import hg | |
159 | from mercurial import node |
|
159 | from mercurial import node | |
160 | from mercurial import repair |
|
160 | from mercurial import repair | |
|
161 | from mercurial import scmutil | |||
161 | from mercurial import util |
|
162 | from mercurial import util | |
162 | from mercurial import obsolete |
|
163 | from mercurial import obsolete | |
163 | from mercurial import merge as mergemod |
|
164 | from mercurial import merge as mergemod | |
@@ -567,11 +568,11 b' def _histedit(ui, repo, *freeargs, **opt' | |||||
567 | remote = None |
|
568 | remote = None | |
568 | root = findoutgoing(ui, repo, remote, force, opts) |
|
569 | root = findoutgoing(ui, repo, remote, force, opts) | |
569 | else: |
|
570 | else: | |
570 |
r |
|
571 | rr = list(repo.set('roots(%ld)', scmutil.revrange(repo, revs))) | |
571 |
if len(r |
|
572 | if len(rr) != 1: | |
572 | raise util.Abort(_('The specified revisions must have ' |
|
573 | raise util.Abort(_('The specified revisions must have ' | |
573 | 'exactly one common root')) |
|
574 | 'exactly one common root')) | |
574 |
root = r |
|
575 | root = rr[0].node() | |
575 |
|
576 | |||
576 | keep = opts.get('keep', False) |
|
577 | keep = opts.get('keep', False) | |
577 | revs = between(repo, root, topmost, keep) |
|
578 | revs = between(repo, root, topmost, keep) |
@@ -324,6 +324,30 b' try with --rev' | |||||
324 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
324 | date: Thu Jan 01 00:00:00 1970 +0000 | |
325 | summary: a |
|
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 | should also work if a commit message is missing |
|
352 | should also work if a commit message is missing | |
329 | $ BUNDLE="$TESTDIR/missing-comment.hg" |
|
353 | $ BUNDLE="$TESTDIR/missing-comment.hg" |
General Comments 0
You need to be logged in to leave comments.
Login now