Mercurial > hg
annotate tests/test-histedit-arguments.t @ 44946:fb2936c5f6dc
git: decode node IDs back into Python strings (issue6349)
db.text_factory = bytes, so the database contains only strings. The object IDs
we get from pygit2 are Python strings. b'foo' != 'foo'
This change allows the "don't reindex" optimization to work by allowing the
"cur_cache_heads == cache_heads" comparison a few lines down to succeed.
Differential Revision: https://phab.mercurial-scm.org/D8622
author | Hollis Blanchard <hollis_blanchard@mentor.com> |
---|---|
date | Tue, 09 Jun 2020 13:18:21 -0700 |
parents | db5560c07a28 |
children | 21733e8c924f |
rev | line source |
---|---|
42584
db5560c07a28
abort: added support for histedit
Taapas Agrawal <taapas2897@gmail.com>
parents:
42052
diff
changeset
|
1 #testcases abortcommand abortflag |
db5560c07a28
abort: added support for histedit
Taapas Agrawal <taapas2897@gmail.com>
parents:
42052
diff
changeset
|
2 |
db5560c07a28
abort: added support for histedit
Taapas Agrawal <taapas2897@gmail.com>
parents:
42052
diff
changeset
|
3 #if abortflag |
db5560c07a28
abort: added support for histedit
Taapas Agrawal <taapas2897@gmail.com>
parents:
42052
diff
changeset
|
4 $ cat >> $HGRCPATH <<EOF |
db5560c07a28
abort: added support for histedit
Taapas Agrawal <taapas2897@gmail.com>
parents:
42052
diff
changeset
|
5 > [alias] |
db5560c07a28
abort: added support for histedit
Taapas Agrawal <taapas2897@gmail.com>
parents:
42052
diff
changeset
|
6 > abort = histedit --abort |
db5560c07a28
abort: added support for histedit
Taapas Agrawal <taapas2897@gmail.com>
parents:
42052
diff
changeset
|
7 > EOF |
db5560c07a28
abort: added support for histedit
Taapas Agrawal <taapas2897@gmail.com>
parents:
42052
diff
changeset
|
8 #endif |
db5560c07a28
abort: added support for histedit
Taapas Agrawal <taapas2897@gmail.com>
parents:
42052
diff
changeset
|
9 |
19035
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
10 Test argument handling and various data parsing |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
11 ================================================== |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
12 |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
13 |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
14 Enable extensions used by this test. |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
15 $ cat >>$HGRCPATH <<EOF |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
16 > [extensions] |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
17 > histedit= |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
18 > EOF |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
19 |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
20 Repo setup. |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
21 $ hg init foo |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
22 $ cd foo |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
23 $ echo alpha >> alpha |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
24 $ hg addr |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
25 adding alpha |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
26 $ hg ci -m one |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
27 $ echo alpha >> alpha |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
28 $ hg ci -m two |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
29 $ echo alpha >> alpha |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
30 $ hg ci -m three |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
31 $ echo alpha >> alpha |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
32 $ hg ci -m four |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
33 $ echo alpha >> alpha |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
34 $ hg ci -m five |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
35 |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
36 $ hg log --style compact --graph |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
37 @ 4[tip] 08d98a8350f3 1970-01-01 00:00 +0000 test |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
38 | five |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
39 | |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
40 o 3 c8e68270e35a 1970-01-01 00:00 +0000 test |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
41 | four |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
42 | |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
43 o 2 eb57da33312f 1970-01-01 00:00 +0000 test |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
44 | three |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
45 | |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
46 o 1 579e40513370 1970-01-01 00:00 +0000 test |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
47 | two |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
48 | |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
49 o 0 6058cbb6cfd7 1970-01-01 00:00 +0000 test |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
50 one |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
51 |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
52 |
22368
802dffd62de5
histedit: abort gracefully on --continue/--abort with no state
Siddharth Agarwal <sid0@fb.com>
parents:
21858
diff
changeset
|
53 histedit --continue/--abort with no existing state |
802dffd62de5
histedit: abort gracefully on --continue/--abort with no state
Siddharth Agarwal <sid0@fb.com>
parents:
21858
diff
changeset
|
54 -------------------------------------------------- |
802dffd62de5
histedit: abort gracefully on --continue/--abort with no state
Siddharth Agarwal <sid0@fb.com>
parents:
21858
diff
changeset
|
55 |
802dffd62de5
histedit: abort gracefully on --continue/--abort with no state
Siddharth Agarwal <sid0@fb.com>
parents:
21858
diff
changeset
|
56 $ hg histedit --continue |
802dffd62de5
histedit: abort gracefully on --continue/--abort with no state
Siddharth Agarwal <sid0@fb.com>
parents:
21858
diff
changeset
|
57 abort: no histedit in progress |
802dffd62de5
histedit: abort gracefully on --continue/--abort with no state
Siddharth Agarwal <sid0@fb.com>
parents:
21858
diff
changeset
|
58 [255] |
42584
db5560c07a28
abort: added support for histedit
Taapas Agrawal <taapas2897@gmail.com>
parents:
42052
diff
changeset
|
59 $ hg abort |
db5560c07a28
abort: added support for histedit
Taapas Agrawal <taapas2897@gmail.com>
parents:
42052
diff
changeset
|
60 abort: no histedit in progress (abortflag !) |
db5560c07a28
abort: added support for histedit
Taapas Agrawal <taapas2897@gmail.com>
parents:
42052
diff
changeset
|
61 abort: no operation in progress (abortcommand !) |
22368
802dffd62de5
histedit: abort gracefully on --continue/--abort with no state
Siddharth Agarwal <sid0@fb.com>
parents:
21858
diff
changeset
|
62 [255] |
802dffd62de5
histedit: abort gracefully on --continue/--abort with no state
Siddharth Agarwal <sid0@fb.com>
parents:
21858
diff
changeset
|
63 |
19035
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
64 Run a dummy edit to make sure we get tip^^ correctly via revsingle. |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
65 -------------------------------------------------------------------- |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
66 |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
67 $ HGEDITOR=cat hg histedit "tip^^" |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
68 pick eb57da33312f 2 three |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
69 pick c8e68270e35a 3 four |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
70 pick 08d98a8350f3 4 five |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
71 |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
72 # Edit history between eb57da33312f and 08d98a8350f3 |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
73 # |
20503
23dc77874191
histedit: clarify description of fold command
Adrian Zgorzałek <adek@fb.com>
parents:
19847
diff
changeset
|
74 # Commits are listed from least to most recent |
23dc77874191
histedit: clarify description of fold command
Adrian Zgorzałek <adek@fb.com>
parents:
19847
diff
changeset
|
75 # |
28396
5490b04e6132
histedit: adds hint how to reorder changesets at editor (issue3766)
liscju <piotr.listkiewicz@gmail.com>
parents:
28359
diff
changeset
|
76 # You can reorder changesets by reordering the lines |
5490b04e6132
histedit: adds hint how to reorder changesets at editor (issue3766)
liscju <piotr.listkiewicz@gmail.com>
parents:
28359
diff
changeset
|
77 # |
19035
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
78 # Commands: |
27674
78d86664e3a2
histedit: prefer edit commit, edit message, use commit
timeless <timeless@mozdev.org>
parents:
27629
diff
changeset
|
79 # |
78d86664e3a2
histedit: prefer edit commit, edit message, use commit
timeless <timeless@mozdev.org>
parents:
27629
diff
changeset
|
80 # e, edit = use commit, but stop for amending |
78d86664e3a2
histedit: prefer edit commit, edit message, use commit
timeless <timeless@mozdev.org>
parents:
27629
diff
changeset
|
81 # m, mess = edit commit message without changing commit content |
19035
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
82 # p, pick = use commit |
34489
270e344a6c74
histedit: removing the experimental config 'histeditng'
Saurabh Singh <singhsrb@fb.com>
parents:
33773
diff
changeset
|
83 # b, base = checkout changeset and apply further changesets from there |
27674
78d86664e3a2
histedit: prefer edit commit, edit message, use commit
timeless <timeless@mozdev.org>
parents:
27629
diff
changeset
|
84 # d, drop = remove commit from history |
20511
5840da876235
histedit: shorten new fold message
Matt Mackall <mpm@selenic.com>
parents:
20503
diff
changeset
|
85 # f, fold = use commit, but combine it with the one above |
31056
37ab9e20991c
histedit: modify rollup to discard date from the rollup commit (issue4820)
Ben Schmidt <insightfuls@users.noreply.github.com>
parents:
29970
diff
changeset
|
86 # r, roll = like fold, but discard this commit's description and date |
19035
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
87 # |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
88 |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
89 Run on a revision not ancestors of the current working directory. |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
90 -------------------------------------------------------------------- |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
91 |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
92 $ hg up 2 |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
93 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
94 $ hg histedit -r 4 |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
95 abort: 08d98a8350f3 is not an ancestor of working directory |
85974024ffa3
histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
96 [255] |
19039
41669a18a7d6
histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19035
diff
changeset
|
97 $ hg up --quiet |
41669a18a7d6
histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19035
diff
changeset
|
98 |
20806
d66862b87ae6
histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents:
20511
diff
changeset
|
99 |
d66862b87ae6
histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents:
20511
diff
changeset
|
100 Test that we pick the minimum of a revrange |
d66862b87ae6
histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents:
20511
diff
changeset
|
101 --------------------------------------- |
d66862b87ae6
histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents:
20511
diff
changeset
|
102 |
d66862b87ae6
histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents:
20511
diff
changeset
|
103 $ HGEDITOR=cat hg histedit '2::' --commands - << EOF |
d66862b87ae6
histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents:
20511
diff
changeset
|
104 > pick eb57da33312f 2 three |
d66862b87ae6
histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents:
20511
diff
changeset
|
105 > pick c8e68270e35a 3 four |
d66862b87ae6
histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents:
20511
diff
changeset
|
106 > pick 08d98a8350f3 4 five |
d66862b87ae6
histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents:
20511
diff
changeset
|
107 > EOF |
d66862b87ae6
histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents:
20511
diff
changeset
|
108 $ hg up --quiet |
d66862b87ae6
histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents:
20511
diff
changeset
|
109 |
d66862b87ae6
histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents:
20511
diff
changeset
|
110 $ HGEDITOR=cat hg histedit 'tip:2' --commands - << EOF |
d66862b87ae6
histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents:
20511
diff
changeset
|
111 > pick eb57da33312f 2 three |
d66862b87ae6
histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents:
20511
diff
changeset
|
112 > pick c8e68270e35a 3 four |
d66862b87ae6
histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents:
20511
diff
changeset
|
113 > pick 08d98a8350f3 4 five |
d66862b87ae6
histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents:
20511
diff
changeset
|
114 > EOF |
d66862b87ae6
histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents:
20511
diff
changeset
|
115 $ hg up --quiet |
d66862b87ae6
histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents:
20511
diff
changeset
|
116 |
24009
00d331763442
histedit: allow configuring default behavior
Durham Goode <durham@fb.com>
parents:
22369
diff
changeset
|
117 Test config specified default |
00d331763442
histedit: allow configuring default behavior
Durham Goode <durham@fb.com>
parents:
22369
diff
changeset
|
118 ----------------------------- |
00d331763442
histedit: allow configuring default behavior
Durham Goode <durham@fb.com>
parents:
22369
diff
changeset
|
119 |
00d331763442
histedit: allow configuring default behavior
Durham Goode <durham@fb.com>
parents:
22369
diff
changeset
|
120 $ HGEDITOR=cat hg histedit --config "histedit.defaultrev=only(.) - ::eb57da33312f" --commands - << EOF |
00d331763442
histedit: allow configuring default behavior
Durham Goode <durham@fb.com>
parents:
22369
diff
changeset
|
121 > pick c8e68270e35a 3 four |
00d331763442
histedit: allow configuring default behavior
Durham Goode <durham@fb.com>
parents:
22369
diff
changeset
|
122 > pick 08d98a8350f3 4 five |
00d331763442
histedit: allow configuring default behavior
Durham Goode <durham@fb.com>
parents:
22369
diff
changeset
|
123 > EOF |
00d331763442
histedit: allow configuring default behavior
Durham Goode <durham@fb.com>
parents:
22369
diff
changeset
|
124 |
41146
fbd168455b26
histedit: crashing with a more useful error message on empty defaultrev
rdamazio@google.com
parents:
39707
diff
changeset
|
125 Test invalid config default |
fbd168455b26
histedit: crashing with a more useful error message on empty defaultrev
rdamazio@google.com
parents:
39707
diff
changeset
|
126 --------------------------- |
fbd168455b26
histedit: crashing with a more useful error message on empty defaultrev
rdamazio@google.com
parents:
39707
diff
changeset
|
127 |
fbd168455b26
histedit: crashing with a more useful error message on empty defaultrev
rdamazio@google.com
parents:
39707
diff
changeset
|
128 $ hg histedit --config "histedit.defaultrev=" |
fbd168455b26
histedit: crashing with a more useful error message on empty defaultrev
rdamazio@google.com
parents:
39707
diff
changeset
|
129 abort: config option histedit.defaultrev can't be empty |
fbd168455b26
histedit: crashing with a more useful error message on empty defaultrev
rdamazio@google.com
parents:
39707
diff
changeset
|
130 [255] |
fbd168455b26
histedit: crashing with a more useful error message on empty defaultrev
rdamazio@google.com
parents:
39707
diff
changeset
|
131 |
19847
45c3086880c7
histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19048
diff
changeset
|
132 Run on a revision not descendants of the initial parent |
45c3086880c7
histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19048
diff
changeset
|
133 -------------------------------------------------------------------- |
45c3086880c7
histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19048
diff
changeset
|
134 |
45c3086880c7
histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19048
diff
changeset
|
135 Test the message shown for inconsistent histedit state, which may be |
45c3086880c7
histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19048
diff
changeset
|
136 created (and forgotten) by Mercurial earlier than 2.7. This emulates |
45c3086880c7
histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19048
diff
changeset
|
137 Mercurial earlier than 2.7 by renaming ".hg/histedit-state" |
45c3086880c7
histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19048
diff
changeset
|
138 temporarily. |
45c3086880c7
histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19048
diff
changeset
|
139 |
24764
4dcd55802237
histedit: allow histedit --continue when not on a descendant (BC)
Durham Goode <durham@fb.com>
parents:
24009
diff
changeset
|
140 $ hg log -G -T '{rev} {shortest(node)} {desc}\n' -r 2:: |
4dcd55802237
histedit: allow histedit --continue when not on a descendant (BC)
Durham Goode <durham@fb.com>
parents:
24009
diff
changeset
|
141 @ 4 08d9 five |
4dcd55802237
histedit: allow histedit --continue when not on a descendant (BC)
Durham Goode <durham@fb.com>
parents:
24009
diff
changeset
|
142 | |
4dcd55802237
histedit: allow histedit --continue when not on a descendant (BC)
Durham Goode <durham@fb.com>
parents:
24009
diff
changeset
|
143 o 3 c8e6 four |
4dcd55802237
histedit: allow histedit --continue when not on a descendant (BC)
Durham Goode <durham@fb.com>
parents:
24009
diff
changeset
|
144 | |
4dcd55802237
histedit: allow histedit --continue when not on a descendant (BC)
Durham Goode <durham@fb.com>
parents:
24009
diff
changeset
|
145 o 2 eb57 three |
4dcd55802237
histedit: allow histedit --continue when not on a descendant (BC)
Durham Goode <durham@fb.com>
parents:
24009
diff
changeset
|
146 | |
28627
d7af9b4ae7dd
graphmod: set default edge styles for ascii graphs (BC)
Martijn Pieters <mjpieters@fb.com>
parents:
28396
diff
changeset
|
147 ~ |
19847
45c3086880c7
histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19048
diff
changeset
|
148 $ HGEDITOR=cat hg histedit -r 4 --commands - << EOF |
45c3086880c7
histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19048
diff
changeset
|
149 > edit 08d98a8350f3 4 five |
45c3086880c7
histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19048
diff
changeset
|
150 > EOF |
45c3086880c7
histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19048
diff
changeset
|
151 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
27629
e7ff83b2bcfe
histedit: list action when intervention is required
timeless <timeless@mozdev.org>
parents:
27547
diff
changeset
|
152 Editing (08d98a8350f3), you may commit or record as needed now. |
e7ff83b2bcfe
histedit: list action when intervention is required
timeless <timeless@mozdev.org>
parents:
27547
diff
changeset
|
153 (hg histedit --continue to resume) |
19847
45c3086880c7
histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19048
diff
changeset
|
154 [1] |
45c3086880c7
histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19048
diff
changeset
|
155 |
28123
6c1b7f80f90f
histedit: suggest the correct tool to continue (not histedit)
timeless <timeless@mozdev.org>
parents:
28004
diff
changeset
|
156 $ hg graft --continue |
6c1b7f80f90f
histedit: suggest the correct tool to continue (not histedit)
timeless <timeless@mozdev.org>
parents:
28004
diff
changeset
|
157 abort: no graft in progress |
6c1b7f80f90f
histedit: suggest the correct tool to continue (not histedit)
timeless <timeless@mozdev.org>
parents:
28004
diff
changeset
|
158 (continue: hg histedit --continue) |
6c1b7f80f90f
histedit: suggest the correct tool to continue (not histedit)
timeless <timeless@mozdev.org>
parents:
28004
diff
changeset
|
159 [255] |
6c1b7f80f90f
histedit: suggest the correct tool to continue (not histedit)
timeless <timeless@mozdev.org>
parents:
28004
diff
changeset
|
160 |
19847
45c3086880c7
histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19048
diff
changeset
|
161 $ mv .hg/histedit-state .hg/histedit-state.back |
45c3086880c7
histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19048
diff
changeset
|
162 $ hg update --quiet --clean 2 |
24764
4dcd55802237
histedit: allow histedit --continue when not on a descendant (BC)
Durham Goode <durham@fb.com>
parents:
24009
diff
changeset
|
163 $ echo alpha >> alpha |
19847
45c3086880c7
histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19048
diff
changeset
|
164 $ mv .hg/histedit-state.back .hg/histedit-state |
45c3086880c7
histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19048
diff
changeset
|
165 |
45c3086880c7
histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19048
diff
changeset
|
166 $ hg histedit --continue |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35230
diff
changeset
|
167 saved backup bundle to $TESTTMP/foo/.hg/strip-backup/08d98a8350f3-02594089-histedit.hg |
24764
4dcd55802237
histedit: allow histedit --continue when not on a descendant (BC)
Durham Goode <durham@fb.com>
parents:
24009
diff
changeset
|
168 $ hg log -G -T '{rev} {shortest(node)} {desc}\n' -r 2:: |
4dcd55802237
histedit: allow histedit --continue when not on a descendant (BC)
Durham Goode <durham@fb.com>
parents:
24009
diff
changeset
|
169 @ 4 f5ed five |
4dcd55802237
histedit: allow histedit --continue when not on a descendant (BC)
Durham Goode <durham@fb.com>
parents:
24009
diff
changeset
|
170 | |
4dcd55802237
histedit: allow histedit --continue when not on a descendant (BC)
Durham Goode <durham@fb.com>
parents:
24009
diff
changeset
|
171 | o 3 c8e6 four |
4dcd55802237
histedit: allow histedit --continue when not on a descendant (BC)
Durham Goode <durham@fb.com>
parents:
24009
diff
changeset
|
172 |/ |
4dcd55802237
histedit: allow histedit --continue when not on a descendant (BC)
Durham Goode <durham@fb.com>
parents:
24009
diff
changeset
|
173 o 2 eb57 three |
4dcd55802237
histedit: allow histedit --continue when not on a descendant (BC)
Durham Goode <durham@fb.com>
parents:
24009
diff
changeset
|
174 | |
28627
d7af9b4ae7dd
graphmod: set default edge styles for ascii graphs (BC)
Martijn Pieters <mjpieters@fb.com>
parents:
28396
diff
changeset
|
175 ~ |
19847
45c3086880c7
histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19048
diff
changeset
|
176 |
33351
154298576d44
histedit: use scmutil.cleanupnodes (BC)
Jun Wu <quark@fb.com>
parents:
33350
diff
changeset
|
177 $ hg unbundle -q $TESTTMP/foo/.hg/strip-backup/08d98a8350f3-02594089-histedit.hg |
24764
4dcd55802237
histedit: allow histedit --continue when not on a descendant (BC)
Durham Goode <durham@fb.com>
parents:
24009
diff
changeset
|
178 $ hg strip -q -r f5ed --config extensions.strip= |
4dcd55802237
histedit: allow histedit --continue when not on a descendant (BC)
Durham Goode <durham@fb.com>
parents:
24009
diff
changeset
|
179 $ hg up -q 08d98a8350f3 |
19847
45c3086880c7
histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19048
diff
changeset
|
180 |
19040
7eb6bfe0b5a2
histedit-test: test that missing revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19039
diff
changeset
|
181 Test that missing revisions are detected |
7eb6bfe0b5a2
histedit-test: test that missing revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19039
diff
changeset
|
182 --------------------------------------- |
7eb6bfe0b5a2
histedit-test: test that missing revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19039
diff
changeset
|
183 |
7eb6bfe0b5a2
histedit-test: test that missing revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19039
diff
changeset
|
184 $ HGEDITOR=cat hg histedit "tip^^" --commands - << EOF |
7eb6bfe0b5a2
histedit-test: test that missing revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19039
diff
changeset
|
185 > pick eb57da33312f 2 three |
7eb6bfe0b5a2
histedit-test: test that missing revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19039
diff
changeset
|
186 > pick 08d98a8350f3 4 five |
7eb6bfe0b5a2
histedit-test: test that missing revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19039
diff
changeset
|
187 > EOF |
27545
a67d2e059a51
histedit: use parse-error exception for parsing
timeless <timeless@mozdev.org>
parents:
27414
diff
changeset
|
188 hg: parse error: missing rules for changeset c8e68270e35a |
29970
5ad164698626
histedit: use single quotes in use warning
timeless <timeless@mozdev.org>
parents:
29470
diff
changeset
|
189 (use "drop c8e68270e35a" to discard, see also: 'hg help -e histedit.config') |
19040
7eb6bfe0b5a2
histedit-test: test that missing revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19039
diff
changeset
|
190 [255] |
7eb6bfe0b5a2
histedit-test: test that missing revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19039
diff
changeset
|
191 |
19041
3b52b15e0b3d
histedit-test: test that extra revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19040
diff
changeset
|
192 Test that extra revisions are detected |
3b52b15e0b3d
histedit-test: test that extra revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19040
diff
changeset
|
193 --------------------------------------- |
3b52b15e0b3d
histedit-test: test that extra revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19040
diff
changeset
|
194 |
3b52b15e0b3d
histedit-test: test that extra revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19040
diff
changeset
|
195 $ HGEDITOR=cat hg histedit "tip^^" --commands - << EOF |
3b52b15e0b3d
histedit-test: test that extra revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19040
diff
changeset
|
196 > pick 6058cbb6cfd7 0 one |
3b52b15e0b3d
histedit-test: test that extra revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19040
diff
changeset
|
197 > pick c8e68270e35a 3 four |
3b52b15e0b3d
histedit-test: test that extra revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19040
diff
changeset
|
198 > pick 08d98a8350f3 4 five |
3b52b15e0b3d
histedit-test: test that extra revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19040
diff
changeset
|
199 > EOF |
27955
b721c9543a4f
histedit: show correct hash ID at verification error
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27712
diff
changeset
|
200 hg: parse error: pick "6058cbb6cfd7" changeset was not a candidate |
27712
bb810c8b3eca
histedit: report the unacceptable changeset
timeless <timeless@mozdev.org>
parents:
27674
diff
changeset
|
201 (only use listed changesets) |
19041
3b52b15e0b3d
histedit-test: test that extra revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19040
diff
changeset
|
202 [255] |
3b52b15e0b3d
histedit-test: test that extra revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19040
diff
changeset
|
203 |
19042
52366b37f897
histedit-test: test malformed line
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19041
diff
changeset
|
204 Test malformed line |
52366b37f897
histedit-test: test malformed line
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19041
diff
changeset
|
205 --------------------------------------- |
52366b37f897
histedit-test: test malformed line
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19041
diff
changeset
|
206 |
52366b37f897
histedit-test: test malformed line
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19041
diff
changeset
|
207 $ HGEDITOR=cat hg histedit "tip^^" --commands - << EOF |
52366b37f897
histedit-test: test malformed line
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19041
diff
changeset
|
208 > pickeb57da33312f2three |
52366b37f897
histedit-test: test malformed line
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19041
diff
changeset
|
209 > pick c8e68270e35a 3 four |
52366b37f897
histedit-test: test malformed line
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19041
diff
changeset
|
210 > pick 08d98a8350f3 4 five |
52366b37f897
histedit-test: test malformed line
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19041
diff
changeset
|
211 > EOF |
27545
a67d2e059a51
histedit: use parse-error exception for parsing
timeless <timeless@mozdev.org>
parents:
27414
diff
changeset
|
212 hg: parse error: malformed line "pickeb57da33312f2three" |
19042
52366b37f897
histedit-test: test malformed line
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19041
diff
changeset
|
213 [255] |
52366b37f897
histedit-test: test malformed line
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19041
diff
changeset
|
214 |
19043
7d27d80185f0
histedit-test: test unknown changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19042
diff
changeset
|
215 Test unknown changeset |
7d27d80185f0
histedit-test: test unknown changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19042
diff
changeset
|
216 --------------------------------------- |
7d27d80185f0
histedit-test: test unknown changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19042
diff
changeset
|
217 |
7d27d80185f0
histedit-test: test unknown changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19042
diff
changeset
|
218 $ HGEDITOR=cat hg histedit "tip^^" --commands - << EOF |
7d27d80185f0
histedit-test: test unknown changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19042
diff
changeset
|
219 > pick 0123456789ab 2 three |
7d27d80185f0
histedit-test: test unknown changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19042
diff
changeset
|
220 > pick c8e68270e35a 3 four |
7d27d80185f0
histedit-test: test unknown changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19042
diff
changeset
|
221 > pick 08d98a8350f3 4 five |
7d27d80185f0
histedit-test: test unknown changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19042
diff
changeset
|
222 > EOF |
27545
a67d2e059a51
histedit: use parse-error exception for parsing
timeless <timeless@mozdev.org>
parents:
27414
diff
changeset
|
223 hg: parse error: unknown changeset 0123456789ab listed |
19043
7d27d80185f0
histedit-test: test unknown changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19042
diff
changeset
|
224 [255] |
7d27d80185f0
histedit-test: test unknown changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19042
diff
changeset
|
225 |
19044
f77c23ec09f7
histedit-test: test unknown command
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19043
diff
changeset
|
226 Test unknown command |
f77c23ec09f7
histedit-test: test unknown command
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19043
diff
changeset
|
227 --------------------------------------- |
f77c23ec09f7
histedit-test: test unknown command
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19043
diff
changeset
|
228 |
f77c23ec09f7
histedit-test: test unknown command
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19043
diff
changeset
|
229 $ HGEDITOR=cat hg histedit "tip^^" --commands - << EOF |
f77c23ec09f7
histedit-test: test unknown command
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19043
diff
changeset
|
230 > coin eb57da33312f 2 three |
f77c23ec09f7
histedit-test: test unknown command
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19043
diff
changeset
|
231 > pick c8e68270e35a 3 four |
f77c23ec09f7
histedit-test: test unknown command
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19043
diff
changeset
|
232 > pick 08d98a8350f3 4 five |
f77c23ec09f7
histedit-test: test unknown command
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19043
diff
changeset
|
233 > EOF |
27545
a67d2e059a51
histedit: use parse-error exception for parsing
timeless <timeless@mozdev.org>
parents:
27414
diff
changeset
|
234 hg: parse error: unknown action "coin" |
19044
f77c23ec09f7
histedit-test: test unknown command
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19043
diff
changeset
|
235 [255] |
f77c23ec09f7
histedit-test: test unknown command
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19043
diff
changeset
|
236 |
19047
81de87f8b480
histedit: protect against duplicated entries
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19044
diff
changeset
|
237 Test duplicated changeset |
81de87f8b480
histedit: protect against duplicated entries
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19044
diff
changeset
|
238 --------------------------------------- |
81de87f8b480
histedit: protect against duplicated entries
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19044
diff
changeset
|
239 |
81de87f8b480
histedit: protect against duplicated entries
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19044
diff
changeset
|
240 So one is missing and one appear twice. |
81de87f8b480
histedit: protect against duplicated entries
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19044
diff
changeset
|
241 |
81de87f8b480
histedit: protect against duplicated entries
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19044
diff
changeset
|
242 $ HGEDITOR=cat hg histedit "tip^^" --commands - << EOF |
81de87f8b480
histedit: protect against duplicated entries
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19044
diff
changeset
|
243 > pick eb57da33312f 2 three |
81de87f8b480
histedit: protect against duplicated entries
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19044
diff
changeset
|
244 > pick eb57da33312f 2 three |
81de87f8b480
histedit: protect against duplicated entries
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19044
diff
changeset
|
245 > pick 08d98a8350f3 4 five |
81de87f8b480
histedit: protect against duplicated entries
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19044
diff
changeset
|
246 > EOF |
27545
a67d2e059a51
histedit: use parse-error exception for parsing
timeless <timeless@mozdev.org>
parents:
27414
diff
changeset
|
247 hg: parse error: duplicated command for changeset eb57da33312f |
19047
81de87f8b480
histedit: protect against duplicated entries
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19044
diff
changeset
|
248 [255] |
81de87f8b480
histedit: protect against duplicated entries
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19044
diff
changeset
|
249 |
27547
1cbfeb1dc5aa
histedit: handle exceptions from node.bin in fromrule
timeless <timeless@mozdev.org>
parents:
27545
diff
changeset
|
250 Test bogus rev |
1cbfeb1dc5aa
histedit: handle exceptions from node.bin in fromrule
timeless <timeless@mozdev.org>
parents:
27545
diff
changeset
|
251 --------------------------------------- |
1cbfeb1dc5aa
histedit: handle exceptions from node.bin in fromrule
timeless <timeless@mozdev.org>
parents:
27545
diff
changeset
|
252 |
1cbfeb1dc5aa
histedit: handle exceptions from node.bin in fromrule
timeless <timeless@mozdev.org>
parents:
27545
diff
changeset
|
253 $ HGEDITOR=cat hg histedit "tip^^" --commands - << EOF |
1cbfeb1dc5aa
histedit: handle exceptions from node.bin in fromrule
timeless <timeless@mozdev.org>
parents:
27545
diff
changeset
|
254 > pick eb57da33312f 2 three |
37106
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
255 > pick 0u98 |
27547
1cbfeb1dc5aa
histedit: handle exceptions from node.bin in fromrule
timeless <timeless@mozdev.org>
parents:
27545
diff
changeset
|
256 > pick 08d98a8350f3 4 five |
1cbfeb1dc5aa
histedit: handle exceptions from node.bin in fromrule
timeless <timeless@mozdev.org>
parents:
27545
diff
changeset
|
257 > EOF |
37106
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
258 hg: parse error: invalid changeset 0u98 |
27547
1cbfeb1dc5aa
histedit: handle exceptions from node.bin in fromrule
timeless <timeless@mozdev.org>
parents:
27545
diff
changeset
|
259 [255] |
1cbfeb1dc5aa
histedit: handle exceptions from node.bin in fromrule
timeless <timeless@mozdev.org>
parents:
27545
diff
changeset
|
260 |
19039
41669a18a7d6
histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19035
diff
changeset
|
261 Test short version of command |
41669a18a7d6
histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19035
diff
changeset
|
262 --------------------------------------- |
41669a18a7d6
histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19035
diff
changeset
|
263 |
41669a18a7d6
histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19035
diff
changeset
|
264 Note: we use varying amounts of white space between command name and changeset |
41669a18a7d6
histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19035
diff
changeset
|
265 short hash. This tests issue3893. |
41669a18a7d6
histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19035
diff
changeset
|
266 |
41669a18a7d6
histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19035
diff
changeset
|
267 $ HGEDITOR=cat hg histedit "tip^^" --commands - << EOF |
41669a18a7d6
histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19035
diff
changeset
|
268 > pick eb57da33312f 2 three |
41669a18a7d6
histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19035
diff
changeset
|
269 > p c8e68270e35a 3 four |
41669a18a7d6
histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19035
diff
changeset
|
270 > f 08d98a8350f3 4 five |
41669a18a7d6
histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19035
diff
changeset
|
271 > EOF |
41669a18a7d6
histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19035
diff
changeset
|
272 four |
41669a18a7d6
histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19035
diff
changeset
|
273 *** |
41669a18a7d6
histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19035
diff
changeset
|
274 five |
41669a18a7d6
histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19035
diff
changeset
|
275 |
41669a18a7d6
histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19035
diff
changeset
|
276 |
41669a18a7d6
histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19035
diff
changeset
|
277 |
41669a18a7d6
histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19035
diff
changeset
|
278 HG: Enter commit message. Lines beginning with 'HG:' are removed. |
41669a18a7d6
histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19035
diff
changeset
|
279 HG: Leave message empty to abort commit. |
41669a18a7d6
histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19035
diff
changeset
|
280 HG: -- |
41669a18a7d6
histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19035
diff
changeset
|
281 HG: user: test |
41669a18a7d6
histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19035
diff
changeset
|
282 HG: branch 'default' |
41669a18a7d6
histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19035
diff
changeset
|
283 HG: changed alpha |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35230
diff
changeset
|
284 saved backup bundle to $TESTTMP/foo/.hg/strip-backup/c8e68270e35a-63d8b8d8-histedit.hg |
20806
d66862b87ae6
histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents:
20511
diff
changeset
|
285 |
d66862b87ae6
histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents:
20511
diff
changeset
|
286 $ hg update -q 2 |
d66862b87ae6
histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents:
20511
diff
changeset
|
287 $ echo x > x |
d66862b87ae6
histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents:
20511
diff
changeset
|
288 $ hg add x |
d66862b87ae6
histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents:
20511
diff
changeset
|
289 $ hg commit -m'x' x |
d66862b87ae6
histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents:
20511
diff
changeset
|
290 created new head |
d66862b87ae6
histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents:
20511
diff
changeset
|
291 $ hg histedit -r 'heads(all())' |
d66862b87ae6
histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents:
20511
diff
changeset
|
292 abort: The specified revisions must have exactly one common root |
d66862b87ae6
histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents:
20511
diff
changeset
|
293 [255] |
21858
50fd3a36d166
histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20806
diff
changeset
|
294 |
50fd3a36d166
histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20806
diff
changeset
|
295 Test that trimming description using multi-byte characters |
50fd3a36d166
histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20806
diff
changeset
|
296 -------------------------------------------------------------------- |
50fd3a36d166
histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20806
diff
changeset
|
297 |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
37106
diff
changeset
|
298 $ "$PYTHON" <<EOF |
36172
21f4697ef789
tests: add some b-prefixes on local script in test-histedit-arguments
Augie Fackler <augie@google.com>
parents:
35393
diff
changeset
|
299 > fp = open('logfile', 'wb') |
21f4697ef789
tests: add some b-prefixes on local script in test-histedit-arguments
Augie Fackler <augie@google.com>
parents:
35393
diff
changeset
|
300 > fp.write(b'12345678901234567890123456789012345678901234567890' + |
21f4697ef789
tests: add some b-prefixes on local script in test-histedit-arguments
Augie Fackler <augie@google.com>
parents:
35393
diff
changeset
|
301 > b'12345') # there are 5 more columns for 80 columns |
21858
50fd3a36d166
histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20806
diff
changeset
|
302 > |
50fd3a36d166
histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20806
diff
changeset
|
303 > # 2 x 4 = 8 columns, but 3 x 4 = 12 bytes |
50fd3a36d166
histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20806
diff
changeset
|
304 > fp.write(u'\u3042\u3044\u3046\u3048'.encode('utf-8')) |
50fd3a36d166
histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20806
diff
changeset
|
305 > |
50fd3a36d166
histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20806
diff
changeset
|
306 > fp.close() |
50fd3a36d166
histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20806
diff
changeset
|
307 > EOF |
50fd3a36d166
histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20806
diff
changeset
|
308 $ echo xx >> x |
50fd3a36d166
histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20806
diff
changeset
|
309 $ hg --encoding utf-8 commit --logfile logfile |
50fd3a36d166
histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20806
diff
changeset
|
310 |
50fd3a36d166
histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20806
diff
changeset
|
311 $ HGEDITOR=cat hg --encoding utf-8 histedit tip |
50fd3a36d166
histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20806
diff
changeset
|
312 pick 3d3ea1f3a10b 5 1234567890123456789012345678901234567890123456789012345\xe3\x81\x82... (esc) |
50fd3a36d166
histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20806
diff
changeset
|
313 |
50fd3a36d166
histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20806
diff
changeset
|
314 # Edit history between 3d3ea1f3a10b and 3d3ea1f3a10b |
50fd3a36d166
histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20806
diff
changeset
|
315 # |
50fd3a36d166
histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20806
diff
changeset
|
316 # Commits are listed from least to most recent |
50fd3a36d166
histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20806
diff
changeset
|
317 # |
28396
5490b04e6132
histedit: adds hint how to reorder changesets at editor (issue3766)
liscju <piotr.listkiewicz@gmail.com>
parents:
28359
diff
changeset
|
318 # You can reorder changesets by reordering the lines |
5490b04e6132
histedit: adds hint how to reorder changesets at editor (issue3766)
liscju <piotr.listkiewicz@gmail.com>
parents:
28359
diff
changeset
|
319 # |
21858
50fd3a36d166
histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20806
diff
changeset
|
320 # Commands: |
27674
78d86664e3a2
histedit: prefer edit commit, edit message, use commit
timeless <timeless@mozdev.org>
parents:
27629
diff
changeset
|
321 # |
78d86664e3a2
histedit: prefer edit commit, edit message, use commit
timeless <timeless@mozdev.org>
parents:
27629
diff
changeset
|
322 # e, edit = use commit, but stop for amending |
78d86664e3a2
histedit: prefer edit commit, edit message, use commit
timeless <timeless@mozdev.org>
parents:
27629
diff
changeset
|
323 # m, mess = edit commit message without changing commit content |
21858
50fd3a36d166
histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20806
diff
changeset
|
324 # p, pick = use commit |
34489
270e344a6c74
histedit: removing the experimental config 'histeditng'
Saurabh Singh <singhsrb@fb.com>
parents:
33773
diff
changeset
|
325 # b, base = checkout changeset and apply further changesets from there |
27674
78d86664e3a2
histedit: prefer edit commit, edit message, use commit
timeless <timeless@mozdev.org>
parents:
27629
diff
changeset
|
326 # d, drop = remove commit from history |
21858
50fd3a36d166
histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20806
diff
changeset
|
327 # f, fold = use commit, but combine it with the one above |
31056
37ab9e20991c
histedit: modify rollup to discard date from the rollup commit (issue4820)
Ben Schmidt <insightfuls@users.noreply.github.com>
parents:
29970
diff
changeset
|
328 # r, roll = like fold, but discard this commit's description and date |
21858
50fd3a36d166
histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20806
diff
changeset
|
329 # |
25330
8594d0b3018e
histedit: fix keep during --continue
Durham Goode <durham@fb.com>
parents:
24764
diff
changeset
|
330 |
8594d0b3018e
histedit: fix keep during --continue
Durham Goode <durham@fb.com>
parents:
24764
diff
changeset
|
331 Test --continue with --keep |
8594d0b3018e
histedit: fix keep during --continue
Durham Goode <durham@fb.com>
parents:
24764
diff
changeset
|
332 |
8594d0b3018e
histedit: fix keep during --continue
Durham Goode <durham@fb.com>
parents:
24764
diff
changeset
|
333 $ hg strip -q -r . --config extensions.strip= |
8594d0b3018e
histedit: fix keep during --continue
Durham Goode <durham@fb.com>
parents:
24764
diff
changeset
|
334 $ hg histedit '.^' -q --keep --commands - << EOF |
8594d0b3018e
histedit: fix keep during --continue
Durham Goode <durham@fb.com>
parents:
24764
diff
changeset
|
335 > edit eb57da33312f 2 three |
8594d0b3018e
histedit: fix keep during --continue
Durham Goode <durham@fb.com>
parents:
24764
diff
changeset
|
336 > pick f3cfcca30c44 4 x |
8594d0b3018e
histedit: fix keep during --continue
Durham Goode <durham@fb.com>
parents:
24764
diff
changeset
|
337 > EOF |
27629
e7ff83b2bcfe
histedit: list action when intervention is required
timeless <timeless@mozdev.org>
parents:
27547
diff
changeset
|
338 Editing (eb57da33312f), you may commit or record as needed now. |
e7ff83b2bcfe
histedit: list action when intervention is required
timeless <timeless@mozdev.org>
parents:
27547
diff
changeset
|
339 (hg histedit --continue to resume) |
25330
8594d0b3018e
histedit: fix keep during --continue
Durham Goode <durham@fb.com>
parents:
24764
diff
changeset
|
340 [1] |
8594d0b3018e
histedit: fix keep during --continue
Durham Goode <durham@fb.com>
parents:
24764
diff
changeset
|
341 $ echo edit >> alpha |
8594d0b3018e
histedit: fix keep during --continue
Durham Goode <durham@fb.com>
parents:
24764
diff
changeset
|
342 $ hg histedit -q --continue |
8594d0b3018e
histedit: fix keep during --continue
Durham Goode <durham@fb.com>
parents:
24764
diff
changeset
|
343 $ hg log -G -T '{rev}:{node|short} {desc}' |
8594d0b3018e
histedit: fix keep during --continue
Durham Goode <durham@fb.com>
parents:
24764
diff
changeset
|
344 @ 6:8fda0c726bf2 x |
8594d0b3018e
histedit: fix keep during --continue
Durham Goode <durham@fb.com>
parents:
24764
diff
changeset
|
345 | |
8594d0b3018e
histedit: fix keep during --continue
Durham Goode <durham@fb.com>
parents:
24764
diff
changeset
|
346 o 5:63379946892c three |
8594d0b3018e
histedit: fix keep during --continue
Durham Goode <durham@fb.com>
parents:
24764
diff
changeset
|
347 | |
8594d0b3018e
histedit: fix keep during --continue
Durham Goode <durham@fb.com>
parents:
24764
diff
changeset
|
348 | o 4:f3cfcca30c44 x |
8594d0b3018e
histedit: fix keep during --continue
Durham Goode <durham@fb.com>
parents:
24764
diff
changeset
|
349 | | |
8594d0b3018e
histedit: fix keep during --continue
Durham Goode <durham@fb.com>
parents:
24764
diff
changeset
|
350 | | o 3:2a30f3cfee78 four |
8594d0b3018e
histedit: fix keep during --continue
Durham Goode <durham@fb.com>
parents:
24764
diff
changeset
|
351 | |/ *** |
8594d0b3018e
histedit: fix keep during --continue
Durham Goode <durham@fb.com>
parents:
24764
diff
changeset
|
352 | | five |
8594d0b3018e
histedit: fix keep during --continue
Durham Goode <durham@fb.com>
parents:
24764
diff
changeset
|
353 | o 2:eb57da33312f three |
8594d0b3018e
histedit: fix keep during --continue
Durham Goode <durham@fb.com>
parents:
24764
diff
changeset
|
354 |/ |
8594d0b3018e
histedit: fix keep during --continue
Durham Goode <durham@fb.com>
parents:
24764
diff
changeset
|
355 o 1:579e40513370 two |
8594d0b3018e
histedit: fix keep during --continue
Durham Goode <durham@fb.com>
parents:
24764
diff
changeset
|
356 | |
8594d0b3018e
histedit: fix keep during --continue
Durham Goode <durham@fb.com>
parents:
24764
diff
changeset
|
357 o 0:6058cbb6cfd7 one |
8594d0b3018e
histedit: fix keep during --continue
Durham Goode <durham@fb.com>
parents:
24764
diff
changeset
|
358 |
26584
e28102403d1b
histedit: delete histedit statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26100
diff
changeset
|
359 |
e28102403d1b
histedit: delete histedit statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26100
diff
changeset
|
360 Test that abort fails gracefully on exception |
e28102403d1b
histedit: delete histedit statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26100
diff
changeset
|
361 ---------------------------------------------- |
e28102403d1b
histedit: delete histedit statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26100
diff
changeset
|
362 $ hg histedit . -q --commands - << EOF |
e28102403d1b
histedit: delete histedit statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26100
diff
changeset
|
363 > edit 8fda0c726bf2 6 x |
e28102403d1b
histedit: delete histedit statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26100
diff
changeset
|
364 > EOF |
27629
e7ff83b2bcfe
histedit: list action when intervention is required
timeless <timeless@mozdev.org>
parents:
27547
diff
changeset
|
365 Editing (8fda0c726bf2), you may commit or record as needed now. |
e7ff83b2bcfe
histedit: list action when intervention is required
timeless <timeless@mozdev.org>
parents:
27547
diff
changeset
|
366 (hg histedit --continue to resume) |
26584
e28102403d1b
histedit: delete histedit statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26100
diff
changeset
|
367 [1] |
e28102403d1b
histedit: delete histedit statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26100
diff
changeset
|
368 Corrupt histedit state file |
e28102403d1b
histedit: delete histedit statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26100
diff
changeset
|
369 $ sed 's/8fda0c726bf2/123456789012/' .hg/histedit-state > ../corrupt-histedit |
e28102403d1b
histedit: delete histedit statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26100
diff
changeset
|
370 $ mv ../corrupt-histedit .hg/histedit-state |
42584
db5560c07a28
abort: added support for histedit
Taapas Agrawal <taapas2897@gmail.com>
parents:
42052
diff
changeset
|
371 $ hg abort |
26584
e28102403d1b
histedit: delete histedit statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26100
diff
changeset
|
372 warning: encountered an exception during histedit --abort; the repository may not have been completely cleaned up |
35230
feecfefeba25
tests: add a substitution for ENOENT/ERROR_FILE_NOT_FOUND messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
34867
diff
changeset
|
373 abort: $TESTTMP/foo/.hg/strip-backup/*-histedit.hg: $ENOENT$ (glob) (windows !) |
41420
b6673e9bdcf6
dispatch: quote filename in IOError as well
Yuya Nishihara <yuya@tcha.org>
parents:
41146
diff
changeset
|
374 abort: $ENOENT$: '$TESTTMP/foo/.hg/strip-backup/*-histedit.hg' (glob) (no-windows !) |
26584
e28102403d1b
histedit: delete histedit statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26100
diff
changeset
|
375 [255] |
e28102403d1b
histedit: delete histedit statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26100
diff
changeset
|
376 Histedit state has been exited |
e28102403d1b
histedit: delete histedit statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26100
diff
changeset
|
377 $ hg summary -q |
e28102403d1b
histedit: delete histedit statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26100
diff
changeset
|
378 parent: 5:63379946892c |
e28102403d1b
histedit: delete histedit statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26100
diff
changeset
|
379 commit: 1 added, 1 unknown (new branch head) |
e28102403d1b
histedit: delete histedit statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26100
diff
changeset
|
380 update: 4 new changesets (update) |
e28102403d1b
histedit: delete histedit statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26100
diff
changeset
|
381 |
27262
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
382 $ cd .. |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
383 |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
384 Set up default base revision tests |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
385 |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
386 $ hg init defaultbase |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
387 $ cd defaultbase |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
388 $ touch foo |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
389 $ hg -q commit -A -m root |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
390 $ echo 1 > foo |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
391 $ hg commit -m 'public 1' |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
392 $ hg phase --force --public -r . |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
393 $ echo 2 > foo |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
394 $ hg commit -m 'draft after public' |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
395 $ hg -q up -r 1 |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
396 $ echo 3 > foo |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
397 $ hg commit -m 'head 1 public' |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
398 created new head |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
399 $ hg phase --force --public -r . |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
400 $ echo 4 > foo |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
401 $ hg commit -m 'head 1 draft 1' |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
402 $ echo 5 > foo |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
403 $ hg commit -m 'head 1 draft 2' |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
404 $ hg -q up -r 2 |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
405 $ echo 6 > foo |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
406 $ hg commit -m 'head 2 commit 1' |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
407 $ echo 7 > foo |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
408 $ hg commit -m 'head 2 commit 2' |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
409 $ hg -q up -r 2 |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
410 $ echo 8 > foo |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
411 $ hg commit -m 'head 3' |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
412 created new head |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
413 $ hg -q up -r 2 |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
414 $ echo 9 > foo |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
415 $ hg commit -m 'head 4' |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
416 created new head |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
417 $ hg merge --tool :local -r 8 |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
418 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
419 (branch merge, don't forget to commit) |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
420 $ hg commit -m 'merge head 3 into head 4' |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
421 $ echo 11 > foo |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
422 $ hg commit -m 'commit 1 after merge' |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
423 $ echo 12 > foo |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
424 $ hg commit -m 'commit 2 after merge' |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
425 |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
426 $ hg log -G -T '{rev}:{node|short} {phase} {desc}\n' |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
427 @ 12:8cde254db839 draft commit 2 after merge |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
428 | |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
429 o 11:6f2f0241f119 draft commit 1 after merge |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
430 | |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
431 o 10:90506cc76b00 draft merge head 3 into head 4 |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
432 |\ |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
433 | o 9:f8607a373a97 draft head 4 |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
434 | | |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
435 o | 8:0da92be05148 draft head 3 |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
436 |/ |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
437 | o 7:4c35cdf97d5e draft head 2 commit 2 |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
438 | | |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
439 | o 6:931820154288 draft head 2 commit 1 |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
440 |/ |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
441 | o 5:8cdc02b9bc63 draft head 1 draft 2 |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
442 | | |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
443 | o 4:463b8c0d2973 draft head 1 draft 1 |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
444 | | |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
445 | o 3:23a0c4eefcbf public head 1 public |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
446 | | |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
447 o | 2:4117331c3abb draft draft after public |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
448 |/ |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
449 o 1:4426d359ea59 public public 1 |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
450 | |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
451 o 0:54136a8ddf32 public root |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
452 |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
453 |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
454 Default base revision should stop at public changesets |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
455 |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
456 $ hg -q up 8cdc02b9bc63 |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
457 $ hg histedit --commands - <<EOF |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
458 > pick 463b8c0d2973 |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
459 > pick 8cdc02b9bc63 |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
460 > EOF |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
461 |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
462 Default base revision should stop at branchpoint |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
463 |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
464 $ hg -q up 4c35cdf97d5e |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
465 $ hg histedit --commands - <<EOF |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
466 > pick 931820154288 |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
467 > pick 4c35cdf97d5e |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
468 > EOF |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
469 |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
470 Default base revision should stop at merge commit |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
471 |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
472 $ hg -q up 8cde254db839 |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
473 $ hg histedit --commands - <<EOF |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
474 > pick 6f2f0241f119 |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
475 > pick 8cde254db839 |
3d0feb2f978b
histedit: pick an appropriate base changeset by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27217
diff
changeset
|
476 > EOF |
28359
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
477 |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
478 commit --amend should abort if histedit is in progress |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
479 (issue4800) and markers are not being created. |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
480 Eventually, histedit could perhaps look at `source` extra, |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
481 in which case this test should be revisited. |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
482 |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
483 $ hg -q up 8cde254db839 |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
484 $ hg histedit 6f2f0241f119 --commands - <<EOF |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
485 > pick 8cde254db839 |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
486 > edit 6f2f0241f119 |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
487 > EOF |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
488 merging foo |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
489 warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
490 Fix up the change (pick 8cde254db839) |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
491 (hg histedit --continue to resume) |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
492 [1] |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
493 $ hg resolve -m --all |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
494 (no more unresolved files) |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
495 continue: hg histedit --continue |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
496 $ hg histedit --cont |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
497 merging foo |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
498 warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
499 Editing (6f2f0241f119), you may commit or record as needed now. |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
500 (hg histedit --continue to resume) |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
501 [1] |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
502 $ hg resolve -m --all |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
503 (no more unresolved files) |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
504 continue: hg histedit --continue |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
505 $ hg commit --amend -m 'reject this fold' |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
506 abort: histedit in progress |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
507 (use 'hg histedit --continue' or 'hg histedit --abort') |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
508 [255] |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
509 |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
510 With markers enabled, histedit does not get confused, and |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
511 amend should not be blocked by the ongoing histedit. |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
512 |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
513 $ cat >>$HGRCPATH <<EOF |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
514 > [experimental] |
34866
1644623ab096
config: use 'experimental.evolution.create-markers'
Boris Feld <boris.feld@octobus.net>
parents:
34489
diff
changeset
|
515 > evolution.createmarkers=True |
34867
7f183c643eb6
config: use 'experimental.evolution.allowunstable'
Boris Feld <boris.feld@octobus.net>
parents:
34866
diff
changeset
|
516 > evolution.allowunstable=True |
28359
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
517 > EOF |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
518 $ hg commit --amend -m 'allow this fold' |
f6b5b041c6c9
commit: block amend while histedit is in progress (issue4800)
timeless <timeless@mozdev.org>
parents:
28123
diff
changeset
|
519 $ hg histedit --continue |
29214
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
520 |
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
521 $ cd .. |
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
522 |
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
523 Test autoverb feature |
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
524 |
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
525 $ hg init autoverb |
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
526 $ cd autoverb |
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
527 $ echo alpha >> alpha |
29470
2ff243c415b4
histedit: move autoverb rule to the commit it matches
Sean Farley <sean@farley.io>
parents:
29214
diff
changeset
|
528 $ hg ci -qAm one |
29214
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
529 $ echo alpha >> alpha |
29470
2ff243c415b4
histedit: move autoverb rule to the commit it matches
Sean Farley <sean@farley.io>
parents:
29214
diff
changeset
|
530 $ hg ci -qm two |
2ff243c415b4
histedit: move autoverb rule to the commit it matches
Sean Farley <sean@farley.io>
parents:
29214
diff
changeset
|
531 $ echo beta >> beta |
2ff243c415b4
histedit: move autoverb rule to the commit it matches
Sean Farley <sean@farley.io>
parents:
29214
diff
changeset
|
532 $ hg ci -qAm "roll! one" |
29214
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
533 |
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
534 $ hg log --style compact --graph |
29470
2ff243c415b4
histedit: move autoverb rule to the commit it matches
Sean Farley <sean@farley.io>
parents:
29214
diff
changeset
|
535 @ 2[tip] 4f34d0f8b5fa 1970-01-01 00:00 +0000 test |
2ff243c415b4
histedit: move autoverb rule to the commit it matches
Sean Farley <sean@farley.io>
parents:
29214
diff
changeset
|
536 | roll! one |
29214
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
537 | |
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
538 o 1 579e40513370 1970-01-01 00:00 +0000 test |
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
539 | two |
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
540 | |
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
541 o 0 6058cbb6cfd7 1970-01-01 00:00 +0000 test |
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
542 one |
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
543 |
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
544 |
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
545 Check that 'roll' is selected by default |
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
546 |
29470
2ff243c415b4
histedit: move autoverb rule to the commit it matches
Sean Farley <sean@farley.io>
parents:
29214
diff
changeset
|
547 $ HGEDITOR=cat hg histedit 0 --config experimental.histedit.autoverb=True |
2ff243c415b4
histedit: move autoverb rule to the commit it matches
Sean Farley <sean@farley.io>
parents:
29214
diff
changeset
|
548 pick 6058cbb6cfd7 0 one |
2ff243c415b4
histedit: move autoverb rule to the commit it matches
Sean Farley <sean@farley.io>
parents:
29214
diff
changeset
|
549 roll 4f34d0f8b5fa 2 roll! one |
29214
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
550 pick 579e40513370 1 two |
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
551 |
29470
2ff243c415b4
histedit: move autoverb rule to the commit it matches
Sean Farley <sean@farley.io>
parents:
29214
diff
changeset
|
552 # Edit history between 6058cbb6cfd7 and 4f34d0f8b5fa |
29214
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
553 # |
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
554 # Commits are listed from least to most recent |
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
555 # |
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
556 # You can reorder changesets by reordering the lines |
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
557 # |
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
558 # Commands: |
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
559 # |
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
560 # e, edit = use commit, but stop for amending |
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
561 # m, mess = edit commit message without changing commit content |
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
562 # p, pick = use commit |
34489
270e344a6c74
histedit: removing the experimental config 'histeditng'
Saurabh Singh <singhsrb@fb.com>
parents:
33773
diff
changeset
|
563 # b, base = checkout changeset and apply further changesets from there |
29214
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
564 # d, drop = remove commit from history |
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
565 # f, fold = use commit, but combine it with the one above |
31056
37ab9e20991c
histedit: modify rollup to discard date from the rollup commit (issue4820)
Ben Schmidt <insightfuls@users.noreply.github.com>
parents:
29970
diff
changeset
|
566 # r, roll = like fold, but discard this commit's description and date |
29214
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
567 # |
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
568 |
ceca932c080d
histedit: add experimental config for using the first word of the commit
Sean Farley <sean@farley.io>
parents:
28627
diff
changeset
|
569 $ cd .. |
37106
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
570 |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
571 Check that histedit's commands accept revsets |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
572 $ hg init bar |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
573 $ cd bar |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
574 $ echo w >> a |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
575 $ hg ci -qAm "adds a" |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
576 $ echo x >> b |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
577 $ hg ci -qAm "adds b" |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
578 $ echo y >> c |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
579 $ hg ci -qAm "adds c" |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
580 $ echo z >> d |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
581 $ hg ci -qAm "adds d" |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
582 $ hg log -G -T '{rev} {desc}\n' |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
583 @ 3 adds d |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
584 | |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
585 o 2 adds c |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
586 | |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
587 o 1 adds b |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
588 | |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
589 o 0 adds a |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
590 |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
591 $ HGEDITOR=cat hg histedit "2" --commands - << EOF |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
592 > base -4 adds c |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
593 > pick 2 adds c |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
594 > pick tip adds d |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
595 > EOF |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
596 $ hg log -G -T '{rev} {desc}\n' |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
597 @ 5 adds d |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
598 | |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
599 o 4 adds c |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
600 | |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
601 | o 1 adds b |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
602 |/ |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
603 o 0 adds a |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
604 |
3d3cff1f6bde
histedit: make histedit's commands accept revsets (issue5746)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
36172
diff
changeset
|
605 |