annotate tests/test-histedit-non-commute-abort.t @ 44311:2b72c4ff8ed1

nodemap: use an intermediate "docket" file to carry small metadata This intermediate file will make mmapping, transaction and content validation easier. (Most of this usefulness will arrive gradually in later changeset). In particular it will become very useful to append new data are the end of raw file instead of rewriting on the file on each transaction. See in code comments for details. Differential Revision: https://phab.mercurial-scm.org/D7838
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 15 Jan 2020 15:47:50 +0100
parents 699102b10530
children acbfa31cfaf2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
1 $ . "$TESTDIR/histedit-helpers.sh"
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
2
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
3 $ cat >> $HGRCPATH <<EOF
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
4 > [extensions]
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
5 > histedit=
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
6 > EOF
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
7
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
8 $ initrepo ()
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
9 > {
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
10 > hg init r
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
11 > cd r
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
12 > for x in a b c d e f ; do
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
13 > echo $x > $x
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
14 > hg add $x
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
15 > hg ci -m $x
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
16 > done
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
17 > echo a >> e
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
18 > hg ci -m 'does not commute with e'
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
19 > cd ..
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
20 > }
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
21
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
22 $ initrepo
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
23 $ cd r
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
24
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
25 log before edit
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
26 $ hg log --graph
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
27 @ changeset: 6:bfa474341cc9
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
28 | tag: tip
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
29 | user: test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
30 | date: Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
31 | summary: does not commute with e
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
32 |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
33 o changeset: 5:652413bf663e
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
34 | user: test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
35 | date: Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
36 | summary: f
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
37 |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
38 o changeset: 4:e860deea161a
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
39 | user: test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
40 | date: Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
41 | summary: e
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
42 |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
43 o changeset: 3:055a42cdd887
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
44 | user: test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
45 | date: Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
46 | summary: d
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
47 |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
48 o changeset: 2:177f92b77385
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
49 | user: test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
50 | date: Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
51 | summary: c
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
52 |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
53 o changeset: 1:d2ae7f538514
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
54 | user: test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
55 | date: Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
56 | summary: b
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
57 |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
58 o changeset: 0:cb9a9f314b8b
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
59 user: test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
60 date: Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
61 summary: a
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
62
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
63
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
64 edit the history
19019
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18934
diff changeset
65 $ hg histedit 177f92b77385 --commands - 2>&1 <<EOF | fixbundle
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18934
diff changeset
66 > pick 177f92b77385 c
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18934
diff changeset
67 > pick 055a42cdd887 d
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18934
diff changeset
68 > pick bfa474341cc9 does not commute with e
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18934
diff changeset
69 > pick e860deea161a e
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18934
diff changeset
70 > pick 652413bf663e f
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18934
diff changeset
71 > EOF
17647
d34ba4991188 histedit: replaces patching logic by merges
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17087
diff changeset
72 merging e
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 24643
diff changeset
73 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
27629
e7ff83b2bcfe histedit: list action when intervention is required
timeless <timeless@mozdev.org>
parents: 27405
diff changeset
74 Fix up the change (pick e860deea161a)
e7ff83b2bcfe histedit: list action when intervention is required
timeless <timeless@mozdev.org>
parents: 27405
diff changeset
75 (hg histedit --continue to resume)
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
76
27027
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
77 insert unsupported advisory merge record
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
78 $ hg --config extensions.fakemergerecord=$TESTDIR/fakemergerecord.py fakemergerecord -x
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
79 $ hg debugmergestate
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
80 * version 2 records
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
81 local: 8f7551c7e4a2f2efe0bc8c741baf7f227d65d758
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
82 other: e860deea161a2f77de56603b340ebbb4536308ae
28634
3ceac01bc29f merge: save merge part labels for later reuse
Simon Farnsworth <simonfar@fb.com>
parents: 28011
diff changeset
83 labels:
3ceac01bc29f merge: save merge part labels for later reuse
Simon Farnsworth <simonfar@fb.com>
parents: 28011
diff changeset
84 local: local
3ceac01bc29f merge: save merge part labels for later reuse
Simon Farnsworth <simonfar@fb.com>
parents: 28011
diff changeset
85 other: histedit
27027
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
86 unrecognized entry: x advisory record
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 28004
diff changeset
87 file extras: e (ancestorlinknode = 0000000000000000000000000000000000000000)
27027
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
88 file: e (record type "F", state "u", hash 58e6b3a414a1e090dfc6029add0f3555ccba127f)
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
89 local path: e (flags "")
27134
cb5bdf65420f debugmergestate: print out null nodes as 'null'
Siddharth Agarwal <sid0@fb.com>
parents: 27027
diff changeset
90 ancestor path: e (node null)
27027
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
91 other path: e (node 6b67ccefd5ce6de77e7ead4f5292843a0255329f)
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
92 $ hg resolve -l
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
93 U e
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
94
27027
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
95 insert unsupported mandatory merge record
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
96 $ hg --config extensions.fakemergerecord=$TESTDIR/fakemergerecord.py fakemergerecord -X
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
97 $ hg debugmergestate
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
98 * version 2 records
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
99 local: 8f7551c7e4a2f2efe0bc8c741baf7f227d65d758
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
100 other: e860deea161a2f77de56603b340ebbb4536308ae
28634
3ceac01bc29f merge: save merge part labels for later reuse
Simon Farnsworth <simonfar@fb.com>
parents: 28011
diff changeset
101 labels:
3ceac01bc29f merge: save merge part labels for later reuse
Simon Farnsworth <simonfar@fb.com>
parents: 28011
diff changeset
102 local: local
3ceac01bc29f merge: save merge part labels for later reuse
Simon Farnsworth <simonfar@fb.com>
parents: 28011
diff changeset
103 other: histedit
28011
8abd9f785030 merge: add file ancestor linknode to mergestate
Durham Goode <durham@fb.com>
parents: 28004
diff changeset
104 file extras: e (ancestorlinknode = 0000000000000000000000000000000000000000)
27027
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
105 file: e (record type "F", state "u", hash 58e6b3a414a1e090dfc6029add0f3555ccba127f)
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
106 local path: e (flags "")
27134
cb5bdf65420f debugmergestate: print out null nodes as 'null'
Siddharth Agarwal <sid0@fb.com>
parents: 27027
diff changeset
107 ancestor path: e (node null)
27027
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
108 other path: e (node 6b67ccefd5ce6de77e7ead4f5292843a0255329f)
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
109 unrecognized entry: X mandatory record
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
110 $ hg resolve -l
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
111 abort: unsupported merge state records: X
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
112 (see https://mercurial-scm.org/wiki/MergeStateRecords for more information)
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
113 [255]
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
114 $ hg resolve -ma
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
115 abort: unsupported merge state records: X
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
116 (see https://mercurial-scm.org/wiki/MergeStateRecords for more information)
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
117 [255]
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
118
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
119 abort the edit (should clear out merge state)
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
120 $ hg histedit --abort 2>&1 | fixbundle
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
121 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
27027
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
122 $ hg debugmergestate
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26614
diff changeset
123 no merge state found
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
124
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
125 log after abort
17647
d34ba4991188 histedit: replaces patching logic by merges
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17087
diff changeset
126 $ hg resolve -l
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
127 $ hg log --graph
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
128 @ changeset: 6:bfa474341cc9
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
129 | tag: tip
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
130 | user: test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
131 | date: Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
132 | summary: does not commute with e
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
133 |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
134 o changeset: 5:652413bf663e
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
135 | user: test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
136 | date: Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
137 | summary: f
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
138 |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
139 o changeset: 4:e860deea161a
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
140 | user: test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
141 | date: Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
142 | summary: e
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
143 |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
144 o changeset: 3:055a42cdd887
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
145 | user: test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
146 | date: Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
147 | summary: d
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
148 |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
149 o changeset: 2:177f92b77385
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
150 | user: test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
151 | date: Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
152 | summary: c
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
153 |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
154 o changeset: 1:d2ae7f538514
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
155 | user: test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
156 | date: Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
157 | summary: b
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
158 |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
159 o changeset: 0:cb9a9f314b8b
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
160 user: test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
161 date: Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
162 summary: a
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
163
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
164
42977
699102b10530 histedit: sniff-test for untracked file conflicts before prompting for rules
Augie Fackler <augie@google.com>
parents: 42976
diff changeset
165 Early tree conflict doesn't leave histedit in a wedged state. Note
699102b10530 histedit: sniff-test for untracked file conflicts before prompting for rules
Augie Fackler <augie@google.com>
parents: 42976
diff changeset
166 that we don't specify --commands here: we catch the problem before we
699102b10530 histedit: sniff-test for untracked file conflicts before prompting for rules
Augie Fackler <augie@google.com>
parents: 42976
diff changeset
167 even prompt the user for rules, sidestepping any dataloss issues.
699102b10530 histedit: sniff-test for untracked file conflicts before prompting for rules
Augie Fackler <augie@google.com>
parents: 42976
diff changeset
168
42976
f200bea8470b histedit: demonstrate breakage when `update` to a revision breaks
Augie Fackler <augie@google.com>
parents: 28634
diff changeset
169 $ hg rm c
f200bea8470b histedit: demonstrate breakage when `update` to a revision breaks
Augie Fackler <augie@google.com>
parents: 28634
diff changeset
170 $ hg ci -m 'remove c'
f200bea8470b histedit: demonstrate breakage when `update` to a revision breaks
Augie Fackler <augie@google.com>
parents: 28634
diff changeset
171 $ echo collision > c
f200bea8470b histedit: demonstrate breakage when `update` to a revision breaks
Augie Fackler <augie@google.com>
parents: 28634
diff changeset
172
42977
699102b10530 histedit: sniff-test for untracked file conflicts before prompting for rules
Augie Fackler <augie@google.com>
parents: 42976
diff changeset
173 $ hg histedit e860deea161a
42976
f200bea8470b histedit: demonstrate breakage when `update` to a revision breaks
Augie Fackler <augie@google.com>
parents: 28634
diff changeset
174 c: untracked file differs
42977
699102b10530 histedit: sniff-test for untracked file conflicts before prompting for rules
Augie Fackler <augie@google.com>
parents: 42976
diff changeset
175 abort: untracked files in working directory conflict with files in 055a42cdd887
42976
f200bea8470b histedit: demonstrate breakage when `update` to a revision breaks
Augie Fackler <augie@google.com>
parents: 28634
diff changeset
176 [255]
f200bea8470b histedit: demonstrate breakage when `update` to a revision breaks
Augie Fackler <augie@google.com>
parents: 28634
diff changeset
177
42977
699102b10530 histedit: sniff-test for untracked file conflicts before prompting for rules
Augie Fackler <augie@google.com>
parents: 42976
diff changeset
178 We should have detected the collision early enough we're not in a
699102b10530 histedit: sniff-test for untracked file conflicts before prompting for rules
Augie Fackler <augie@google.com>
parents: 42976
diff changeset
179 histedit state, and p1 is unchanged.
42976
f200bea8470b histedit: demonstrate breakage when `update` to a revision breaks
Augie Fackler <augie@google.com>
parents: 28634
diff changeset
180
f200bea8470b histedit: demonstrate breakage when `update` to a revision breaks
Augie Fackler <augie@google.com>
parents: 28634
diff changeset
181 $ hg log -r 'p1()' -T'{node}\n'
f200bea8470b histedit: demonstrate breakage when `update` to a revision breaks
Augie Fackler <augie@google.com>
parents: 28634
diff changeset
182 1b0954ff00fccb15a37b679e4a35e9b01dfe685e
f200bea8470b histedit: demonstrate breakage when `update` to a revision breaks
Augie Fackler <augie@google.com>
parents: 28634
diff changeset
183 $ hg status --config ui.tweakdefaults=yes
f200bea8470b histedit: demonstrate breakage when `update` to a revision breaks
Augie Fackler <augie@google.com>
parents: 28634
diff changeset
184 ? c
f200bea8470b histedit: demonstrate breakage when `update` to a revision breaks
Augie Fackler <augie@google.com>
parents: 28634
diff changeset
185 ? e.orig
f200bea8470b histedit: demonstrate breakage when `update` to a revision breaks
Augie Fackler <augie@google.com>
parents: 28634
diff changeset
186
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
187 $ cd ..