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