Mercurial > hg
annotate tests/test-histedit-no-change.t @ 51353:5cc04a6da19d
delta-find: move the emotion of parents in a dedicated method
After splitting the filtering, and with the `_candidate_groups` layer removed,
we can start splitting the group generation too. This helps to organize this
code and make it easier to modifying the future.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 23 Nov 2023 21:51:43 +0100 |
parents | 3f82a915ab2a |
children |
rev | line source |
---|---|
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
1 test for old histedit issue #6: |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
2 editing a changeset without any actual change would corrupt the repository |
17064
168cc52ad7c2
histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
3 |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
4 $ . "$TESTDIR/histedit-helpers.sh" |
17064
168cc52ad7c2
histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
5 |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
6 $ cat >> $HGRCPATH <<EOF |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
7 > [extensions] |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
8 > histedit= |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
9 > EOF |
17064
168cc52ad7c2
histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
10 |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
11 $ initrepo () |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
12 > { |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
13 > dir="$1" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
14 > comment="$2" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
15 > if [ -n "${comment}" ]; then |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
16 > echo % ${comment} |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
17 > echo % ${comment} | sed 's:.:-:g' |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
18 > fi |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
19 > hg init ${dir} |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
20 > cd ${dir} |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
21 > 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
|
22 > echo $x > $x |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
23 > hg add $x |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
24 > hg ci -m $x |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
25 > done |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
26 > cd .. |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
27 > } |
17064
168cc52ad7c2
histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
28 |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
29 $ geneditor () |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
30 > { |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
31 > # generate an editor script for selecting changesets to be edited |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
32 > choice=$1 # changesets that should be edited (using sed line ranges) |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
33 > cat <<EOF | sed 's:^....::' |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
34 > # editing the rules, replacing 'pick' with 'edit' for the chosen lines |
17086
5f2cacb715dc
tests: make histedit tests more resilient to filesystem variation
Mads Kiilerich <mads@kiilerich.com>
parents:
17085
diff
changeset
|
35 > sed '${choice}s:^pick:edit:' "\$1" > "\${1}.tmp" |
5f2cacb715dc
tests: make histedit tests more resilient to filesystem variation
Mads Kiilerich <mads@kiilerich.com>
parents:
17085
diff
changeset
|
36 > mv "\${1}.tmp" "\$1" |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
37 > # displaying the resulting rules, minus comments and empty lines |
17086
5f2cacb715dc
tests: make histedit tests more resilient to filesystem variation
Mads Kiilerich <mads@kiilerich.com>
parents:
17085
diff
changeset
|
38 > sed '/^#/d;/^$/d;s:^:| :' "\$1" >&2 |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
39 > EOF |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
40 > } |
17064
168cc52ad7c2
histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
41 |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
42 $ startediting () |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
43 > { |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
44 > # begin an editing session |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
45 > choice="$1" # changesets that should be edited |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
46 > number="$2" # number of changesets considered (from tip) |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
47 > comment="$3" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
48 > geneditor "${choice}" > edit.sh |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
49 > echo % start editing the history ${comment} |
17086
5f2cacb715dc
tests: make histedit tests more resilient to filesystem variation
Mads Kiilerich <mads@kiilerich.com>
parents:
17085
diff
changeset
|
50 > HGEDITOR="sh ./edit.sh" hg histedit -- -${number} 2>&1 | fixbundle |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
51 > } |
17064
168cc52ad7c2
histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
52 |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
53 $ continueediting () |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
54 > { |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
55 > # continue an edit already in progress |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
56 > editor="$1" # message editor when finalizing editing |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
57 > comment="$2" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
58 > echo % finalize changeset editing ${comment} |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
59 > HGEDITOR=${editor} hg histedit --continue 2>&1 | fixbundle |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
60 > } |
17064
168cc52ad7c2
histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
61 |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
62 $ graphlog () |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
63 > { |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
64 > comment="${1:-log}" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
65 > echo % "${comment}" |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
19519
diff
changeset
|
66 > hg log -G --template '{rev} {node} \"{desc|firstline}\"\n' |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
67 > } |
17064
168cc52ad7c2
histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
68 |
168cc52ad7c2
histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
69 |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
70 $ initrepo r1 "test editing with no change" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
71 % test editing with no change |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
72 ----------------------------- |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
73 $ cd r1 |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
74 $ graphlog "log before editing" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
75 % log before editing |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
76 @ 5 652413bf663ef2a641cab26574e46d5f5a64a55a "f" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
77 | |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
78 o 4 e860deea161a2f77de56603b340ebbb4536308ae "e" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
79 | |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
80 o 3 055a42cdd88768532f9cf79daa407fc8d138de9b "d" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
81 | |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
82 o 2 177f92b773850b59254aa5e923436f921b55483b "c" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
83 | |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
84 o 1 d2ae7f538514cd87c17547b0de4cea71fe1af9fb "b" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
85 | |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
86 o 0 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b "a" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
87 |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
88 $ startediting 2 3 "(not changing anything)" # edit the 2nd of 3 changesets |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
89 % start editing the history (not changing anything) |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
90 | pick 055a42cdd887 3 d |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
91 | edit e860deea161a 4 e |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
92 | pick 652413bf663e 5 f |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
93 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
46103
3f82a915ab2a
histedit: tweak `edit` message to try and guide users to our workflow
Augie Fackler <augie@google.com>
parents:
45840
diff
changeset
|
94 Editing (e860deea161a), commit as needed now to split the change |
3f82a915ab2a
histedit: tweak `edit` message to try and guide users to our workflow
Augie Fackler <augie@google.com>
parents:
45840
diff
changeset
|
95 (to edit e860deea161a, `hg histedit --continue` after making changes) |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
96 $ continueediting true "(leaving commit message unaltered)" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
97 % finalize changeset editing (leaving commit message unaltered) |
18437
358c23e8f1c6
histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17086
diff
changeset
|
98 |
17064
168cc52ad7c2
histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
99 |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
100 check state of working copy |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
101 $ hg id |
18437
358c23e8f1c6
histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17086
diff
changeset
|
102 794fe033d0a0 tip |
17064
168cc52ad7c2
histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
103 |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
104 $ graphlog "log after history editing" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
105 % log after history editing |
18437
358c23e8f1c6
histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17086
diff
changeset
|
106 @ 5 794fe033d0a030f8df77c5de945fca35c9181c30 "f" |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
107 | |
18437
358c23e8f1c6
histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17086
diff
changeset
|
108 o 4 04d2fab980779f332dec458cc944f28de8b43435 "e" |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
109 | |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
110 o 3 055a42cdd88768532f9cf79daa407fc8d138de9b "d" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
111 | |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
112 o 2 177f92b773850b59254aa5e923436f921b55483b "c" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
113 | |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
114 o 1 d2ae7f538514cd87c17547b0de4cea71fe1af9fb "b" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
115 | |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
116 o 0 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b "a" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
117 |
17064
168cc52ad7c2
histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
118 |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
119 $ cd .. |
17064
168cc52ad7c2
histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
120 |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
121 $ initrepo r2 "test editing with no change, then abort" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
122 % test editing with no change, then abort |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
123 ----------------------------------------- |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
124 $ cd r2 |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
125 $ graphlog "log before editing" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
126 % log before editing |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
127 @ 5 652413bf663ef2a641cab26574e46d5f5a64a55a "f" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
128 | |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
129 o 4 e860deea161a2f77de56603b340ebbb4536308ae "e" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
130 | |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
131 o 3 055a42cdd88768532f9cf79daa407fc8d138de9b "d" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
132 | |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
133 o 2 177f92b773850b59254aa5e923436f921b55483b "c" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
134 | |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
135 o 1 d2ae7f538514cd87c17547b0de4cea71fe1af9fb "b" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
136 | |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
137 o 0 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b "a" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
138 |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
139 $ startediting 1,2 3 "(not changing anything)" # edit the 1st two of 3 changesets |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
140 % start editing the history (not changing anything) |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
141 | edit 055a42cdd887 3 d |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
142 | edit e860deea161a 4 e |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
143 | pick 652413bf663e 5 f |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
144 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
46103
3f82a915ab2a
histedit: tweak `edit` message to try and guide users to our workflow
Augie Fackler <augie@google.com>
parents:
45840
diff
changeset
|
145 Editing (055a42cdd887), commit as needed now to split the change |
3f82a915ab2a
histedit: tweak `edit` message to try and guide users to our workflow
Augie Fackler <augie@google.com>
parents:
45840
diff
changeset
|
146 (to edit 055a42cdd887, `hg histedit --continue` after making changes) |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
147 $ continueediting true "(leaving commit message unaltered)" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
148 % finalize changeset editing (leaving commit message unaltered) |
46103
3f82a915ab2a
histedit: tweak `edit` message to try and guide users to our workflow
Augie Fackler <augie@google.com>
parents:
45840
diff
changeset
|
149 Editing (e860deea161a), commit as needed now to split the change |
3f82a915ab2a
histedit: tweak `edit` message to try and guide users to our workflow
Augie Fackler <augie@google.com>
parents:
45840
diff
changeset
|
150 (to edit e860deea161a, `hg histedit --continue` after making changes) |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
151 $ graphlog "log after first edit" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
152 % log after first edit |
18437
358c23e8f1c6
histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17086
diff
changeset
|
153 @ 6 e5ae3ca2f1ffdbd89ec41ebc273a231f7c3022f2 "d" |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
154 | |
18437
358c23e8f1c6
histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17086
diff
changeset
|
155 | o 5 652413bf663ef2a641cab26574e46d5f5a64a55a "f" |
358c23e8f1c6
histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17086
diff
changeset
|
156 | | |
358c23e8f1c6
histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17086
diff
changeset
|
157 | o 4 e860deea161a2f77de56603b340ebbb4536308ae "e" |
358c23e8f1c6
histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17086
diff
changeset
|
158 | | |
358c23e8f1c6
histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17086
diff
changeset
|
159 | o 3 055a42cdd88768532f9cf79daa407fc8d138de9b "d" |
358c23e8f1c6
histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17086
diff
changeset
|
160 |/ |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
161 o 2 177f92b773850b59254aa5e923436f921b55483b "c" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
162 | |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
163 o 1 d2ae7f538514cd87c17547b0de4cea71fe1af9fb "b" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
164 | |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
165 o 0 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b "a" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
166 |
17064
168cc52ad7c2
histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
167 |
19519
c2a479a058d0
histedit: don't clobber working copy on --abort if not on histedit cset
Matt Mackall <mpm@selenic.com>
parents:
18934
diff
changeset
|
168 abort editing session, after first forcibly updating away |
c2a479a058d0
histedit: don't clobber working copy on --abort if not on histedit cset
Matt Mackall <mpm@selenic.com>
parents:
18934
diff
changeset
|
169 $ hg up 0 |
c2a479a058d0
histedit: don't clobber working copy on --abort if not on histedit cset
Matt Mackall <mpm@selenic.com>
parents:
18934
diff
changeset
|
170 abort: histedit in progress |
c2a479a058d0
histedit: don't clobber working copy on --abort if not on histedit cset
Matt Mackall <mpm@selenic.com>
parents:
18934
diff
changeset
|
171 (use 'hg histedit --continue' or 'hg histedit --abort') |
45840
527ce85c2e60
errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents:
27629
diff
changeset
|
172 [20] |
19519
c2a479a058d0
histedit: don't clobber working copy on --abort if not on histedit cset
Matt Mackall <mpm@selenic.com>
parents:
18934
diff
changeset
|
173 $ mv .hg/histedit-state .hg/histedit-state-ignore |
c2a479a058d0
histedit: don't clobber working copy on --abort if not on histedit cset
Matt Mackall <mpm@selenic.com>
parents:
18934
diff
changeset
|
174 $ hg up 0 |
c2a479a058d0
histedit: don't clobber working copy on --abort if not on histedit cset
Matt Mackall <mpm@selenic.com>
parents:
18934
diff
changeset
|
175 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
c2a479a058d0
histedit: don't clobber working copy on --abort if not on histedit cset
Matt Mackall <mpm@selenic.com>
parents:
18934
diff
changeset
|
176 $ mv .hg/histedit-state-ignore .hg/histedit-state |
c2a479a058d0
histedit: don't clobber working copy on --abort if not on histedit cset
Matt Mackall <mpm@selenic.com>
parents:
18934
diff
changeset
|
177 $ hg sum |
c2a479a058d0
histedit: don't clobber working copy on --abort if not on histedit cset
Matt Mackall <mpm@selenic.com>
parents:
18934
diff
changeset
|
178 parent: 0:cb9a9f314b8b |
c2a479a058d0
histedit: don't clobber working copy on --abort if not on histedit cset
Matt Mackall <mpm@selenic.com>
parents:
18934
diff
changeset
|
179 a |
c2a479a058d0
histedit: don't clobber working copy on --abort if not on histedit cset
Matt Mackall <mpm@selenic.com>
parents:
18934
diff
changeset
|
180 branch: default |
22895
dfa44e25bb53
dirstate: properly clean-up some more merge state on setparents
Matt Mackall <mpm@selenic.com>
parents:
20117
diff
changeset
|
181 commit: 1 added, 1 unknown (new branch head) |
19519
c2a479a058d0
histedit: don't clobber working copy on --abort if not on histedit cset
Matt Mackall <mpm@selenic.com>
parents:
18934
diff
changeset
|
182 update: 6 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
|
183 phases: 7 draft |
19519
c2a479a058d0
histedit: don't clobber working copy on --abort if not on histedit cset
Matt Mackall <mpm@selenic.com>
parents:
18934
diff
changeset
|
184 hist: 2 remaining (histedit --continue) |
c2a479a058d0
histedit: don't clobber working copy on --abort if not on histedit cset
Matt Mackall <mpm@selenic.com>
parents:
18934
diff
changeset
|
185 |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
186 $ hg histedit --abort 2>&1 | fixbundle |
19519
c2a479a058d0
histedit: don't clobber working copy on --abort if not on histedit cset
Matt Mackall <mpm@selenic.com>
parents:
18934
diff
changeset
|
187 |
c2a479a058d0
histedit: don't clobber working copy on --abort if not on histedit cset
Matt Mackall <mpm@selenic.com>
parents:
18934
diff
changeset
|
188 modified files should survive the abort when we've moved away already |
c2a479a058d0
histedit: don't clobber working copy on --abort if not on histedit cset
Matt Mackall <mpm@selenic.com>
parents:
18934
diff
changeset
|
189 $ hg st |
22895
dfa44e25bb53
dirstate: properly clean-up some more merge state on setparents
Matt Mackall <mpm@selenic.com>
parents:
20117
diff
changeset
|
190 A e |
19519
c2a479a058d0
histedit: don't clobber working copy on --abort if not on histedit cset
Matt Mackall <mpm@selenic.com>
parents:
18934
diff
changeset
|
191 ? edit.sh |
17064
168cc52ad7c2
histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
192 |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
193 $ graphlog "log after abort" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
194 % log after abort |
19519
c2a479a058d0
histedit: don't clobber working copy on --abort if not on histedit cset
Matt Mackall <mpm@selenic.com>
parents:
18934
diff
changeset
|
195 o 5 652413bf663ef2a641cab26574e46d5f5a64a55a "f" |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
196 | |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
197 o 4 e860deea161a2f77de56603b340ebbb4536308ae "e" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
198 | |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
199 o 3 055a42cdd88768532f9cf79daa407fc8d138de9b "d" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
200 | |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
201 o 2 177f92b773850b59254aa5e923436f921b55483b "c" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
202 | |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
203 o 1 d2ae7f538514cd87c17547b0de4cea71fe1af9fb "b" |
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
204 | |
19519
c2a479a058d0
histedit: don't clobber working copy on --abort if not on histedit cset
Matt Mackall <mpm@selenic.com>
parents:
18934
diff
changeset
|
205 @ 0 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b "a" |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
206 |
27403
50b6a04f817f
histedit: omit useless message from abort
timeless <timeless@mozdev.org>
parents:
27350
diff
changeset
|
207 aborting and not changing files can skip mentioning updating (no) files |
50b6a04f817f
histedit: omit useless message from abort
timeless <timeless@mozdev.org>
parents:
27350
diff
changeset
|
208 $ hg up |
50b6a04f817f
histedit: omit useless message from abort
timeless <timeless@mozdev.org>
parents:
27350
diff
changeset
|
209 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
50b6a04f817f
histedit: omit useless message from abort
timeless <timeless@mozdev.org>
parents:
27350
diff
changeset
|
210 $ hg commit --close-branch -m 'closebranch' |
50b6a04f817f
histedit: omit useless message from abort
timeless <timeless@mozdev.org>
parents:
27350
diff
changeset
|
211 $ startediting 1 1 "(not changing anything)" # edit the 3rd of 3 changesets |
50b6a04f817f
histedit: omit useless message from abort
timeless <timeless@mozdev.org>
parents:
27350
diff
changeset
|
212 % start editing the history (not changing anything) |
50b6a04f817f
histedit: omit useless message from abort
timeless <timeless@mozdev.org>
parents:
27350
diff
changeset
|
213 | edit 292aec348d9e 6 closebranch |
46103
3f82a915ab2a
histedit: tweak `edit` message to try and guide users to our workflow
Augie Fackler <augie@google.com>
parents:
45840
diff
changeset
|
214 Editing (292aec348d9e), commit as needed now to split the change |
3f82a915ab2a
histedit: tweak `edit` message to try and guide users to our workflow
Augie Fackler <augie@google.com>
parents:
45840
diff
changeset
|
215 (to edit 292aec348d9e, `hg histedit --continue` after making changes) |
27403
50b6a04f817f
histedit: omit useless message from abort
timeless <timeless@mozdev.org>
parents:
27350
diff
changeset
|
216 $ hg histedit --abort |
17064
168cc52ad7c2
histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff
changeset
|
217 |
17085
35729bdd59b6
tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents:
17064
diff
changeset
|
218 $ cd .. |