1 This test requires parentrevspec support in revsets, so check for that |
|
2 and skip the test if we're on an unusual hg that supports .t tests but |
|
3 not parentrevspec. |
|
4 $ python -c 'from mercurial import revset ; revset.methods["parentpost"]' || exit 80 |
|
5 |
|
6 Enable extensions used by this test. |
|
7 $ cat >>$HGRCPATH <<EOF |
|
8 > [extensions] |
|
9 > graphlog= |
|
10 > histedit= |
|
11 > EOF |
|
12 |
|
13 Repo setup. |
|
14 $ hg init foo |
|
15 $ cd foo |
|
16 $ echo alpha >> alpha |
|
17 $ hg addr |
|
18 adding alpha |
|
19 $ hg ci -m one |
|
20 $ echo alpha >> alpha |
|
21 $ hg ci -m two |
|
22 $ echo alpha >> alpha |
|
23 $ hg ci -m three |
|
24 $ echo alpha >> alpha |
|
25 $ hg ci -m four |
|
26 $ echo alpha >> alpha |
|
27 $ hg ci -m five |
|
28 |
|
29 $ hg log --style compact --graph |
|
30 @ 4[tip] 08d98a8350f3 1970-01-01 00:00 +0000 test |
|
31 | five |
|
32 | |
|
33 o 3 c8e68270e35a 1970-01-01 00:00 +0000 test |
|
34 | four |
|
35 | |
|
36 o 2 eb57da33312f 1970-01-01 00:00 +0000 test |
|
37 | three |
|
38 | |
|
39 o 1 579e40513370 1970-01-01 00:00 +0000 test |
|
40 | two |
|
41 | |
|
42 o 0 6058cbb6cfd7 1970-01-01 00:00 +0000 test |
|
43 one |
|
44 |
|
45 |
|
46 Run a dummy edit to make sure we get tip^^ correctly via revsingle. |
|
47 $ HGEDITOR=cat hg histedit "tip^^" |
|
48 pick eb57da33312f 2 three |
|
49 pick c8e68270e35a 3 four |
|
50 pick 08d98a8350f3 4 five |
|
51 |
|
52 # Edit history between eb57da33312f and 08d98a8350f3 |
|
53 # |
|
54 # Commands: |
|
55 # p, pick = use commit |
|
56 # e, edit = use commit, but stop for amending |
|
57 # f, fold = use commit, but fold into previous commit (combines N and N-1) |
|
58 # d, drop = remove commit from history |
|
59 # m, mess = edit message without changing commit content |
|
60 # |
|
61 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
62 |
|
63 Run on a revision not ancestors of the current working directory. |
|
64 |
|
65 $ hg up 2 |
|
66 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
67 $ hg histedit -r 4 |
|
68 nothing to edit |
|
69 [1] |
|