annotate tests/test-histedit-edit.t @ 42813:268662aac075

interfaces: create a new folder for interfaces and move repository.py in it I was trying to understand current interfaces and write new ones and I realized we need to improve how current interfaces are organised. This creates a dedicated folder for defining interfaces and move `repository.py` which defines all the current interfaces inside it. Differential Revision: https://phab.mercurial-scm.org/D6741
author Pulkit Goyal <pulkit@yandex-team.ru>
date Sun, 18 Aug 2019 00:45:33 +0300
parents 15d2afa31e57
children c6d31e659a28
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
1 $ . "$TESTDIR/histedit-helpers.sh"
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
2
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
3 $ cat >> $HGRCPATH <<EOF
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
4 > [extensions]
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
5 > histedit=
24111
11d72683f3de histedit: don't allow to strip nodes which are necessary to continue histedit
Mateusz Kwapich <mitrandir@fb.com>
parents: 23835
diff changeset
6 > strip=
41213
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
7 > mockmakedate = $TESTDIR/mockmakedate.py
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
8 > EOF
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
9
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
10 $ initrepo ()
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
11 > {
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
12 > hg init r
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
13 > cd r
24142
be7cb25186be histedit: add --edit-plan option to histedit
Mateusz Kwapich <mitrandir@fb.com>
parents: 24111
diff changeset
14 > for x in a b c d e f g; do
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
15 > echo $x > $x
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
16 > hg add $x
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
17 > hg ci -m $x
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
18 > done
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
19 > }
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
20
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
21 $ initrepo
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
22
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
23 log before edit
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
24 $ hg log --graph
24142
be7cb25186be histedit: add --edit-plan option to histedit
Mateusz Kwapich <mitrandir@fb.com>
parents: 24111
diff changeset
25 @ changeset: 6:3c6a8ed2ebe8
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
26 | tag: tip
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
27 | user: test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
28 | date: Thu Jan 01 00:00:00 1970 +0000
24142
be7cb25186be histedit: add --edit-plan option to histedit
Mateusz Kwapich <mitrandir@fb.com>
parents: 24111
diff changeset
29 | summary: g
be7cb25186be histedit: add --edit-plan option to histedit
Mateusz Kwapich <mitrandir@fb.com>
parents: 24111
diff changeset
30 |
be7cb25186be histedit: add --edit-plan option to histedit
Mateusz Kwapich <mitrandir@fb.com>
parents: 24111
diff changeset
31 o changeset: 5:652413bf663e
be7cb25186be histedit: add --edit-plan option to histedit
Mateusz Kwapich <mitrandir@fb.com>
parents: 24111
diff changeset
32 | user: test
be7cb25186be histedit: add --edit-plan option to histedit
Mateusz Kwapich <mitrandir@fb.com>
parents: 24111
diff changeset
33 | date: Thu Jan 01 00:00:00 1970 +0000
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
34 | summary: f
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
35 |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
36 o changeset: 4:e860deea161a
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
37 | user: test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
38 | date: Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
39 | summary: e
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
40 |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
41 o changeset: 3:055a42cdd887
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
42 | user: test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
43 | date: Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
44 | summary: d
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
45 |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
46 o changeset: 2:177f92b77385
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
47 | user: test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
48 | date: Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
49 | summary: c
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
50 |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
51 o changeset: 1:d2ae7f538514
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
52 | user: test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
53 | date: Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
54 | summary: b
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
55 |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
56 o changeset: 0:cb9a9f314b8b
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
57 user: test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
58 date: Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
59 summary: a
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
60
27544
a4f008612727 test-histedit-edit: test histedit with dirty repo
timeless <timeless@mozdev.org>
parents: 27542
diff changeset
61 dirty a file
a4f008612727 test-histedit-edit: test histedit with dirty repo
timeless <timeless@mozdev.org>
parents: 27542
diff changeset
62 $ echo a > g
a4f008612727 test-histedit-edit: test histedit with dirty repo
timeless <timeless@mozdev.org>
parents: 27542
diff changeset
63 $ hg histedit 177f92b77385 --commands - 2>&1 << EOF
a4f008612727 test-histedit-edit: test histedit with dirty repo
timeless <timeless@mozdev.org>
parents: 27542
diff changeset
64 > EOF
a4f008612727 test-histedit-edit: test histedit with dirty repo
timeless <timeless@mozdev.org>
parents: 27542
diff changeset
65 abort: uncommitted changes
a4f008612727 test-histedit-edit: test histedit with dirty repo
timeless <timeless@mozdev.org>
parents: 27542
diff changeset
66 [255]
a4f008612727 test-histedit-edit: test histedit with dirty repo
timeless <timeless@mozdev.org>
parents: 27542
diff changeset
67 $ echo g > g
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
68
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
69 edit the history
19019
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18942
diff changeset
70 $ hg histedit 177f92b77385 --commands - 2>&1 << EOF| fixbundle
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18942
diff changeset
71 > pick 177f92b77385 c
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18942
diff changeset
72 > pick 055a42cdd887 d
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18942
diff changeset
73 > edit e860deea161a e
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18942
diff changeset
74 > pick 652413bf663e f
24142
be7cb25186be histedit: add --edit-plan option to histedit
Mateusz Kwapich <mitrandir@fb.com>
parents: 24111
diff changeset
75 > pick 3c6a8ed2ebe8 g
19019
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18942
diff changeset
76 > EOF
24142
be7cb25186be histedit: add --edit-plan option to histedit
Mateusz Kwapich <mitrandir@fb.com>
parents: 24111
diff changeset
77 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
27629
e7ff83b2bcfe histedit: list action when intervention is required
timeless <timeless@mozdev.org>
parents: 27545
diff changeset
78 Editing (e860deea161a), you may commit or record as needed now.
e7ff83b2bcfe histedit: list action when intervention is required
timeless <timeless@mozdev.org>
parents: 27545
diff changeset
79 (hg histedit --continue to resume)
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
80
28890
468339891670 tests: ensure that 'hg update' is disabled during histedit (issue3655)
Jason Gauci <jjg@fb.com>
parents: 28396
diff changeset
81 try to update and get an error
468339891670 tests: ensure that 'hg update' is disabled during histedit (issue3655)
Jason Gauci <jjg@fb.com>
parents: 28396
diff changeset
82 $ hg update tip
468339891670 tests: ensure that 'hg update' is disabled during histedit (issue3655)
Jason Gauci <jjg@fb.com>
parents: 28396
diff changeset
83 abort: histedit in progress
468339891670 tests: ensure that 'hg update' is disabled during histedit (issue3655)
Jason Gauci <jjg@fb.com>
parents: 28396
diff changeset
84 (use 'hg histedit --continue' or 'hg histedit --abort')
468339891670 tests: ensure that 'hg update' is disabled during histedit (issue3655)
Jason Gauci <jjg@fb.com>
parents: 28396
diff changeset
85 [255]
468339891670 tests: ensure that 'hg update' is disabled during histedit (issue3655)
Jason Gauci <jjg@fb.com>
parents: 28396
diff changeset
86
24920
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
87 edit the plan via the editor
24933
5bc506ee87d2 histedit: fix test-histedit-edit on vfat
Durham Goode <durham@fb.com>
parents: 24920
diff changeset
88 $ cat >> $TESTTMP/editplan.sh <<EOF
24920
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
89 > cat > \$1 <<EOF2
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
90 > drop e860deea161a e
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
91 > drop 652413bf663e f
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
92 > drop 3c6a8ed2ebe8 g
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
93 > EOF2
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
94 > EOF
24933
5bc506ee87d2 histedit: fix test-histedit-edit on vfat
Durham Goode <durham@fb.com>
parents: 24920
diff changeset
95 $ HGEDITOR="sh $TESTTMP/editplan.sh" hg histedit --edit-plan
24920
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
96 $ cat .hg/histedit-state
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
97 v1
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
98 055a42cdd88768532f9cf79daa407fc8d138de9b
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
99 3c6a8ed2ebe862cc949d2caa30775dd6f16fb799
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
100 False
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
101 3
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
102 drop
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
103 e860deea161a2f77de56603b340ebbb4536308ae
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
104 drop
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
105 652413bf663ef2a641cab26574e46d5f5a64a55a
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
106 drop
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
107 3c6a8ed2ebe862cc949d2caa30775dd6f16fb799
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
108 0
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
109 strip-backup/177f92b77385-0ebe6a8f-histedit.hg
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
110
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
111 edit the plan via --commands
24142
be7cb25186be histedit: add --edit-plan option to histedit
Mateusz Kwapich <mitrandir@fb.com>
parents: 24111
diff changeset
112 $ hg histedit --edit-plan --commands - 2>&1 << EOF
be7cb25186be histedit: add --edit-plan option to histedit
Mateusz Kwapich <mitrandir@fb.com>
parents: 24111
diff changeset
113 > edit e860deea161a e
be7cb25186be histedit: add --edit-plan option to histedit
Mateusz Kwapich <mitrandir@fb.com>
parents: 24111
diff changeset
114 > pick 652413bf663e f
be7cb25186be histedit: add --edit-plan option to histedit
Mateusz Kwapich <mitrandir@fb.com>
parents: 24111
diff changeset
115 > drop 3c6a8ed2ebe8 g
be7cb25186be histedit: add --edit-plan option to histedit
Mateusz Kwapich <mitrandir@fb.com>
parents: 24111
diff changeset
116 > EOF
24920
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
117 $ cat .hg/histedit-state
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
118 v1
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
119 055a42cdd88768532f9cf79daa407fc8d138de9b
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
120 3c6a8ed2ebe862cc949d2caa30775dd6f16fb799
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
121 False
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
122 3
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
123 edit
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
124 e860deea161a2f77de56603b340ebbb4536308ae
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
125 pick
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
126 652413bf663ef2a641cab26574e46d5f5a64a55a
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
127 drop
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
128 3c6a8ed2ebe862cc949d2caa30775dd6f16fb799
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
129 0
b5eb01500696 histedit: fix --edit-plan
Durham Goode <durham@fb.com>
parents: 24757
diff changeset
130 strip-backup/177f92b77385-0ebe6a8f-histedit.hg
24142
be7cb25186be histedit: add --edit-plan option to histedit
Mateusz Kwapich <mitrandir@fb.com>
parents: 24111
diff changeset
131
17749
40601f2b7608 histedit: simplify computation of `newchildren` during --continue
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17087
diff changeset
132 Go at a random point and try to continue
40601f2b7608 histedit: simplify computation of `newchildren` during --continue
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17087
diff changeset
133
40601f2b7608 histedit: simplify computation of `newchildren` during --continue
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17087
diff changeset
134 $ hg id -n
40601f2b7608 histedit: simplify computation of `newchildren` during --continue
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17087
diff changeset
135 3+
40601f2b7608 histedit: simplify computation of `newchildren` during --continue
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17087
diff changeset
136 $ hg up 0
19479
11664641fbad histedit: add checkunfinished support (issue3955)
Matt Mackall <mpm@selenic.com>
parents: 19215
diff changeset
137 abort: histedit in progress
11664641fbad histedit: add checkunfinished support (issue3955)
Matt Mackall <mpm@selenic.com>
parents: 19215
diff changeset
138 (use 'hg histedit --continue' or 'hg histedit --abort')
17749
40601f2b7608 histedit: simplify computation of `newchildren` during --continue
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17087
diff changeset
139 [255]
40601f2b7608 histedit: simplify computation of `newchildren` during --continue
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17087
diff changeset
140
24111
11d72683f3de histedit: don't allow to strip nodes which are necessary to continue histedit
Mateusz Kwapich <mitrandir@fb.com>
parents: 23835
diff changeset
141 Try to delete necessary commit
24626
e767f5aba810 histedit: fix preventing strips during histedit
Durham Goode <durham@fb.com>
parents: 24299
diff changeset
142 $ hg strip -r 652413b
e767f5aba810 histedit: fix preventing strips during histedit
Durham Goode <durham@fb.com>
parents: 24299
diff changeset
143 abort: histedit in progress, can't strip 652413bf663e
24111
11d72683f3de histedit: don't allow to strip nodes which are necessary to continue histedit
Mateusz Kwapich <mitrandir@fb.com>
parents: 23835
diff changeset
144 [255]
11d72683f3de histedit: don't allow to strip nodes which are necessary to continue histedit
Mateusz Kwapich <mitrandir@fb.com>
parents: 23835
diff changeset
145
19496
607191a45f8c checkunfinished: accommodate histedit quirk
Matt Mackall <mpm@selenic.com>
parents: 19479
diff changeset
146 commit, then edit the revision
607191a45f8c checkunfinished: accommodate histedit quirk
Matt Mackall <mpm@selenic.com>
parents: 19479
diff changeset
147 $ hg ci -m 'wat'
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
148 created new head
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
149 $ echo a > e
24299
68d998a76994 test-histedit-edit.t: demonstrate qnew fails during a histedit (issue4366)
Augie Fackler <augie@google.com>
parents: 24196
diff changeset
150
68d998a76994 test-histedit-edit.t: demonstrate qnew fails during a histedit (issue4366)
Augie Fackler <augie@google.com>
parents: 24196
diff changeset
151 qnew should fail while we're in the middle of the edit step
68d998a76994 test-histedit-edit.t: demonstrate qnew fails during a histedit (issue4366)
Augie Fackler <augie@google.com>
parents: 24196
diff changeset
152
68d998a76994 test-histedit-edit.t: demonstrate qnew fails during a histedit (issue4366)
Augie Fackler <augie@google.com>
parents: 24196
diff changeset
153 $ hg --config extensions.mq= qnew please-fail
68d998a76994 test-histedit-edit.t: demonstrate qnew fails during a histedit (issue4366)
Augie Fackler <augie@google.com>
parents: 24196
diff changeset
154 abort: histedit in progress
68d998a76994 test-histedit-edit.t: demonstrate qnew fails during a histedit (issue4366)
Augie Fackler <augie@google.com>
parents: 24196
diff changeset
155 (use 'hg histedit --continue' or 'hg histedit --abort')
68d998a76994 test-histedit-edit.t: demonstrate qnew fails during a histedit (issue4366)
Augie Fackler <augie@google.com>
parents: 24196
diff changeset
156 [255]
17087
a79776f427b4 tests: make histedit pass on Windows MSYS
Mads Kiilerich <mads@kiilerich.com>
parents: 17086
diff changeset
157 $ HGEDITOR='echo foobaz > ' hg histedit --continue 2>&1 | fixbundle
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
158
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
159 $ hg log --graph
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17749
diff changeset
160 @ changeset: 6:b5f70786f9b0
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
161 | tag: tip
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
162 | user: test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
163 | date: Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
164 | summary: f
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
165 |
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17749
diff changeset
166 o changeset: 5:a5e1ba2f7afb
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
167 | user: test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
168 | date: Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
169 | summary: foobaz
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
170 |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
171 o changeset: 4:1a60820cd1f6
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
172 | user: test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
173 | date: Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
174 | summary: wat
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
175 |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
176 o changeset: 3:055a42cdd887
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
177 | user: test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
178 | date: Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
179 | summary: d
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
180 |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
181 o changeset: 2:177f92b77385
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
182 | user: test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
183 | date: Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
184 | summary: c
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
185 |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
186 o changeset: 1:d2ae7f538514
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
187 | user: test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
188 | date: Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
189 | summary: b
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
190 |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
191 o changeset: 0:cb9a9f314b8b
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
192 user: test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
193 date: Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
194 summary: a
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
195
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
196
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
197 $ hg cat e
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
198 a
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
199
24757
7b59f16174c5 histedit: store backup file before histedit
Durham Goode <durham@fb.com>
parents: 24626
diff changeset
200 Stripping necessary commits should not break --abort
7b59f16174c5 histedit: store backup file before histedit
Durham Goode <durham@fb.com>
parents: 24626
diff changeset
201
7b59f16174c5 histedit: store backup file before histedit
Durham Goode <durham@fb.com>
parents: 24626
diff changeset
202 $ hg histedit 1a60820cd1f6 --commands - 2>&1 << EOF| fixbundle
7b59f16174c5 histedit: store backup file before histedit
Durham Goode <durham@fb.com>
parents: 24626
diff changeset
203 > edit 1a60820cd1f6 wat
7b59f16174c5 histedit: store backup file before histedit
Durham Goode <durham@fb.com>
parents: 24626
diff changeset
204 > pick a5e1ba2f7afb foobaz
7b59f16174c5 histedit: store backup file before histedit
Durham Goode <durham@fb.com>
parents: 24626
diff changeset
205 > pick b5f70786f9b0 g
7b59f16174c5 histedit: store backup file before histedit
Durham Goode <durham@fb.com>
parents: 24626
diff changeset
206 > EOF
7b59f16174c5 histedit: store backup file before histedit
Durham Goode <durham@fb.com>
parents: 24626
diff changeset
207 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
27629
e7ff83b2bcfe histedit: list action when intervention is required
timeless <timeless@mozdev.org>
parents: 27545
diff changeset
208 Editing (1a60820cd1f6), you may commit or record as needed now.
e7ff83b2bcfe histedit: list action when intervention is required
timeless <timeless@mozdev.org>
parents: 27545
diff changeset
209 (hg histedit --continue to resume)
24757
7b59f16174c5 histedit: store backup file before histedit
Durham Goode <durham@fb.com>
parents: 24626
diff changeset
210
7b59f16174c5 histedit: store backup file before histedit
Durham Goode <durham@fb.com>
parents: 24626
diff changeset
211 $ mv .hg/histedit-state .hg/histedit-state.bak
7b59f16174c5 histedit: store backup file before histedit
Durham Goode <durham@fb.com>
parents: 24626
diff changeset
212 $ hg strip -q -r b5f70786f9b0
7b59f16174c5 histedit: store backup file before histedit
Durham Goode <durham@fb.com>
parents: 24626
diff changeset
213 $ mv .hg/histedit-state.bak .hg/histedit-state
7b59f16174c5 histedit: store backup file before histedit
Durham Goode <durham@fb.com>
parents: 24626
diff changeset
214 $ hg histedit --abort
7b59f16174c5 histedit: store backup file before histedit
Durham Goode <durham@fb.com>
parents: 24626
diff changeset
215 adding changesets
7b59f16174c5 histedit: store backup file before histedit
Durham Goode <durham@fb.com>
parents: 24626
diff changeset
216 adding manifests
7b59f16174c5 histedit: store backup file before histedit
Durham Goode <durham@fb.com>
parents: 24626
diff changeset
217 adding file changes
7b59f16174c5 histedit: store backup file before histedit
Durham Goode <durham@fb.com>
parents: 24626
diff changeset
218 added 1 changesets with 1 changes to 3 files
7b59f16174c5 histedit: store backup file before histedit
Durham Goode <durham@fb.com>
parents: 24626
diff changeset
219 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
7b59f16174c5 histedit: store backup file before histedit
Durham Goode <durham@fb.com>
parents: 24626
diff changeset
220 $ hg log -r .
7b59f16174c5 histedit: store backup file before histedit
Durham Goode <durham@fb.com>
parents: 24626
diff changeset
221 changeset: 6:b5f70786f9b0
7b59f16174c5 histedit: store backup file before histedit
Durham Goode <durham@fb.com>
parents: 24626
diff changeset
222 tag: tip
7b59f16174c5 histedit: store backup file before histedit
Durham Goode <durham@fb.com>
parents: 24626
diff changeset
223 user: test
7b59f16174c5 histedit: store backup file before histedit
Durham Goode <durham@fb.com>
parents: 24626
diff changeset
224 date: Thu Jan 01 00:00:00 1970 +0000
7b59f16174c5 histedit: store backup file before histedit
Durham Goode <durham@fb.com>
parents: 24626
diff changeset
225 summary: f
7b59f16174c5 histedit: store backup file before histedit
Durham Goode <durham@fb.com>
parents: 24626
diff changeset
226
7b59f16174c5 histedit: store backup file before histedit
Durham Goode <durham@fb.com>
parents: 24626
diff changeset
227
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17749
diff changeset
228 check histedit_source
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17749
diff changeset
229
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17749
diff changeset
230 $ hg log --debug --rev 5
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17749
diff changeset
231 changeset: 5:a5e1ba2f7afb899ef1581cea528fd885d2fca70d
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17749
diff changeset
232 phase: draft
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17749
diff changeset
233 parent: 4:1a60820cd1f6004a362aa622ebc47d59bc48eb34
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17749
diff changeset
234 parent: -1:0000000000000000000000000000000000000000
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17749
diff changeset
235 manifest: 5:5ad3be8791f39117565557781f5464363b918a45
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17749
diff changeset
236 user: test
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17749
diff changeset
237 date: Thu Jan 01 00:00:00 1970 +0000
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17749
diff changeset
238 files: e
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17749
diff changeset
239 extra: branch=default
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17749
diff changeset
240 extra: histedit_source=e860deea161a2f77de56603b340ebbb4536308ae
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17749
diff changeset
241 description:
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17749
diff changeset
242 foobaz
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17749
diff changeset
243
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17749
diff changeset
244
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17749
diff changeset
245
19019
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18942
diff changeset
246 $ hg histedit tip --commands - 2>&1 <<EOF| fixbundle
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17749
diff changeset
247 > edit b5f70786f9b0 f
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
248 > EOF
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
249 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
27629
e7ff83b2bcfe histedit: list action when intervention is required
timeless <timeless@mozdev.org>
parents: 27545
diff changeset
250 Editing (b5f70786f9b0), you may commit or record as needed now.
e7ff83b2bcfe histedit: list action when intervention is required
timeless <timeless@mozdev.org>
parents: 27545
diff changeset
251 (hg histedit --continue to resume)
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
252 $ hg status
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
253 A f
19213
f324a9b8d4bf summary: add tests for some extensions we plan to modify
Bryan O'Sullivan <bryano@fb.com>
parents: 19019
diff changeset
254
f324a9b8d4bf summary: add tests for some extensions we plan to modify
Bryan O'Sullivan <bryano@fb.com>
parents: 19019
diff changeset
255 $ hg summary
f324a9b8d4bf summary: add tests for some extensions we plan to modify
Bryan O'Sullivan <bryano@fb.com>
parents: 19019
diff changeset
256 parent: 5:a5e1ba2f7afb
f324a9b8d4bf summary: add tests for some extensions we plan to modify
Bryan O'Sullivan <bryano@fb.com>
parents: 19019
diff changeset
257 foobaz
f324a9b8d4bf summary: add tests for some extensions we plan to modify
Bryan O'Sullivan <bryano@fb.com>
parents: 19019
diff changeset
258 branch: default
f324a9b8d4bf summary: add tests for some extensions we plan to modify
Bryan O'Sullivan <bryano@fb.com>
parents: 19019
diff changeset
259 commit: 1 added (new branch head)
f324a9b8d4bf summary: add tests for some extensions we plan to modify
Bryan O'Sullivan <bryano@fb.com>
parents: 19019
diff changeset
260 update: 1 new changesets (update)
25382
6084926366b9 summary: move the parents phase marker to commit line (issue4688)
Gilles Moris <gilles.moris@free.fr>
parents: 25111
diff changeset
261 phases: 7 draft
19215
f184fe1e2ac5 summary: add a histedit hook
Bryan O'Sullivan <bryano@fb.com>
parents: 19213
diff changeset
262 hist: 1 remaining (histedit --continue)
19213
f324a9b8d4bf summary: add tests for some extensions we plan to modify
Bryan O'Sullivan <bryano@fb.com>
parents: 19019
diff changeset
263
21409
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
264 (test also that editor is invoked if histedit is continued for
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
265 "edit" action)
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
266
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
267 $ HGEDITOR='cat' hg histedit --continue
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
268 f
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
269
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
270
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
271 HG: Enter commit message. Lines beginning with 'HG:' are removed.
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
272 HG: Leave message empty to abort commit.
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
273 HG: --
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
274 HG: user: test
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
275 HG: branch 'default'
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
276 HG: added f
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34489
diff changeset
277 saved backup bundle to $TESTTMP/r/.hg/strip-backup/b5f70786f9b0-c28d9c86-histedit.hg
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17749
diff changeset
278
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
279 $ hg status
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
280
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
281 log after edit
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
282 $ hg log --limit 1
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17749
diff changeset
283 changeset: 6:a107ee126658
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
284 tag: tip
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
285 user: test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
286 date: Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
287 summary: f
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
288
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
289
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
290 say we'll change the message, but don't.
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
291 $ cat > ../edit.sh <<EOF
17086
5f2cacb715dc tests: make histedit tests more resilient to filesystem variation
Mads Kiilerich <mads@kiilerich.com>
parents: 17085
diff changeset
292 > cat "\$1" | sed s/pick/mess/ > tmp
5f2cacb715dc tests: make histedit tests more resilient to filesystem variation
Mads Kiilerich <mads@kiilerich.com>
parents: 17085
diff changeset
293 > mv tmp "\$1"
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
294 > EOF
17086
5f2cacb715dc tests: make histedit tests more resilient to filesystem variation
Mads Kiilerich <mads@kiilerich.com>
parents: 17085
diff changeset
295 $ HGEDITOR="sh ../edit.sh" hg histedit tip 2>&1 | fixbundle
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
296 $ hg status
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
297 $ hg log --limit 1
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17749
diff changeset
298 changeset: 6:1fd3b2fe7754
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
299 tag: tip
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
300 user: test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
301 date: Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
302 summary: f
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
303
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
304
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
305 modify the message
21028
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
306
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
307 check saving last-message.txt, at first
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
308
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
309 $ cat > $TESTTMP/commitfailure.py <<EOF
26587
56b2bcea2529 error: get Abort from 'error' instead of 'util'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25452
diff changeset
310 > from mercurial import error
21028
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
311 > def reposetup(ui, repo):
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
312 > class commitfailure(repo.__class__):
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
313 > def commit(self, *args, **kwargs):
26587
56b2bcea2529 error: get Abort from 'error' instead of 'util'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25452
diff changeset
314 > raise error.Abort('emulating unexpected abort')
21028
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
315 > repo.__class__ = commitfailure
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
316 > EOF
21233
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
317 $ cat >> .hg/hgrc <<EOF
21028
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
318 > [extensions]
21233
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
319 > # this failure occurs before editor invocation
21028
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
320 > commitfailure = $TESTTMP/commitfailure.py
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
321 > EOF
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
322
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
323 $ cat > $TESTTMP/editor.sh <<EOF
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
324 > echo "==== before editing"
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
325 > cat \$1
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
326 > echo "===="
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
327 > echo "check saving last-message.txt" >> \$1
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
328 > EOF
21233
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
329
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
330 (test that editor is not invoked before transaction starting)
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
331
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
332 $ rm -f .hg/last-message.txt
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
333 $ HGEDITOR="sh $TESTTMP/editor.sh" hg histedit tip --commands - 2>&1 << EOF | fixbundle
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
334 > mess 1fd3b2fe7754 f
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
335 > EOF
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
336 abort: emulating unexpected abort
21930
a5168eb9b2bc tests: cat error messages are different on Solaris
Danek Duvall <danek.duvall@oracle.com>
parents: 21409
diff changeset
337 $ test -f .hg/last-message.txt
21233
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
338 [1]
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
339
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
340 $ cat >> .hg/hgrc <<EOF
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
341 > [extensions]
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
342 > commitfailure = !
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
343 > EOF
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
344 $ hg histedit --abort -q
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
345
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
346 (test that editor is invoked and commit message is saved into
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
347 "last-message.txt")
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
348
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
349 $ cat >> .hg/hgrc <<EOF
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
350 > [hooks]
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
351 > # this failure occurs after editor invocation
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
352 > pretxncommit.unexpectedabort = false
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
353 > EOF
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
354
21407
47bfe5d433ac histedit: use the editor gotten by "getcommiteditor()" for "message"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21233
diff changeset
355 $ hg status --rev '1fd3b2fe7754^1' --rev 1fd3b2fe7754
47bfe5d433ac histedit: use the editor gotten by "getcommiteditor()" for "message"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21233
diff changeset
356 A f
47bfe5d433ac histedit: use the editor gotten by "getcommiteditor()" for "message"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21233
diff changeset
357
21028
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
358 $ rm -f .hg/last-message.txt
21407
47bfe5d433ac histedit: use the editor gotten by "getcommiteditor()" for "message"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21233
diff changeset
359 $ HGEDITOR="sh $TESTTMP/editor.sh" hg histedit tip --commands - 2>&1 << EOF
21028
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
360 > mess 1fd3b2fe7754 f
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
361 > EOF
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
362 ==== before editing
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
363 f
21407
47bfe5d433ac histedit: use the editor gotten by "getcommiteditor()" for "message"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21233
diff changeset
364
47bfe5d433ac histedit: use the editor gotten by "getcommiteditor()" for "message"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21233
diff changeset
365
47bfe5d433ac histedit: use the editor gotten by "getcommiteditor()" for "message"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21233
diff changeset
366 HG: Enter commit message. Lines beginning with 'HG:' are removed.
47bfe5d433ac histedit: use the editor gotten by "getcommiteditor()" for "message"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21233
diff changeset
367 HG: Leave message empty to abort commit.
47bfe5d433ac histedit: use the editor gotten by "getcommiteditor()" for "message"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21233
diff changeset
368 HG: --
47bfe5d433ac histedit: use the editor gotten by "getcommiteditor()" for "message"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21233
diff changeset
369 HG: user: test
47bfe5d433ac histedit: use the editor gotten by "getcommiteditor()" for "message"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21233
diff changeset
370 HG: branch 'default'
47bfe5d433ac histedit: use the editor gotten by "getcommiteditor()" for "message"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21233
diff changeset
371 HG: added f
21028
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
372 ====
21233
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
373 transaction abort!
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
374 rollback completed
41362
57c462db87fd localrepo: use context manager for transaction in commit()
Martin von Zweigbergk <martinvonz@google.com>
parents: 41213
diff changeset
375 note: commit message saved in .hg/last-message.txt
21233
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
376 abort: pretxncommit.unexpectedabort hook exited with status 1
21407
47bfe5d433ac histedit: use the editor gotten by "getcommiteditor()" for "message"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21233
diff changeset
377 [255]
21028
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
378 $ cat .hg/last-message.txt
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
379 f
21407
47bfe5d433ac histedit: use the editor gotten by "getcommiteditor()" for "message"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21233
diff changeset
380
47bfe5d433ac histedit: use the editor gotten by "getcommiteditor()" for "message"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21233
diff changeset
381
21028
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
382 check saving last-message.txt
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
383
21409
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
384 (test also that editor is invoked if histedit is continued for "message"
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
385 action)
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
386
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
387 $ HGEDITOR=cat hg histedit --continue
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
388 f
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
389
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
390
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
391 HG: Enter commit message. Lines beginning with 'HG:' are removed.
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
392 HG: Leave message empty to abort commit.
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
393 HG: --
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
394 HG: user: test
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
395 HG: branch 'default'
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
396 HG: added f
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
397 transaction abort!
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
398 rollback completed
41362
57c462db87fd localrepo: use context manager for transaction in commit()
Martin von Zweigbergk <martinvonz@google.com>
parents: 41213
diff changeset
399 note: commit message saved in .hg/last-message.txt
21409
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
400 abort: pretxncommit.unexpectedabort hook exited with status 1
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
401 [255]
37a3ac247c0d histedit: use "getcommiteditor()" instead of explicit editor choice for "--continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21407
diff changeset
402
21233
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
403 $ cat >> .hg/hgrc <<EOF
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
404 > [hooks]
213fd1a99cd9 histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21028
diff changeset
405 > pretxncommit.unexpectedabort =
21028
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
406 > EOF
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
407 $ hg histedit --abort -q
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
408
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
409 then, check "modify the message" itself
a0f437e2f5a9 histedit: save manually edited commit message into ".hg/last-message.txt"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20117
diff changeset
410
19019
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18942
diff changeset
411 $ hg histedit tip --commands - 2>&1 << EOF | fixbundle
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17749
diff changeset
412 > mess 1fd3b2fe7754 f
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
413 > EOF
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
414 $ hg status
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
415 $ hg log --limit 1
19019
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18942
diff changeset
416 changeset: 6:62feedb1200e
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
417 tag: tip
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
418 user: test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
419 date: Thu Jan 01 00:00:00 1970 +0000
19019
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18942
diff changeset
420 summary: f
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
421
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
422
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
423 rollback should not work after a histedit
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
424 $ hg rollback
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
425 no rollback information available
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
426 [1]
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
427
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
428 $ cd ..
18913
79580b3140cd histedit: support editing of the first commit (issue3767)
Bryan O'Sullivan <bryano@fb.com>
parents: 18609
diff changeset
429 $ hg clone -qr0 r r0
79580b3140cd histedit: support editing of the first commit (issue3767)
Bryan O'Sullivan <bryano@fb.com>
parents: 18609
diff changeset
430 $ cd r0
79580b3140cd histedit: support editing of the first commit (issue3767)
Bryan O'Sullivan <bryano@fb.com>
parents: 18609
diff changeset
431 $ hg phase -fdr0
19019
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18942
diff changeset
432 $ hg histedit --commands - 0 2>&1 << EOF
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18942
diff changeset
433 > edit cb9a9f314b8b a > $EDITED
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18942
diff changeset
434 > EOF
18913
79580b3140cd histedit: support editing of the first commit (issue3767)
Bryan O'Sullivan <bryano@fb.com>
parents: 18609
diff changeset
435 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
27629
e7ff83b2bcfe histedit: list action when intervention is required
timeless <timeless@mozdev.org>
parents: 27545
diff changeset
436 Editing (cb9a9f314b8b), you may commit or record as needed now.
e7ff83b2bcfe histedit: list action when intervention is required
timeless <timeless@mozdev.org>
parents: 27545
diff changeset
437 (hg histedit --continue to resume)
18942
6891e361bec6 histedit: update tests for new intervention framework
Matt Mackall <mpm@selenic.com>
parents: 18934
diff changeset
438 [1]
18913
79580b3140cd histedit: support editing of the first commit (issue3767)
Bryan O'Sullivan <bryano@fb.com>
parents: 18609
diff changeset
439 $ HGEDITOR=true hg histedit --continue
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34489
diff changeset
440 saved backup bundle to $TESTTMP/r0/.hg/strip-backup/cb9a9f314b8b-cc5ccb0b-histedit.hg
25451
f0acc3e0bd32 test-histedit-edit: add test that demonstrates bug in issue4704
Augie Fackler <augie@google.com>
parents: 25382
diff changeset
441
f0acc3e0bd32 test-histedit-edit: add test that demonstrates bug in issue4704
Augie Fackler <augie@google.com>
parents: 25382
diff changeset
442 $ hg log -G
f0acc3e0bd32 test-histedit-edit: add test that demonstrates bug in issue4704
Augie Fackler <augie@google.com>
parents: 25382
diff changeset
443 @ changeset: 0:0efcea34f18a
f0acc3e0bd32 test-histedit-edit: add test that demonstrates bug in issue4704
Augie Fackler <augie@google.com>
parents: 25382
diff changeset
444 tag: tip
f0acc3e0bd32 test-histedit-edit: add test that demonstrates bug in issue4704
Augie Fackler <augie@google.com>
parents: 25382
diff changeset
445 user: test
f0acc3e0bd32 test-histedit-edit: add test that demonstrates bug in issue4704
Augie Fackler <augie@google.com>
parents: 25382
diff changeset
446 date: Thu Jan 01 00:00:00 1970 +0000
f0acc3e0bd32 test-histedit-edit: add test that demonstrates bug in issue4704
Augie Fackler <augie@google.com>
parents: 25382
diff changeset
447 summary: a
f0acc3e0bd32 test-histedit-edit: add test that demonstrates bug in issue4704
Augie Fackler <augie@google.com>
parents: 25382
diff changeset
448
f0acc3e0bd32 test-histedit-edit: add test that demonstrates bug in issue4704
Augie Fackler <augie@google.com>
parents: 25382
diff changeset
449 $ echo foo >> b
f0acc3e0bd32 test-histedit-edit: add test that demonstrates bug in issue4704
Augie Fackler <augie@google.com>
parents: 25382
diff changeset
450 $ hg addr
f0acc3e0bd32 test-histedit-edit: add test that demonstrates bug in issue4704
Augie Fackler <augie@google.com>
parents: 25382
diff changeset
451 adding b
f0acc3e0bd32 test-histedit-edit: add test that demonstrates bug in issue4704
Augie Fackler <augie@google.com>
parents: 25382
diff changeset
452 $ hg ci -m 'add b'
f0acc3e0bd32 test-histedit-edit: add test that demonstrates bug in issue4704
Augie Fackler <augie@google.com>
parents: 25382
diff changeset
453 $ echo foo >> a
f0acc3e0bd32 test-histedit-edit: add test that demonstrates bug in issue4704
Augie Fackler <augie@google.com>
parents: 25382
diff changeset
454 $ hg ci -m 'extend a'
f0acc3e0bd32 test-histedit-edit: add test that demonstrates bug in issue4704
Augie Fackler <augie@google.com>
parents: 25382
diff changeset
455 $ hg phase --public 1
f0acc3e0bd32 test-histedit-edit: add test that demonstrates bug in issue4704
Augie Fackler <augie@google.com>
parents: 25382
diff changeset
456 Attempting to fold a change into a public change should not work:
f0acc3e0bd32 test-histedit-edit: add test that demonstrates bug in issue4704
Augie Fackler <augie@google.com>
parents: 25382
diff changeset
457 $ cat > ../edit.sh <<EOF
f0acc3e0bd32 test-histedit-edit: add test that demonstrates bug in issue4704
Augie Fackler <augie@google.com>
parents: 25382
diff changeset
458 > cat "\$1" | sed s/pick/fold/ > tmp
f0acc3e0bd32 test-histedit-edit: add test that demonstrates bug in issue4704
Augie Fackler <augie@google.com>
parents: 25382
diff changeset
459 > mv tmp "\$1"
f0acc3e0bd32 test-histedit-edit: add test that demonstrates bug in issue4704
Augie Fackler <augie@google.com>
parents: 25382
diff changeset
460 > EOF
f0acc3e0bd32 test-histedit-edit: add test that demonstrates bug in issue4704
Augie Fackler <augie@google.com>
parents: 25382
diff changeset
461 $ HGEDITOR="sh ../edit.sh" hg histedit 2
27171
3028ea0aff46 histedit: mention histedit-last-edit.txt on abort
timeless <timeless@mozdev.org>
parents: 26998
diff changeset
462 warning: histedit rules saved to: .hg/histedit-last-edit.txt
33762
c26a76e1af36 histedit: check first changeset for verb "roll" or "fold" (issue5498)
André Klitzing <aklitzing@gmail.com>
parents: 33351
diff changeset
463 hg: parse error: first changeset cannot use verb "fold"
25452
43906060a3f4 histedit: abort rather than edit a public changeset (issue4704)
Augie Fackler <augie@google.com>
parents: 25451
diff changeset
464 [255]
27171
3028ea0aff46 histedit: mention histedit-last-edit.txt on abort
timeless <timeless@mozdev.org>
parents: 26998
diff changeset
465 $ cat .hg/histedit-last-edit.txt
3028ea0aff46 histedit: mention histedit-last-edit.txt on abort
timeless <timeless@mozdev.org>
parents: 26998
diff changeset
466 fold 0012be4a27ea 2 extend a
3028ea0aff46 histedit: mention histedit-last-edit.txt on abort
timeless <timeless@mozdev.org>
parents: 26998
diff changeset
467
3028ea0aff46 histedit: mention histedit-last-edit.txt on abort
timeless <timeless@mozdev.org>
parents: 26998
diff changeset
468 # Edit history between 0012be4a27ea and 0012be4a27ea
3028ea0aff46 histedit: mention histedit-last-edit.txt on abort
timeless <timeless@mozdev.org>
parents: 26998
diff changeset
469 #
3028ea0aff46 histedit: mention histedit-last-edit.txt on abort
timeless <timeless@mozdev.org>
parents: 26998
diff changeset
470 # Commits are listed from least to most recent
3028ea0aff46 histedit: mention histedit-last-edit.txt on abort
timeless <timeless@mozdev.org>
parents: 26998
diff changeset
471 #
28396
5490b04e6132 histedit: adds hint how to reorder changesets at editor (issue3766)
liscju <piotr.listkiewicz@gmail.com>
parents: 28004
diff changeset
472 # You can reorder changesets by reordering the lines
5490b04e6132 histedit: adds hint how to reorder changesets at editor (issue3766)
liscju <piotr.listkiewicz@gmail.com>
parents: 28004
diff changeset
473 #
27171
3028ea0aff46 histedit: mention histedit-last-edit.txt on abort
timeless <timeless@mozdev.org>
parents: 26998
diff changeset
474 # Commands:
27674
78d86664e3a2 histedit: prefer edit commit, edit message, use commit
timeless <timeless@mozdev.org>
parents: 27629
diff changeset
475 #
78d86664e3a2 histedit: prefer edit commit, edit message, use commit
timeless <timeless@mozdev.org>
parents: 27629
diff changeset
476 # e, edit = use commit, but stop for amending
78d86664e3a2 histedit: prefer edit commit, edit message, use commit
timeless <timeless@mozdev.org>
parents: 27629
diff changeset
477 # m, mess = edit commit message without changing commit content
27171
3028ea0aff46 histedit: mention histedit-last-edit.txt on abort
timeless <timeless@mozdev.org>
parents: 26998
diff changeset
478 # p, fold = use commit
34489
270e344a6c74 histedit: removing the experimental config 'histeditng'
Saurabh Singh <singhsrb@fb.com>
parents: 33762
diff changeset
479 # b, base = checkout changeset and apply further changesets from there
27674
78d86664e3a2 histedit: prefer edit commit, edit message, use commit
timeless <timeless@mozdev.org>
parents: 27629
diff changeset
480 # d, drop = remove commit from history
27171
3028ea0aff46 histedit: mention histedit-last-edit.txt on abort
timeless <timeless@mozdev.org>
parents: 26998
diff changeset
481 # f, fold = use commit, but combine it with the one above
31056
37ab9e20991c histedit: modify rollup to discard date from the rollup commit (issue4820)
Ben Schmidt <insightfuls@users.noreply.github.com>
parents: 28890
diff changeset
482 # r, roll = like fold, but discard this commit's description and date
27171
3028ea0aff46 histedit: mention histedit-last-edit.txt on abort
timeless <timeless@mozdev.org>
parents: 26998
diff changeset
483 #
41197
172296c6db91 tests: add test for warning on histedit with tagged commits
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 35393
diff changeset
484
172296c6db91 tests: add test for warning on histedit with tagged commits
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 35393
diff changeset
485 $ cd ..
172296c6db91 tests: add test for warning on histedit with tagged commits
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 35393
diff changeset
486
41213
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
487 ============================================
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
488 Test update-timestamp config option in mess|
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
489 ============================================
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
490
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
491 $ addwithdate ()
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
492 > {
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
493 > echo $1 > $1
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
494 > hg add $1
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
495 > hg ci -m $1 -d "$2 0"
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
496 > }
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
497
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
498 $ initrepo ()
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
499 > {
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
500 > hg init r2
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
501 > cd r2
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
502 > addwithdate a 1
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
503 > addwithdate b 2
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
504 > addwithdate c 3
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
505 > addwithdate d 4
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
506 > addwithdate e 5
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
507 > addwithdate f 6
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
508 > }
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
509
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
510 $ initrepo
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
511
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
512 log before edit
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
513
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
514 $ hg log --limit 1
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
515 changeset: 5:178e35e0ce73
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
516 tag: tip
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
517 user: test
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
518 date: Thu Jan 01 00:00:06 1970 +0000
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
519 summary: f
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
520
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
521 $ hg histedit tip --commands - 2>&1 --config rewrite.update-timestamp=True << EOF | fixbundle
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
522 > mess 178e35e0ce73 f
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
523 > EOF
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
524
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
525 log after edit
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
526
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
527 $ hg log --limit 1
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
528 changeset: 5:98bf456d476b
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
529 tag: tip
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
530 user: test
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
531 date: Thu Jan 01 00:00:00 1970 +0000
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
532 summary: f
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
533
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
534
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
535 $ cd ..
704a3aa3dc0a histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com>
parents: 41212
diff changeset
536
41197
172296c6db91 tests: add test for warning on histedit with tagged commits
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 35393
diff changeset
537 warn the user on editing tagged commits
172296c6db91 tests: add test for warning on histedit with tagged commits
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 35393
diff changeset
538
172296c6db91 tests: add test for warning on histedit with tagged commits
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 35393
diff changeset
539 $ hg init issue4017
172296c6db91 tests: add test for warning on histedit with tagged commits
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 35393
diff changeset
540 $ cd issue4017
172296c6db91 tests: add test for warning on histedit with tagged commits
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 35393
diff changeset
541 $ echo > a
172296c6db91 tests: add test for warning on histedit with tagged commits
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 35393
diff changeset
542 $ hg ci -Am 'add a'
172296c6db91 tests: add test for warning on histedit with tagged commits
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 35393
diff changeset
543 adding a
172296c6db91 tests: add test for warning on histedit with tagged commits
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 35393
diff changeset
544 $ hg tag a
172296c6db91 tests: add test for warning on histedit with tagged commits
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 35393
diff changeset
545 $ hg tags
172296c6db91 tests: add test for warning on histedit with tagged commits
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 35393
diff changeset
546 tip 1:bd7ee4f3939b
172296c6db91 tests: add test for warning on histedit with tagged commits
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 35393
diff changeset
547 a 0:a8a82d372bb3
172296c6db91 tests: add test for warning on histedit with tagged commits
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 35393
diff changeset
548 $ hg histedit
41212
240f8e49a7bd histedit: remove trailing space from warning message
Yuya Nishihara <yuya@tcha.org>
parents: 41197
diff changeset
549 warning: tags associated with the given changeset will be lost after histedit.
41197
172296c6db91 tests: add test for warning on histedit with tagged commits
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 35393
diff changeset
550 do you want to continue (yN)? n
172296c6db91 tests: add test for warning on histedit with tagged commits
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 35393
diff changeset
551 abort: histedit cancelled
172296c6db91 tests: add test for warning on histedit with tagged commits
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 35393
diff changeset
552
172296c6db91 tests: add test for warning on histedit with tagged commits
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 35393
diff changeset
553 [255]
172296c6db91 tests: add test for warning on histedit with tagged commits
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 35393
diff changeset
554 $ cd ..