Mercurial > hg
annotate tests/test-histedit-fold.t @ 26345:2aa0dde846b4
mq: remove a mutable default argument
Mutable default arguments are know to the state of California to cause bugs. The
underlying function already handle "None" as an option value, so we do not need
to do anything else.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 24 Sep 2015 00:50:06 -0700 |
parents | bf81b696b8f4 |
children | ef1eb6df7071 |
rev | line source |
---|---|
21024
7731a2281cf0
spelling: fixes from spell checker
Mads Kiilerich <madski@unity3d.com>
parents:
20859
diff
changeset
|
1 Test histedit extension: Fold commands |
19015
07db88f053fe
test: improve documentation of some histedit tests
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19014
diff
changeset
|
2 ====================================== |
07db88f053fe
test: improve documentation of some histedit tests
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19014
diff
changeset
|
3 |
07db88f053fe
test: improve documentation of some histedit tests
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19014
diff
changeset
|
4 This test file is dedicated to testing the fold command in non conflicting |
07db88f053fe
test: improve documentation of some histedit tests
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19014
diff
changeset
|
5 case. |
07db88f053fe
test: improve documentation of some histedit tests
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19014
diff
changeset
|
6 |
07db88f053fe
test: improve documentation of some histedit tests
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19014
diff
changeset
|
7 Initialization |
07db88f053fe
test: improve documentation of some histedit tests
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19014
diff
changeset
|
8 --------------- |
07db88f053fe
test: improve documentation of some histedit tests
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19014
diff
changeset
|
9 |
07db88f053fe
test: improve documentation of some histedit tests
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19014
diff
changeset
|
10 |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
11 $ . "$TESTDIR/histedit-helpers.sh" |
17064
168cc52ad7c2
histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
12 |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
13 $ cat >> $HGRCPATH <<EOF |
19014
7b50120e8f6e
test: use a lighter log style in histedit test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
18935
diff
changeset
|
14 > [alias] |
7b50120e8f6e
test: use a lighter log style in histedit test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
18935
diff
changeset
|
15 > logt = log --template '{rev}:{node|short} {desc|firstline}\n' |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
16 > [extensions] |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
17 > histedit= |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
18 > EOF |
17064
168cc52ad7c2
histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
19 |
19015
07db88f053fe
test: improve documentation of some histedit tests
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19014
diff
changeset
|
20 |
07db88f053fe
test: improve documentation of some histedit tests
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19014
diff
changeset
|
21 Simple folding |
07db88f053fe
test: improve documentation of some histedit tests
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19014
diff
changeset
|
22 -------------------- |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
23 $ initrepo () |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
24 > { |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
25 > hg init r |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
26 > cd r |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
27 > 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
|
28 > echo $x > $x |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
29 > hg add $x |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
30 > hg ci -m $x |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
31 > done |
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 |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
34 $ initrepo |
17064
168cc52ad7c2
histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
35 |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
36 log before edit |
19014
7b50120e8f6e
test: use a lighter log style in histedit test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
18935
diff
changeset
|
37 $ hg logt --graph |
7b50120e8f6e
test: use a lighter log style in histedit test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
18935
diff
changeset
|
38 @ 5:652413bf663e f |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
39 | |
19014
7b50120e8f6e
test: use a lighter log style in histedit test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
18935
diff
changeset
|
40 o 4:e860deea161a e |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
41 | |
19014
7b50120e8f6e
test: use a lighter log style in histedit test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
18935
diff
changeset
|
42 o 3:055a42cdd887 d |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
43 | |
19014
7b50120e8f6e
test: use a lighter log style in histedit test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
18935
diff
changeset
|
44 o 2:177f92b77385 c |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
45 | |
19014
7b50120e8f6e
test: use a lighter log style in histedit test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
18935
diff
changeset
|
46 o 1:d2ae7f538514 b |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
47 | |
19014
7b50120e8f6e
test: use a lighter log style in histedit test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
18935
diff
changeset
|
48 o 0:cb9a9f314b8b a |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
49 |
17064
168cc52ad7c2
histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
50 |
19018
730614b9b352
histedit: allow "-" as a command file
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19017
diff
changeset
|
51 $ hg histedit 177f92b77385 --commands - 2>&1 <<EOF | fixbundle |
19015
07db88f053fe
test: improve documentation of some histedit tests
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19014
diff
changeset
|
52 > pick e860deea161a e |
07db88f053fe
test: improve documentation of some histedit tests
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19014
diff
changeset
|
53 > pick 652413bf663e f |
07db88f053fe
test: improve documentation of some histedit tests
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19014
diff
changeset
|
54 > fold 177f92b77385 c |
07db88f053fe
test: improve documentation of some histedit tests
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19014
diff
changeset
|
55 > pick 055a42cdd887 d |
07db88f053fe
test: improve documentation of some histedit tests
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19014
diff
changeset
|
56 > EOF |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
57 0 files updated, 0 files merged, 4 files removed, 0 files unresolved |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
58 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
59 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
60 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
17644
9ae073f10572
histedit: fold in memory
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17257
diff
changeset
|
61 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
62 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
63 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
17064
168cc52ad7c2
histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
64 |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
65 log after edit |
19014
7b50120e8f6e
test: use a lighter log style in histedit test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
18935
diff
changeset
|
66 $ hg logt --graph |
19018
730614b9b352
histedit: allow "-" as a command file
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19017
diff
changeset
|
67 @ 4:9c277da72c9b d |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
68 | |
19018
730614b9b352
histedit: allow "-" as a command file
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19017
diff
changeset
|
69 o 3:6de59d13424a f |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
70 | |
19014
7b50120e8f6e
test: use a lighter log style in histedit test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
18935
diff
changeset
|
71 o 2:ee283cb5f2d5 e |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
72 | |
19014
7b50120e8f6e
test: use a lighter log style in histedit test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
18935
diff
changeset
|
73 o 1:d2ae7f538514 b |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
74 | |
19014
7b50120e8f6e
test: use a lighter log style in histedit test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
18935
diff
changeset
|
75 o 0:cb9a9f314b8b a |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
76 |
17064
168cc52ad7c2
histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
77 |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
78 post-fold manifest |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
79 $ hg manifest |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
80 a |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
81 b |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
82 c |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
83 d |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
84 e |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
85 f |
17064
168cc52ad7c2
histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
86 |
18437
358c23e8f1c6
histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17687
diff
changeset
|
87 |
358c23e8f1c6
histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17687
diff
changeset
|
88 check histedit_source |
358c23e8f1c6
histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17687
diff
changeset
|
89 |
358c23e8f1c6
histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17687
diff
changeset
|
90 $ hg log --debug --rev 3 |
19019
53060cc1b601
histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19018
diff
changeset
|
91 changeset: 3:6de59d13424a8a13acd3e975514aed29dd0d9b2d |
18437
358c23e8f1c6
histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17687
diff
changeset
|
92 phase: draft |
358c23e8f1c6
histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17687
diff
changeset
|
93 parent: 2:ee283cb5f2d5955443f23a27b697a04339e9a39a |
358c23e8f1c6
histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17687
diff
changeset
|
94 parent: -1:0000000000000000000000000000000000000000 |
358c23e8f1c6
histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17687
diff
changeset
|
95 manifest: 3:81eede616954057198ead0b2c73b41d1f392829a |
358c23e8f1c6
histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17687
diff
changeset
|
96 user: test |
358c23e8f1c6
histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17687
diff
changeset
|
97 date: Thu Jan 01 00:00:00 1970 +0000 |
358c23e8f1c6
histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17687
diff
changeset
|
98 files+: c f |
358c23e8f1c6
histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17687
diff
changeset
|
99 extra: branch=default |
358c23e8f1c6
histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17687
diff
changeset
|
100 extra: histedit_source=a4f7421b80f79fcc59fff01bcbf4a53d127dd6d3,177f92b773850b59254aa5e923436f921b55483b |
358c23e8f1c6
histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17687
diff
changeset
|
101 description: |
19019
53060cc1b601
histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19018
diff
changeset
|
102 f |
53060cc1b601
histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19018
diff
changeset
|
103 *** |
53060cc1b601
histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19018
diff
changeset
|
104 c |
18437
358c23e8f1c6
histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17687
diff
changeset
|
105 |
358c23e8f1c6
histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17687
diff
changeset
|
106 |
358c23e8f1c6
histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17687
diff
changeset
|
107 |
22152
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
108 rollup will fold without preserving the folded commit's message |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
109 |
24828
5045a003260b
histedit: fix rollup prompting for a commit message (issue4606)
Durham Goode <durham@fb.com>
parents:
24771
diff
changeset
|
110 $ OLDHGEDITOR=$HGEDITOR |
5045a003260b
histedit: fix rollup prompting for a commit message (issue4606)
Durham Goode <durham@fb.com>
parents:
24771
diff
changeset
|
111 $ HGEDITOR=false |
22152
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
112 $ hg histedit d2ae7f538514 --commands - 2>&1 <<EOF | fixbundle |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
113 > pick d2ae7f538514 b |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
114 > roll ee283cb5f2d5 e |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
115 > pick 6de59d13424a f |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
116 > pick 9c277da72c9b d |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
117 > EOF |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
118 0 files updated, 0 files merged, 4 files removed, 0 files unresolved |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
119 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
120 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
121 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
122 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
123 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
124 |
24828
5045a003260b
histedit: fix rollup prompting for a commit message (issue4606)
Durham Goode <durham@fb.com>
parents:
24771
diff
changeset
|
125 $ HGEDITOR=$OLDHGEDITOR |
5045a003260b
histedit: fix rollup prompting for a commit message (issue4606)
Durham Goode <durham@fb.com>
parents:
24771
diff
changeset
|
126 |
22152
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
127 log after edit |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
128 $ hg logt --graph |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
129 @ 3:c4a9eb7989fc d |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
130 | |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
131 o 2:8e03a72b6f83 f |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
132 | |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
133 o 1:391ee782c689 b |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
134 | |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
135 o 0:cb9a9f314b8b a |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
136 |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
137 |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
138 description is taken from rollup target commit |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
139 |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
140 $ hg log --debug --rev 1 |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
141 changeset: 1:391ee782c68930be438ccf4c6a403daedbfbffa5 |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
142 phase: draft |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
143 parent: 0:cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
144 parent: -1:0000000000000000000000000000000000000000 |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
145 manifest: 1:b5e112a3a8354e269b1524729f0918662d847c38 |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
146 user: test |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
147 date: Thu Jan 01 00:00:00 1970 +0000 |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
148 files+: b e |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
149 extra: branch=default |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
150 extra: histedit_source=d2ae7f538514cd87c17547b0de4cea71fe1af9fb,ee283cb5f2d5955443f23a27b697a04339e9a39a |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
151 description: |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
152 b |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
153 |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
154 |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
155 |
20770
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
156 check saving last-message.txt |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
157 |
20859
e259d4c462b5
tests: use TESTTMP instead of TESTDIR
Sean Farley <sean.michael.farley@gmail.com>
parents:
20770
diff
changeset
|
158 $ cat > $TESTTMP/abortfolding.py <<EOF |
20770
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
159 > from mercurial import util |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
160 > def abortfolding(ui, repo, hooktype, **kwargs): |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
161 > ctx = repo[kwargs.get('node')] |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
162 > if set(ctx.files()) == set(['c', 'd', 'f']): |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
163 > return True # abort folding commit only |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
164 > ui.warn('allow non-folding commit\\n') |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
165 > EOF |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
166 $ cat > .hg/hgrc <<EOF |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
167 > [hooks] |
20859
e259d4c462b5
tests: use TESTTMP instead of TESTDIR
Sean Farley <sean.michael.farley@gmail.com>
parents:
20770
diff
changeset
|
168 > pretxncommit.abortfolding = python:$TESTTMP/abortfolding.py:abortfolding |
20770
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
169 > EOF |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
170 |
20859
e259d4c462b5
tests: use TESTTMP instead of TESTDIR
Sean Farley <sean.michael.farley@gmail.com>
parents:
20770
diff
changeset
|
171 $ cat > $TESTTMP/editor.sh << EOF |
20770
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
172 > echo "==== before editing" |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
173 > cat \$1 |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
174 > echo "====" |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
175 > echo "check saving last-message.txt" >> \$1 |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
176 > EOF |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
177 |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
178 $ rm -f .hg/last-message.txt |
23587
8063901e56cd
memctx: calculate exact status being committed from specified files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23390
diff
changeset
|
179 $ hg status --rev '8e03a72b6f83^1::c4a9eb7989fc' |
8063901e56cd
memctx: calculate exact status being committed from specified files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23390
diff
changeset
|
180 A c |
8063901e56cd
memctx: calculate exact status being committed from specified files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23390
diff
changeset
|
181 A d |
8063901e56cd
memctx: calculate exact status being committed from specified files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23390
diff
changeset
|
182 A f |
8063901e56cd
memctx: calculate exact status being committed from specified files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23390
diff
changeset
|
183 $ HGEDITOR="sh $TESTTMP/editor.sh" hg histedit 8e03a72b6f83 --commands - 2>&1 <<EOF |
22152
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
184 > pick 8e03a72b6f83 f |
d2a5986cb89d
histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents:
21947
diff
changeset
|
185 > fold c4a9eb7989fc d |
20770
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
186 > EOF |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
187 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
23587
8063901e56cd
memctx: calculate exact status being committed from specified files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23390
diff
changeset
|
188 adding d |
20770
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
189 allow non-folding commit |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
190 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
191 ==== before editing |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
192 f |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
193 *** |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
194 c |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
195 *** |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
196 d |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
197 |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
198 |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
199 |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
200 HG: Enter commit message. Lines beginning with 'HG:' are removed. |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
201 HG: Leave message empty to abort commit. |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
202 HG: -- |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
203 HG: user: test |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
204 HG: branch 'default' |
23587
8063901e56cd
memctx: calculate exact status being committed from specified files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23390
diff
changeset
|
205 HG: added c |
8063901e56cd
memctx: calculate exact status being committed from specified files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23390
diff
changeset
|
206 HG: added d |
8063901e56cd
memctx: calculate exact status being committed from specified files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23390
diff
changeset
|
207 HG: added f |
20770
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
208 ==== |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
209 transaction abort! |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
210 rollback completed |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
211 abort: pretxncommit.abortfolding hook failed |
23587
8063901e56cd
memctx: calculate exact status being committed from specified files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
23390
diff
changeset
|
212 [255] |
20770
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
213 |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
214 $ cat .hg/last-message.txt |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
215 f |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
216 *** |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
217 c |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
218 *** |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
219 d |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
220 |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
221 |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
222 |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
223 check saving last-message.txt |
5d22cadd1938
histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
224 |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
225 $ cd .. |
22147
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
226 $ rm -r r |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
227 |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
228 folding preserves initial author |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
229 -------------------------------- |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
230 |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
231 $ initrepo |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
232 |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
233 $ hg ci --user "someone else" --amend --quiet |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
234 |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
235 tip before edit |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
236 $ hg log --rev . |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
237 changeset: 5:a00ad806cb55 |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
238 tag: tip |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
239 user: someone else |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
240 date: Thu Jan 01 00:00:00 1970 +0000 |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
241 summary: f |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
242 |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
243 |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
244 $ hg histedit e860deea161a --commands - 2>&1 <<EOF | fixbundle |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
245 > pick e860deea161a e |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
246 > fold a00ad806cb55 f |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
247 > EOF |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
248 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
249 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
250 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
251 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
252 |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
253 tip after edit |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
254 $ hg log --rev . |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
255 changeset: 4:698d4e8040a1 |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
256 tag: tip |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
257 user: test |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
258 date: Thu Jan 01 00:00:00 1970 +0000 |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
259 summary: e |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
260 |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
261 |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
262 $ cd .. |
9ac98c2aa95c
histedit: preserve initial author on fold (issue4296)
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
263 $ rm -r r |
17130
0a48f3d54543
histedit: don't crash if the result of fixing up a fold is empty
Augie Fackler <raf@durin42.com>
parents:
17087
diff
changeset
|
264 |
0a48f3d54543
histedit: don't crash if the result of fixing up a fold is empty
Augie Fackler <raf@durin42.com>
parents:
17087
diff
changeset
|
265 folding and creating no new change doesn't break: |
19015
07db88f053fe
test: improve documentation of some histedit tests
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19014
diff
changeset
|
266 ------------------------------------------------- |
07db88f053fe
test: improve documentation of some histedit tests
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19014
diff
changeset
|
267 |
21024
7731a2281cf0
spelling: fixes from spell checker
Mads Kiilerich <madski@unity3d.com>
parents:
20859
diff
changeset
|
268 folded content is dropped during a merge. The folded commit should properly disappear. |
19015
07db88f053fe
test: improve documentation of some histedit tests
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19014
diff
changeset
|
269 |
17130
0a48f3d54543
histedit: don't crash if the result of fixing up a fold is empty
Augie Fackler <raf@durin42.com>
parents:
17087
diff
changeset
|
270 $ mkdir fold-to-empty-test |
0a48f3d54543
histedit: don't crash if the result of fixing up a fold is empty
Augie Fackler <raf@durin42.com>
parents:
17087
diff
changeset
|
271 $ cd fold-to-empty-test |
0a48f3d54543
histedit: don't crash if the result of fixing up a fold is empty
Augie Fackler <raf@durin42.com>
parents:
17087
diff
changeset
|
272 $ hg init |
0a48f3d54543
histedit: don't crash if the result of fixing up a fold is empty
Augie Fackler <raf@durin42.com>
parents:
17087
diff
changeset
|
273 $ printf "1\n2\n3\n" > file |
0a48f3d54543
histedit: don't crash if the result of fixing up a fold is empty
Augie Fackler <raf@durin42.com>
parents:
17087
diff
changeset
|
274 $ hg add file |
0a48f3d54543
histedit: don't crash if the result of fixing up a fold is empty
Augie Fackler <raf@durin42.com>
parents:
17087
diff
changeset
|
275 $ hg commit -m '1+2+3' |
0a48f3d54543
histedit: don't crash if the result of fixing up a fold is empty
Augie Fackler <raf@durin42.com>
parents:
17087
diff
changeset
|
276 $ echo 4 >> file |
0a48f3d54543
histedit: don't crash if the result of fixing up a fold is empty
Augie Fackler <raf@durin42.com>
parents:
17087
diff
changeset
|
277 $ hg commit -m '+4' |
0a48f3d54543
histedit: don't crash if the result of fixing up a fold is empty
Augie Fackler <raf@durin42.com>
parents:
17087
diff
changeset
|
278 $ echo 5 >> file |
0a48f3d54543
histedit: don't crash if the result of fixing up a fold is empty
Augie Fackler <raf@durin42.com>
parents:
17087
diff
changeset
|
279 $ hg commit -m '+5' |
0a48f3d54543
histedit: don't crash if the result of fixing up a fold is empty
Augie Fackler <raf@durin42.com>
parents:
17087
diff
changeset
|
280 $ echo 6 >> file |
0a48f3d54543
histedit: don't crash if the result of fixing up a fold is empty
Augie Fackler <raf@durin42.com>
parents:
17087
diff
changeset
|
281 $ hg commit -m '+6' |
19014
7b50120e8f6e
test: use a lighter log style in histedit test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
18935
diff
changeset
|
282 $ hg logt --graph |
7b50120e8f6e
test: use a lighter log style in histedit test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
18935
diff
changeset
|
283 @ 3:251d831eeec5 +6 |
17130
0a48f3d54543
histedit: don't crash if the result of fixing up a fold is empty
Augie Fackler <raf@durin42.com>
parents:
17087
diff
changeset
|
284 | |
19014
7b50120e8f6e
test: use a lighter log style in histedit test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
18935
diff
changeset
|
285 o 2:888f9082bf99 +5 |
17130
0a48f3d54543
histedit: don't crash if the result of fixing up a fold is empty
Augie Fackler <raf@durin42.com>
parents:
17087
diff
changeset
|
286 | |
19014
7b50120e8f6e
test: use a lighter log style in histedit test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
18935
diff
changeset
|
287 o 1:617f94f13c0f +4 |
17130
0a48f3d54543
histedit: don't crash if the result of fixing up a fold is empty
Augie Fackler <raf@durin42.com>
parents:
17087
diff
changeset
|
288 | |
19014
7b50120e8f6e
test: use a lighter log style in histedit test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
18935
diff
changeset
|
289 o 0:0189ba417d34 1+2+3 |
17130
0a48f3d54543
histedit: don't crash if the result of fixing up a fold is empty
Augie Fackler <raf@durin42.com>
parents:
17087
diff
changeset
|
290 |
0a48f3d54543
histedit: don't crash if the result of fixing up a fold is empty
Augie Fackler <raf@durin42.com>
parents:
17087
diff
changeset
|
291 |
19019
53060cc1b601
histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19018
diff
changeset
|
292 $ hg histedit 1 --commands - << EOF |
19016
27ec54f2946e
histedit-test: replace obscure python script by a plain file
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19015
diff
changeset
|
293 > pick 617f94f13c0f 1 +4 |
27ec54f2946e
histedit-test: replace obscure python script by a plain file
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19015
diff
changeset
|
294 > drop 888f9082bf99 2 +5 |
19017
c5c8613f265e
histedit: properly handle --continue on empty fold
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19016
diff
changeset
|
295 > fold 251d831eeec5 3 +6 |
17130
0a48f3d54543
histedit: don't crash if the result of fixing up a fold is empty
Augie Fackler <raf@durin42.com>
parents:
17087
diff
changeset
|
296 > EOF |
0a48f3d54543
histedit: don't crash if the result of fixing up a fold is empty
Augie Fackler <raf@durin42.com>
parents:
17087
diff
changeset
|
297 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
17647
d34ba4991188
histedit: replaces patching logic by merges
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17644
diff
changeset
|
298 merging file |
d34ba4991188
histedit: replaces patching logic by merges
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17644
diff
changeset
|
299 warning: conflicts during merge. |
d34ba4991188
histedit: replaces patching logic by merges
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17644
diff
changeset
|
300 merging file incomplete! (edit conflicts, then use 'hg resolve --mark') |
18934
93f3a06b2035
histedit: switch from util.Abort to util.InterventionRequired where appropriate (bc)
Augie Fackler <raf@durin42.com>
parents:
18648
diff
changeset
|
301 Fix up the change and run hg histedit --continue |
18935
e5d9441ec281
dispatch: exit with status 1 for an InterventionRequired exception (bc)
Augie Fackler <raf@durin42.com>
parents:
18934
diff
changeset
|
302 [1] |
17647
d34ba4991188
histedit: replaces patching logic by merges
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17644
diff
changeset
|
303 There were conflicts, we keep P1 content. This |
17130
0a48f3d54543
histedit: don't crash if the result of fixing up a fold is empty
Augie Fackler <raf@durin42.com>
parents:
17087
diff
changeset
|
304 should effectively drop the changes from +6. |
0a48f3d54543
histedit: don't crash if the result of fixing up a fold is empty
Augie Fackler <raf@durin42.com>
parents:
17087
diff
changeset
|
305 $ hg status |
17647
d34ba4991188
histedit: replaces patching logic by merges
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17644
diff
changeset
|
306 M file |
d34ba4991188
histedit: replaces patching logic by merges
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17644
diff
changeset
|
307 ? file.orig |
d34ba4991188
histedit: replaces patching logic by merges
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17644
diff
changeset
|
308 $ hg resolve -l |
d34ba4991188
histedit: replaces patching logic by merges
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17644
diff
changeset
|
309 U file |
d34ba4991188
histedit: replaces patching logic by merges
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17644
diff
changeset
|
310 $ hg revert -r 'p1()' file |
d34ba4991188
histedit: replaces patching logic by merges
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17644
diff
changeset
|
311 $ hg resolve --mark file |
21947
b081decd9062
resolve: add parenthesis around "no more unresolved files" message
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21267
diff
changeset
|
312 (no more unresolved files) |
17130
0a48f3d54543
histedit: don't crash if the result of fixing up a fold is empty
Augie Fackler <raf@durin42.com>
parents:
17087
diff
changeset
|
313 $ hg histedit --continue |
24771
3133e246c912
histedit: convert fold/roll actions into a class
Durham Goode <durham@fb.com>
parents:
23835
diff
changeset
|
314 251d831eeec5: empty changeset |
17130
0a48f3d54543
histedit: don't crash if the result of fixing up a fold is empty
Augie Fackler <raf@durin42.com>
parents:
17087
diff
changeset
|
315 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
0a48f3d54543
histedit: don't crash if the result of fixing up a fold is empty
Augie Fackler <raf@durin42.com>
parents:
17087
diff
changeset
|
316 saved backup bundle to $TESTTMP/*-backup.hg (glob) |
19014
7b50120e8f6e
test: use a lighter log style in histedit test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
18935
diff
changeset
|
317 $ hg logt --graph |
7b50120e8f6e
test: use a lighter log style in histedit test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
18935
diff
changeset
|
318 @ 1:617f94f13c0f +4 |
17130
0a48f3d54543
histedit: don't crash if the result of fixing up a fold is empty
Augie Fackler <raf@durin42.com>
parents:
17087
diff
changeset
|
319 | |
19014
7b50120e8f6e
test: use a lighter log style in histedit test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
18935
diff
changeset
|
320 o 0:0189ba417d34 1+2+3 |
17130
0a48f3d54543
histedit: don't crash if the result of fixing up a fold is empty
Augie Fackler <raf@durin42.com>
parents:
17087
diff
changeset
|
321 |
0a48f3d54543
histedit: don't crash if the result of fixing up a fold is empty
Augie Fackler <raf@durin42.com>
parents:
17087
diff
changeset
|
322 |
0a48f3d54543
histedit: don't crash if the result of fixing up a fold is empty
Augie Fackler <raf@durin42.com>
parents:
17087
diff
changeset
|
323 $ cd .. |
17242
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
324 |
19015
07db88f053fe
test: improve documentation of some histedit tests
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19014
diff
changeset
|
325 |
07db88f053fe
test: improve documentation of some histedit tests
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19014
diff
changeset
|
326 Test fold through dropped |
07db88f053fe
test: improve documentation of some histedit tests
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19014
diff
changeset
|
327 ------------------------- |
07db88f053fe
test: improve documentation of some histedit tests
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19014
diff
changeset
|
328 |
07db88f053fe
test: improve documentation of some histedit tests
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19014
diff
changeset
|
329 |
17242
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
330 Test corner case where folded revision is separated from its parent by a |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
331 dropped revision. |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
332 |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
333 |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
334 $ hg init fold-with-dropped |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
335 $ cd fold-with-dropped |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
336 $ printf "1\n2\n3\n" > file |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
337 $ hg commit -Am '1+2+3' |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
338 adding file |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
339 $ echo 4 >> file |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
340 $ hg commit -m '+4' |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
341 $ echo 5 >> file |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
342 $ hg commit -m '+5' |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
343 $ echo 6 >> file |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
344 $ hg commit -m '+6' |
19391
347ccd936fa6
test-histedit-fold: remove unnecessary --template
Martin Geisler <martin@geisler.net>
parents:
19019
diff
changeset
|
345 $ hg logt -G |
17242
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
346 @ 3:251d831eeec5 +6 |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
347 | |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
348 o 2:888f9082bf99 +5 |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
349 | |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
350 o 1:617f94f13c0f +4 |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
351 | |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
352 o 0:0189ba417d34 1+2+3 |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
353 |
19019
53060cc1b601
histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
19018
diff
changeset
|
354 $ hg histedit 1 --commands - << EOF |
17242
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
355 > pick 617f94f13c0f 1 +4 |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
356 > drop 888f9082bf99 2 +5 |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
357 > fold 251d831eeec5 3 +6 |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
358 > EOF |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
359 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
17647
d34ba4991188
histedit: replaces patching logic by merges
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17644
diff
changeset
|
360 merging file |
d34ba4991188
histedit: replaces patching logic by merges
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17644
diff
changeset
|
361 warning: conflicts during merge. |
d34ba4991188
histedit: replaces patching logic by merges
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17644
diff
changeset
|
362 merging file incomplete! (edit conflicts, then use 'hg resolve --mark') |
18934
93f3a06b2035
histedit: switch from util.Abort to util.InterventionRequired where appropriate (bc)
Augie Fackler <raf@durin42.com>
parents:
18648
diff
changeset
|
363 Fix up the change and run hg histedit --continue |
18935
e5d9441ec281
dispatch: exit with status 1 for an InterventionRequired exception (bc)
Augie Fackler <raf@durin42.com>
parents:
18934
diff
changeset
|
364 [1] |
17647
d34ba4991188
histedit: replaces patching logic by merges
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17644
diff
changeset
|
365 $ cat > file << EOF |
d34ba4991188
histedit: replaces patching logic by merges
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17644
diff
changeset
|
366 > 1 |
d34ba4991188
histedit: replaces patching logic by merges
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17644
diff
changeset
|
367 > 2 |
d34ba4991188
histedit: replaces patching logic by merges
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17644
diff
changeset
|
368 > 3 |
d34ba4991188
histedit: replaces patching logic by merges
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17644
diff
changeset
|
369 > 4 |
d34ba4991188
histedit: replaces patching logic by merges
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17644
diff
changeset
|
370 > 5 |
d34ba4991188
histedit: replaces patching logic by merges
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17644
diff
changeset
|
371 > EOF |
d34ba4991188
histedit: replaces patching logic by merges
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
17644
diff
changeset
|
372 $ hg resolve --mark file |
21947
b081decd9062
resolve: add parenthesis around "no more unresolved files" message
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21267
diff
changeset
|
373 (no more unresolved files) |
19496
607191a45f8c
checkunfinished: accommodate histedit quirk
Matt Mackall <mpm@selenic.com>
parents:
19479
diff
changeset
|
374 $ hg commit -m '+5.2' |
17242
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
375 created new head |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
376 $ echo 6 >> file |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
377 $ HGEDITOR=cat hg histedit --continue |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
378 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
379 +4 |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
380 *** |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
381 +5.2 |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
382 *** |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
383 +6 |
17644
9ae073f10572
histedit: fold in memory
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17257
diff
changeset
|
384 |
9ae073f10572
histedit: fold in memory
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17257
diff
changeset
|
385 |
9ae073f10572
histedit: fold in memory
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17257
diff
changeset
|
386 |
9ae073f10572
histedit: fold in memory
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17257
diff
changeset
|
387 HG: Enter commit message. Lines beginning with 'HG:' are removed. |
9ae073f10572
histedit: fold in memory
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17257
diff
changeset
|
388 HG: Leave message empty to abort commit. |
9ae073f10572
histedit: fold in memory
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17257
diff
changeset
|
389 HG: -- |
9ae073f10572
histedit: fold in memory
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17257
diff
changeset
|
390 HG: user: test |
9ae073f10572
histedit: fold in memory
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17257
diff
changeset
|
391 HG: branch 'default' |
9ae073f10572
histedit: fold in memory
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17257
diff
changeset
|
392 HG: changed file |
9ae073f10572
histedit: fold in memory
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17257
diff
changeset
|
393 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
17242
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
394 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
23835
aa4a1672583e
bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents:
23587
diff
changeset
|
395 saved backup bundle to $TESTTMP/fold-with-dropped/.hg/strip-backup/617f94f13c0f-3d69522c-backup.hg (glob) |
19014
7b50120e8f6e
test: use a lighter log style in histedit test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
18935
diff
changeset
|
396 $ hg logt -G |
7b50120e8f6e
test: use a lighter log style in histedit test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
18935
diff
changeset
|
397 @ 1:10c647b2cdd5 +4 |
17687
8853f37b1e62
histedit-test: make test-fold more verbose
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17647
diff
changeset
|
398 | |
19014
7b50120e8f6e
test: use a lighter log style in histedit test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
18935
diff
changeset
|
399 o 0:0189ba417d34 1+2+3 |
17687
8853f37b1e62
histedit-test: make test-fold more verbose
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17647
diff
changeset
|
400 |
8853f37b1e62
histedit-test: make test-fold more verbose
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17647
diff
changeset
|
401 $ hg export tip |
8853f37b1e62
histedit-test: make test-fold more verbose
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17647
diff
changeset
|
402 # HG changeset patch |
8853f37b1e62
histedit-test: make test-fold more verbose
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17647
diff
changeset
|
403 # User test |
8853f37b1e62
histedit-test: make test-fold more verbose
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17647
diff
changeset
|
404 # Date 0 0 |
18648
76b69cccb07a
export: show 'Date' header in a format that also is readable for humans
Mads Kiilerich <mads@kiilerich.com>
parents:
18437
diff
changeset
|
405 # Thu Jan 01 00:00:00 1970 +0000 |
18437
358c23e8f1c6
histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17687
diff
changeset
|
406 # Node ID 10c647b2cdd54db0603ecb99b2ff5ce66d5a5323 |
17687
8853f37b1e62
histedit-test: make test-fold more verbose
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17647
diff
changeset
|
407 # Parent 0189ba417d34df9dda55f88b637dcae9917b5964 |
8853f37b1e62
histedit-test: make test-fold more verbose
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17647
diff
changeset
|
408 +4 |
8853f37b1e62
histedit-test: make test-fold more verbose
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17647
diff
changeset
|
409 *** |
8853f37b1e62
histedit-test: make test-fold more verbose
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17647
diff
changeset
|
410 +5.2 |
8853f37b1e62
histedit-test: make test-fold more verbose
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17647
diff
changeset
|
411 *** |
8853f37b1e62
histedit-test: make test-fold more verbose
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17647
diff
changeset
|
412 +6 |
8853f37b1e62
histedit-test: make test-fold more verbose
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17647
diff
changeset
|
413 |
18437
358c23e8f1c6
histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17687
diff
changeset
|
414 diff -r 0189ba417d34 -r 10c647b2cdd5 file |
17687
8853f37b1e62
histedit-test: make test-fold more verbose
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17647
diff
changeset
|
415 --- a/file Thu Jan 01 00:00:00 1970 +0000 |
8853f37b1e62
histedit-test: make test-fold more verbose
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17647
diff
changeset
|
416 +++ b/file Thu Jan 01 00:00:00 1970 +0000 |
8853f37b1e62
histedit-test: make test-fold more verbose
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17647
diff
changeset
|
417 @@ -1,3 +1,6 @@ |
8853f37b1e62
histedit-test: make test-fold more verbose
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17647
diff
changeset
|
418 1 |
8853f37b1e62
histedit-test: make test-fold more verbose
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17647
diff
changeset
|
419 2 |
8853f37b1e62
histedit-test: make test-fold more verbose
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17647
diff
changeset
|
420 3 |
8853f37b1e62
histedit-test: make test-fold more verbose
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17647
diff
changeset
|
421 +4 |
8853f37b1e62
histedit-test: make test-fold more verbose
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17647
diff
changeset
|
422 +5 |
8853f37b1e62
histedit-test: make test-fold more verbose
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17647
diff
changeset
|
423 +6 |
17242
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
424 $ cd .. |
336121088ef1
histedit: fix new nodes computation with --continue (issue3534)
Patrick Mezard <patrick@mezard.eu>
parents:
17130
diff
changeset
|
425 |
19392
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
426 |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
427 Folding with initial rename (issue3729) |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
428 --------------------------------------- |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
429 |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
430 $ hg init fold-rename |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
431 $ cd fold-rename |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
432 $ echo a > a.txt |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
433 $ hg add a.txt |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
434 $ hg commit -m a |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
435 $ hg rename a.txt b.txt |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
436 $ hg commit -m rename |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
437 $ echo b >> b.txt |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
438 $ hg commit -m b |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
439 |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
440 $ hg logt --follow b.txt |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
441 2:e0371e0426bc b |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
442 1:1c4f440a8085 rename |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
443 0:6c795aa153cb a |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
444 |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
445 $ hg histedit 1c4f440a8085 --commands - 2>&1 << EOF | fixbundle |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
446 > pick 1c4f440a8085 rename |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
447 > fold e0371e0426bc b |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
448 > EOF |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
449 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
450 reverting b.txt |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
451 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
452 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
453 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
454 |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
455 $ hg logt --follow b.txt |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
456 1:cf858d235c76 rename |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
457 0:6c795aa153cb a |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
458 |
f6b047cf9272
histedit: use base for computing renames when folding (issue3729)
Martin Geisler <martin@geisler.net>
parents:
19391
diff
changeset
|
459 $ cd .. |
23129
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
460 |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
461 Folding with swapping |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
462 --------------------- |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
463 |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
464 This is an excuse to test hook with histedit temporary commit (issue4422) |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
465 |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
466 |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
467 $ hg init issue4422 |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
468 $ cd issue4422 |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
469 $ echo a > a.txt |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
470 $ hg add a.txt |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
471 $ hg commit -m a |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
472 $ echo b > b.txt |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
473 $ hg add b.txt |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
474 $ hg commit -m b |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
475 $ echo c > c.txt |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
476 $ hg add c.txt |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
477 $ hg commit -m c |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
478 |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
479 $ hg logt |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
480 2:a1a953ffb4b0 c |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
481 1:199b6bb90248 b |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
482 0:6c795aa153cb a |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
483 |
23390
6a3e38a173ec
tests: choose the proper environment variable style for the platform
Matt Harbison <matt_harbison@yahoo.com>
parents:
23129
diff
changeset
|
484 Setup the proper environment variable symbol for the platform, to be subbed |
6a3e38a173ec
tests: choose the proper environment variable style for the platform
Matt Harbison <matt_harbison@yahoo.com>
parents:
23129
diff
changeset
|
485 into the hook command. |
6a3e38a173ec
tests: choose the proper environment variable style for the platform
Matt Harbison <matt_harbison@yahoo.com>
parents:
23129
diff
changeset
|
486 #if windows |
6a3e38a173ec
tests: choose the proper environment variable style for the platform
Matt Harbison <matt_harbison@yahoo.com>
parents:
23129
diff
changeset
|
487 $ NODE="%HG_NODE%" |
6a3e38a173ec
tests: choose the proper environment variable style for the platform
Matt Harbison <matt_harbison@yahoo.com>
parents:
23129
diff
changeset
|
488 #else |
6a3e38a173ec
tests: choose the proper environment variable style for the platform
Matt Harbison <matt_harbison@yahoo.com>
parents:
23129
diff
changeset
|
489 $ NODE="\$HG_NODE" |
6a3e38a173ec
tests: choose the proper environment variable style for the platform
Matt Harbison <matt_harbison@yahoo.com>
parents:
23129
diff
changeset
|
490 #endif |
6a3e38a173ec
tests: choose the proper environment variable style for the platform
Matt Harbison <matt_harbison@yahoo.com>
parents:
23129
diff
changeset
|
491 $ hg histedit 6c795aa153cb --config hooks.commit="echo commit $NODE" --commands - 2>&1 << EOF | fixbundle |
23129
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
492 > pick 199b6bb90248 b |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
493 > fold a1a953ffb4b0 c |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
494 > pick 6c795aa153cb a |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
495 > EOF |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
496 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
497 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
498 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
499 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
500 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
501 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
502 commit 9599899f62c05f4377548c32bf1c9f1a39634b0c |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
503 |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
504 $ hg logt |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
505 1:9599899f62c0 a |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
506 0:79b99e9c8e49 b |
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
507 |
26025
ba8089433090
largefiles: ensure lfutil.getstandinmatcher() only matches standins
Matt Harbison <matt_harbison@yahoo.com>
parents:
24828
diff
changeset
|
508 $ echo "foo" > amended.txt |
ba8089433090
largefiles: ensure lfutil.getstandinmatcher() only matches standins
Matt Harbison <matt_harbison@yahoo.com>
parents:
24828
diff
changeset
|
509 $ hg add amended.txt |
ba8089433090
largefiles: ensure lfutil.getstandinmatcher() only matches standins
Matt Harbison <matt_harbison@yahoo.com>
parents:
24828
diff
changeset
|
510 $ hg ci -q --config extensions.largefiles= --amend -I amended.txt |
ba8089433090
largefiles: ensure lfutil.getstandinmatcher() only matches standins
Matt Harbison <matt_harbison@yahoo.com>
parents:
24828
diff
changeset
|
511 |
26246
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
512 Test that folding multiple changes in a row doesn't show multiple |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
513 editors. |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
514 |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
515 $ echo foo >> foo |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
516 $ hg add foo |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
517 $ hg ci -m foo1 |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
518 $ echo foo >> foo |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
519 $ hg ci -m foo2 |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
520 $ echo foo >> foo |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
521 $ hg ci -m foo3 |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
522 $ hg logt |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
523 4:21679ff7675c foo3 |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
524 3:b7389cc4d66e foo2 |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
525 2:0e01aeef5fa8 foo1 |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
526 1:578c7455730c a |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
527 0:79b99e9c8e49 b |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
528 $ cat > $TESTTMP/editor.sh <<EOF |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
529 > echo ran editor >> $TESTTMP/editorlog.txt |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
530 > cat \$1 >> $TESTTMP/editorlog.txt |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
531 > echo END >> $TESTTMP/editorlog.txt |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
532 > echo merged foos > \$1 |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
533 > EOF |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
534 $ HGEDITOR="sh $TESTTMP/editor.sh" hg histedit 1 --commands - 2>&1 <<EOF | fixbundle |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
535 > pick 578c7455730c 1 a |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
536 > pick 0e01aeef5fa8 2 foo1 |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
537 > fold b7389cc4d66e 3 foo2 |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
538 > fold 21679ff7675c 4 foo3 |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
539 > EOF |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
540 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
541 reverting foo |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
542 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
543 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
544 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
545 merging foo |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
546 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
547 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
548 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
549 $ hg logt |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
550 2:e8bedbda72c1 merged foos |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
551 1:578c7455730c a |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
552 0:79b99e9c8e49 b |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
553 Editor should have run only once |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
554 $ cat $TESTTMP/editorlog.txt |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
555 ran editor |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
556 foo1 |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
557 *** |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
558 foo2 |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
559 *** |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
560 foo3 |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
561 |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
562 |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
563 |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
564 HG: Enter commit message. Lines beginning with 'HG:' are removed. |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
565 HG: Leave message empty to abort commit. |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
566 HG: -- |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
567 HG: user: test |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
568 HG: branch 'default' |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
569 HG: added foo |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
570 END |
bf81b696b8f4
histedit: use one editor when multiple folds happen in a row (issue3524) (BC)
Augie Fackler <augie@google.com>
parents:
26025
diff
changeset
|
571 |
23129
eb315418224c
hook: protect commit hooks against stripping of temporary commit (issue4422)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22165
diff
changeset
|
572 $ cd .. |