Mercurial > hg
annotate tests/test-split.t @ 41557:3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Previously, we respected options like `diff.ignoreblanklines` and
`diff.ignorews`. This can cause problems when the user is attempting to
actually commit the blank line change. Specifically, the split extension can get
into an infinite loop because it detects that the working copy is not clean, but
when we get the diff we don't see the changes, so it just skips popping up the
chunk selection flow, saying there's no changes to record.
These options are primarily meant for viewing diffs; it is highly unlikely that
someone is actually intending to add extraneous whitespace and have it ignored
if they attempt to interactively commit (but *not* ignored if they
non-interactively commit).
Differential Revision: https://phab.mercurial-scm.org/D5744
author | Kyle Lippincott <spectral@google.com> |
---|---|
date | Mon, 28 Jan 2019 18:05:05 -0800 |
parents | d1d3094b54f9 |
children | 66399f2e92aa |
rev | line source |
---|---|
35455 | 1 #testcases obsstore-on obsstore-off |
2 | |
3 $ cat > $TESTTMP/editor.py <<EOF | |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38424
diff
changeset
|
4 > #!"$PYTHON" |
36645
7bc33d677c0c
tests: fix various test-check-module-imports.t violations
Augie Fackler <augie@google.com>
parents:
35709
diff
changeset
|
5 > import os |
7bc33d677c0c
tests: fix various test-check-module-imports.t violations
Augie Fackler <augie@google.com>
parents:
35709
diff
changeset
|
6 > import sys |
35455 | 7 > path = os.path.join(os.environ['TESTTMP'], 'messages') |
8 > messages = open(path).read().split('--\n') | |
9 > prompt = open(sys.argv[1]).read() | |
10 > sys.stdout.write(''.join('EDITOR: %s' % l for l in prompt.splitlines(True))) | |
11 > sys.stdout.flush() | |
12 > with open(sys.argv[1], 'w') as f: | |
13 > f.write(messages[0]) | |
14 > with open(path, 'w') as f: | |
15 > f.write('--\n'.join(messages[1:])) | |
16 > EOF | |
17 | |
18 $ cat >> $HGRCPATH <<EOF | |
19 > [extensions] | |
20 > drawdag=$TESTDIR/drawdag.py | |
21 > split= | |
22 > [ui] | |
23 > interactive=1 | |
35479
8d05705bde0a
test-split: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35455
diff
changeset
|
24 > color=no |
8d05705bde0a
test-split: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35455
diff
changeset
|
25 > paginate=never |
35455 | 26 > [diff] |
27 > git=1 | |
28 > unified=0 | |
29 > [alias] | |
30 > glog=log -G -T '{rev}:{node|short} {desc} {bookmarks}\n' | |
31 > EOF | |
32 | |
33 #if obsstore-on | |
34 $ cat >> $HGRCPATH <<EOF | |
35 > [experimental] | |
36 > evolution=all | |
37 > EOF | |
38 #endif | |
39 | |
40 $ hg init a | |
41 $ cd a | |
42 | |
43 Nothing to split | |
44 | |
45 $ hg split | |
46 nothing to split | |
47 [1] | |
48 | |
49 $ hg commit -m empty --config ui.allowemptycommit=1 | |
50 $ hg split | |
51 abort: cannot split an empty revision | |
52 [255] | |
53 | |
54 $ rm -rf .hg | |
55 $ hg init | |
56 | |
57 Cannot split working directory | |
58 | |
59 $ hg split -r 'wdir()' | |
60 abort: cannot split working directory | |
61 [255] | |
62 | |
35479
8d05705bde0a
test-split: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35455
diff
changeset
|
63 Generate some content. The sed filter drop CR on Windows, which is dropped in |
8d05705bde0a
test-split: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35455
diff
changeset
|
64 the a > b line. |
35455 | 65 |
35479
8d05705bde0a
test-split: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35455
diff
changeset
|
66 $ $TESTDIR/seq.py 1 5 | sed 's/\r$//' >> a |
35455 | 67 $ hg ci -m a1 -A a -q |
68 $ hg bookmark -i r1 | |
69 $ sed 's/1/11/;s/3/33/;s/5/55/' a > b | |
70 $ mv b a | |
71 $ hg ci -m a2 -q | |
72 $ hg bookmark -i r2 | |
73 | |
74 Cannot split a public changeset | |
75 | |
76 $ hg phase --public -r 'all()' | |
77 $ hg split . | |
78 abort: cannot split public changeset | |
79 (see 'hg help phases' for details) | |
80 [255] | |
81 | |
82 $ hg phase --draft -f -r 'all()' | |
83 | |
84 Cannot split while working directory is dirty | |
85 | |
86 $ touch dirty | |
87 $ hg add dirty | |
88 $ hg split . | |
89 abort: uncommitted changes | |
90 [255] | |
91 $ hg forget dirty | |
92 $ rm dirty | |
93 | |
38412
a0e185f10454
tests: in test-split.t, save a "clean" copy of pre-split repo for later use
Kyle Lippincott <spectral@google.com>
parents:
36645
diff
changeset
|
94 Make a clean directory for future tests to build off of |
35455 | 95 |
38412
a0e185f10454
tests: in test-split.t, save a "clean" copy of pre-split repo for later use
Kyle Lippincott <spectral@google.com>
parents:
36645
diff
changeset
|
96 $ cp -R . ../clean |
a0e185f10454
tests: in test-split.t, save a "clean" copy of pre-split repo for later use
Kyle Lippincott <spectral@google.com>
parents:
36645
diff
changeset
|
97 |
a0e185f10454
tests: in test-split.t, save a "clean" copy of pre-split repo for later use
Kyle Lippincott <spectral@google.com>
parents:
36645
diff
changeset
|
98 Split a head |
35455 | 99 |
100 $ hg bookmark r3 | |
101 | |
102 $ hg split 'all()' | |
103 abort: cannot split multiple revisions | |
104 [255] | |
105 | |
41454
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
106 This function splits a bit strangely primarily to avoid changing the behavior of |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
107 the test after a bug was fixed with how split/commit --interactive handled |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
108 `diff.unified=0`: when there were no context lines, it kept only the last diff |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
109 hunk. When running split, this meant that runsplit was always recording three commits, |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
110 one for each diff hunk, in reverse order (the base commit was the last diff hunk |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
111 in the file). |
35455 | 112 $ runsplit() { |
113 > cat > $TESTTMP/messages <<EOF | |
114 > split 1 | |
115 > -- | |
116 > split 2 | |
117 > -- | |
118 > split 3 | |
119 > EOF | |
120 > cat <<EOF | hg split "$@" | |
121 > y | |
41454
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
122 > n |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
123 > n |
35455 | 124 > y |
125 > y | |
41454
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
126 > n |
35455 | 127 > y |
128 > y | |
129 > y | |
130 > EOF | |
131 > } | |
132 | |
133 $ HGEDITOR=false runsplit | |
134 diff --git a/a b/a | |
41454
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
135 3 hunks, 3 lines changed |
35455 | 136 examine changes to 'a'? [Ynesfdaq?] y |
137 | |
41454
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
138 @@ -1,1 +1,1 @@ |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
139 -1 |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
140 +11 |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
141 record change 1/3 to 'a'? [Ynesfdaq?] n |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
142 |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
143 @@ -3,1 +3,1 @@ 2 |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
144 -3 |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
145 +33 |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
146 record change 2/3 to 'a'? [Ynesfdaq?] n |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
147 |
35455 | 148 @@ -5,1 +5,1 @@ 4 |
149 -5 | |
150 +55 | |
41454
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
151 record change 3/3 to 'a'? [Ynesfdaq?] y |
35455 | 152 |
153 transaction abort! | |
154 rollback completed | |
155 abort: edit failed: false exited with status 1 | |
156 [255] | |
157 $ hg status | |
158 | |
35479
8d05705bde0a
test-split: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35455
diff
changeset
|
159 $ HGEDITOR="\"$PYTHON\" $TESTTMP/editor.py" |
35455 | 160 $ runsplit |
161 diff --git a/a b/a | |
41454
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
162 3 hunks, 3 lines changed |
35455 | 163 examine changes to 'a'? [Ynesfdaq?] y |
164 | |
41454
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
165 @@ -1,1 +1,1 @@ |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
166 -1 |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
167 +11 |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
168 record change 1/3 to 'a'? [Ynesfdaq?] n |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
169 |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
170 @@ -3,1 +3,1 @@ 2 |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
171 -3 |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
172 +33 |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
173 record change 2/3 to 'a'? [Ynesfdaq?] n |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
174 |
35455 | 175 @@ -5,1 +5,1 @@ 4 |
176 -5 | |
177 +55 | |
41454
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
178 record change 3/3 to 'a'? [Ynesfdaq?] y |
35455 | 179 |
180 EDITOR: HG: Splitting 1df0d5c5a3ab. Write commit message for the first split changeset. | |
181 EDITOR: a2 | |
182 EDITOR: | |
183 EDITOR: | |
184 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
185 EDITOR: HG: Leave message empty to abort commit. | |
186 EDITOR: HG: -- | |
187 EDITOR: HG: user: test | |
188 EDITOR: HG: branch 'default' | |
189 EDITOR: HG: changed a | |
190 created new head | |
191 diff --git a/a b/a | |
41454
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
192 2 hunks, 2 lines changed |
35455 | 193 examine changes to 'a'? [Ynesfdaq?] y |
194 | |
41454
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
195 @@ -1,1 +1,1 @@ |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
196 -1 |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
197 +11 |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
198 record change 1/2 to 'a'? [Ynesfdaq?] n |
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
199 |
35455 | 200 @@ -3,1 +3,1 @@ 2 |
201 -3 | |
202 +33 | |
41454
d1d3094b54f9
patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents:
39707
diff
changeset
|
203 record change 2/2 to 'a'? [Ynesfdaq?] y |
35455 | 204 |
205 EDITOR: HG: Splitting 1df0d5c5a3ab. So far it has been split into: | |
206 EDITOR: HG: - e704349bd21b: split 1 | |
207 EDITOR: HG: Write commit message for the next split changeset. | |
208 EDITOR: a2 | |
209 EDITOR: | |
210 EDITOR: | |
211 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
212 EDITOR: HG: Leave message empty to abort commit. | |
213 EDITOR: HG: -- | |
214 EDITOR: HG: user: test | |
215 EDITOR: HG: branch 'default' | |
216 EDITOR: HG: changed a | |
217 diff --git a/a b/a | |
218 1 hunks, 1 lines changed | |
219 examine changes to 'a'? [Ynesfdaq?] y | |
220 | |
221 @@ -1,1 +1,1 @@ | |
222 -1 | |
223 +11 | |
224 record this change to 'a'? [Ynesfdaq?] y | |
225 | |
226 EDITOR: HG: Splitting 1df0d5c5a3ab. So far it has been split into: | |
227 EDITOR: HG: - e704349bd21b: split 1 | |
228 EDITOR: HG: - a09ad58faae3: split 2 | |
229 EDITOR: HG: Write commit message for the next split changeset. | |
230 EDITOR: a2 | |
231 EDITOR: | |
232 EDITOR: | |
233 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
234 EDITOR: HG: Leave message empty to abort commit. | |
235 EDITOR: HG: -- | |
236 EDITOR: HG: user: test | |
237 EDITOR: HG: branch 'default' | |
238 EDITOR: HG: changed a | |
35479
8d05705bde0a
test-split: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
35455
diff
changeset
|
239 saved backup bundle to $TESTTMP/a/.hg/strip-backup/1df0d5c5a3ab-8341b760-split.hg (obsstore-off !) |
35455 | 240 |
241 #if obsstore-off | |
242 $ hg bookmark | |
243 r1 0:a61bcde8c529 | |
244 r2 3:00eebaf8d2e2 | |
245 * r3 3:00eebaf8d2e2 | |
246 $ hg glog -p | |
247 @ 3:00eebaf8d2e2 split 3 r2 r3 | |
248 | diff --git a/a b/a | |
249 | --- a/a | |
250 | +++ b/a | |
251 | @@ -1,1 +1,1 @@ | |
252 | -1 | |
253 | +11 | |
254 | | |
255 o 2:a09ad58faae3 split 2 | |
256 | diff --git a/a b/a | |
257 | --- a/a | |
258 | +++ b/a | |
259 | @@ -3,1 +3,1 @@ | |
260 | -3 | |
261 | +33 | |
262 | | |
263 o 1:e704349bd21b split 1 | |
264 | diff --git a/a b/a | |
265 | --- a/a | |
266 | +++ b/a | |
267 | @@ -5,1 +5,1 @@ | |
268 | -5 | |
269 | +55 | |
270 | | |
271 o 0:a61bcde8c529 a1 r1 | |
272 diff --git a/a b/a | |
273 new file mode 100644 | |
274 --- /dev/null | |
275 +++ b/a | |
276 @@ -0,0 +1,5 @@ | |
277 +1 | |
278 +2 | |
279 +3 | |
280 +4 | |
281 +5 | |
282 | |
283 #else | |
284 $ hg bookmark | |
285 r1 0:a61bcde8c529 | |
286 r2 4:00eebaf8d2e2 | |
287 * r3 4:00eebaf8d2e2 | |
288 $ hg glog | |
289 @ 4:00eebaf8d2e2 split 3 r2 r3 | |
290 | | |
291 o 3:a09ad58faae3 split 2 | |
292 | | |
293 o 2:e704349bd21b split 1 | |
294 | | |
295 o 0:a61bcde8c529 a1 r1 | |
296 | |
297 #endif | |
298 | |
299 Split a head while working parent is not that head | |
300 | |
38412
a0e185f10454
tests: in test-split.t, save a "clean" copy of pre-split repo for later use
Kyle Lippincott <spectral@google.com>
parents:
36645
diff
changeset
|
301 $ cp -R $TESTTMP/clean $TESTTMP/b |
35455 | 302 $ cd $TESTTMP/b |
303 | |
304 $ hg up 0 -q | |
305 $ hg bookmark r3 | |
306 | |
307 $ runsplit tip >/dev/null | |
308 | |
309 #if obsstore-off | |
310 $ hg bookmark | |
311 r1 0:a61bcde8c529 | |
312 r2 3:00eebaf8d2e2 | |
313 * r3 0:a61bcde8c529 | |
314 $ hg glog | |
315 o 3:00eebaf8d2e2 split 3 r2 | |
316 | | |
317 o 2:a09ad58faae3 split 2 | |
318 | | |
319 o 1:e704349bd21b split 1 | |
320 | | |
321 @ 0:a61bcde8c529 a1 r1 r3 | |
322 | |
323 #else | |
324 $ hg bookmark | |
325 r1 0:a61bcde8c529 | |
326 r2 4:00eebaf8d2e2 | |
327 * r3 0:a61bcde8c529 | |
328 $ hg glog | |
329 o 4:00eebaf8d2e2 split 3 r2 | |
330 | | |
331 o 3:a09ad58faae3 split 2 | |
332 | | |
333 o 2:e704349bd21b split 1 | |
334 | | |
335 @ 0:a61bcde8c529 a1 r1 r3 | |
336 | |
337 #endif | |
338 | |
339 Split a non-head | |
340 | |
38412
a0e185f10454
tests: in test-split.t, save a "clean" copy of pre-split repo for later use
Kyle Lippincott <spectral@google.com>
parents:
36645
diff
changeset
|
341 $ cp -R $TESTTMP/clean $TESTTMP/c |
35455 | 342 $ cd $TESTTMP/c |
343 $ echo d > d | |
344 $ hg ci -m d1 -A d | |
345 $ hg bookmark -i d1 | |
346 $ echo 2 >> d | |
347 $ hg ci -m d2 | |
348 $ echo 3 >> d | |
349 $ hg ci -m d3 | |
350 $ hg bookmark -i d3 | |
351 $ hg up '.^' -q | |
352 $ hg bookmark d2 | |
353 $ cp -R . ../d | |
354 | |
355 $ runsplit -r 1 | grep rebasing | |
356 rebasing 2:b5c5ea414030 "d1" (d1) | |
357 rebasing 3:f4a0a8d004cc "d2" (d2) | |
358 rebasing 4:777940761eba "d3" (d3) | |
359 #if obsstore-off | |
360 $ hg bookmark | |
361 d1 4:c4b449ef030e | |
362 * d2 5:c9dd00ab36a3 | |
363 d3 6:19f476bc865c | |
364 r1 0:a61bcde8c529 | |
365 r2 3:00eebaf8d2e2 | |
366 $ hg glog -p | |
367 o 6:19f476bc865c d3 d3 | |
368 | diff --git a/d b/d | |
369 | --- a/d | |
370 | +++ b/d | |
371 | @@ -2,0 +3,1 @@ | |
372 | +3 | |
373 | | |
374 @ 5:c9dd00ab36a3 d2 d2 | |
375 | diff --git a/d b/d | |
376 | --- a/d | |
377 | +++ b/d | |
378 | @@ -1,0 +2,1 @@ | |
379 | +2 | |
380 | | |
381 o 4:c4b449ef030e d1 d1 | |
382 | diff --git a/d b/d | |
383 | new file mode 100644 | |
384 | --- /dev/null | |
385 | +++ b/d | |
386 | @@ -0,0 +1,1 @@ | |
387 | +d | |
388 | | |
389 o 3:00eebaf8d2e2 split 3 r2 | |
390 | diff --git a/a b/a | |
391 | --- a/a | |
392 | +++ b/a | |
393 | @@ -1,1 +1,1 @@ | |
394 | -1 | |
395 | +11 | |
396 | | |
397 o 2:a09ad58faae3 split 2 | |
398 | diff --git a/a b/a | |
399 | --- a/a | |
400 | +++ b/a | |
401 | @@ -3,1 +3,1 @@ | |
402 | -3 | |
403 | +33 | |
404 | | |
405 o 1:e704349bd21b split 1 | |
406 | diff --git a/a b/a | |
407 | --- a/a | |
408 | +++ b/a | |
409 | @@ -5,1 +5,1 @@ | |
410 | -5 | |
411 | +55 | |
412 | | |
413 o 0:a61bcde8c529 a1 r1 | |
414 diff --git a/a b/a | |
415 new file mode 100644 | |
416 --- /dev/null | |
417 +++ b/a | |
418 @@ -0,0 +1,5 @@ | |
419 +1 | |
420 +2 | |
421 +3 | |
422 +4 | |
423 +5 | |
424 | |
425 #else | |
426 $ hg bookmark | |
427 d1 8:c4b449ef030e | |
428 * d2 9:c9dd00ab36a3 | |
429 d3 10:19f476bc865c | |
430 r1 0:a61bcde8c529 | |
431 r2 7:00eebaf8d2e2 | |
432 $ hg glog | |
433 o 10:19f476bc865c d3 d3 | |
434 | | |
435 @ 9:c9dd00ab36a3 d2 d2 | |
436 | | |
437 o 8:c4b449ef030e d1 d1 | |
438 | | |
439 o 7:00eebaf8d2e2 split 3 r2 | |
440 | | |
441 o 6:a09ad58faae3 split 2 | |
442 | | |
443 o 5:e704349bd21b split 1 | |
444 | | |
445 o 0:a61bcde8c529 a1 r1 | |
446 | |
447 #endif | |
448 | |
449 Split a non-head without rebase | |
450 | |
451 $ cd $TESTTMP/d | |
452 #if obsstore-off | |
453 $ runsplit -r 1 --no-rebase | |
454 abort: cannot split changeset with children without rebase | |
455 [255] | |
456 #else | |
457 $ runsplit -r 1 --no-rebase >/dev/null | |
35709
1a09dad8b85a
evolution: report new unstable changesets
Martin von Zweigbergk <martinvonz@google.com>
parents:
35508
diff
changeset
|
458 3 new orphan changesets |
35455 | 459 $ hg bookmark |
460 d1 2:b5c5ea414030 | |
461 * d2 3:f4a0a8d004cc | |
462 d3 4:777940761eba | |
463 r1 0:a61bcde8c529 | |
464 r2 7:00eebaf8d2e2 | |
465 | |
466 $ hg glog | |
467 o 7:00eebaf8d2e2 split 3 r2 | |
468 | | |
469 o 6:a09ad58faae3 split 2 | |
470 | | |
471 o 5:e704349bd21b split 1 | |
472 | | |
35508
9b3f95d9783d
graphlog: add another graph node type, unstable, using character "*" (BC)
Anton Shestakov <av6@dwimlabs.net>
parents:
35479
diff
changeset
|
473 | * 4:777940761eba d3 d3 |
35455 | 474 | | |
475 | @ 3:f4a0a8d004cc d2 d2 | |
476 | | | |
35508
9b3f95d9783d
graphlog: add another graph node type, unstable, using character "*" (BC)
Anton Shestakov <av6@dwimlabs.net>
parents:
35479
diff
changeset
|
477 | * 2:b5c5ea414030 d1 d1 |
35455 | 478 | | |
479 | x 1:1df0d5c5a3ab a2 | |
480 |/ | |
481 o 0:a61bcde8c529 a1 r1 | |
482 | |
483 #endif | |
484 | |
485 Split a non-head with obsoleted descendants | |
486 | |
487 #if obsstore-on | |
488 $ hg init $TESTTMP/e | |
489 $ cd $TESTTMP/e | |
490 $ hg debugdrawdag <<'EOS' | |
491 > H I J | |
492 > | | | | |
493 > F G1 G2 # amend: G1 -> G2 | |
494 > | | / # prune: F | |
495 > C D E | |
496 > \|/ | |
497 > B | |
498 > | | |
499 > A | |
500 > EOS | |
35709
1a09dad8b85a
evolution: report new unstable changesets
Martin von Zweigbergk <martinvonz@google.com>
parents:
35508
diff
changeset
|
501 2 new orphan changesets |
35455 | 502 $ eval `hg tags -T '{tag}={node}\n'` |
503 $ rm .hg/localtags | |
504 $ hg split $B --config experimental.evolution=createmarkers | |
505 abort: split would leave orphaned changesets behind | |
506 [255] | |
507 $ cat > $TESTTMP/messages <<EOF | |
508 > Split B | |
509 > EOF | |
510 $ cat <<EOF | hg split $B | |
511 > y | |
512 > y | |
513 > EOF | |
514 diff --git a/B b/B | |
515 new file mode 100644 | |
516 examine changes to 'B'? [Ynesfdaq?] y | |
517 | |
518 @@ -0,0 +1,1 @@ | |
519 +B | |
520 \ No newline at end of file | |
521 record this change to 'B'? [Ynesfdaq?] y | |
522 | |
523 EDITOR: HG: Splitting 112478962961. Write commit message for the first split changeset. | |
524 EDITOR: B | |
525 EDITOR: | |
526 EDITOR: | |
527 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
528 EDITOR: HG: Leave message empty to abort commit. | |
529 EDITOR: HG: -- | |
530 EDITOR: HG: user: test | |
531 EDITOR: HG: branch 'default' | |
532 EDITOR: HG: added B | |
533 created new head | |
534 rebasing 2:26805aba1e60 "C" | |
535 rebasing 3:be0ef73c17ad "D" | |
536 rebasing 4:49cb92066bfd "E" | |
537 rebasing 7:97a6268cc7ef "G2" | |
538 rebasing 10:e2f1e425c0db "J" | |
539 $ hg glog -r 'sort(all(), topo)' | |
540 o 16:556c085f8b52 J | |
541 | | |
542 o 15:8761f6c9123f G2 | |
543 | | |
544 o 14:a7aeffe59b65 E | |
545 | | |
546 | o 13:e1e914ede9ab D | |
547 |/ | |
548 | o 12:01947e9b98aa C | |
549 |/ | |
550 o 11:0947baa74d47 Split B | |
551 | | |
35508
9b3f95d9783d
graphlog: add another graph node type, unstable, using character "*" (BC)
Anton Shestakov <av6@dwimlabs.net>
parents:
35479
diff
changeset
|
552 | * 9:88ede1d5ee13 I |
35455 | 553 | | |
554 | x 6:af8cbf225b7b G1 | |
555 | | | |
556 | x 3:be0ef73c17ad D | |
557 | | | |
35508
9b3f95d9783d
graphlog: add another graph node type, unstable, using character "*" (BC)
Anton Shestakov <av6@dwimlabs.net>
parents:
35479
diff
changeset
|
558 | | * 8:74863e5b5074 H |
35455 | 559 | | | |
560 | | x 5:ee481a2a1e69 F | |
561 | | | | |
562 | | x 2:26805aba1e60 C | |
563 | |/ | |
564 | x 1:112478962961 B | |
565 |/ | |
566 o 0:426bada5c675 A | |
567 | |
568 #endif | |
38424
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
569 |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
570 Preserve secret phase in split |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
571 |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
572 $ cp -R $TESTTMP/clean $TESTTMP/phases1 |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
573 $ cd $TESTTMP/phases1 |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
574 $ hg phase --secret -fr tip |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
575 $ hg log -T '{short(node)} {phase}\n' |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
576 1df0d5c5a3ab secret |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
577 a61bcde8c529 draft |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
578 $ runsplit tip >/dev/null |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
579 $ hg log -T '{short(node)} {phase}\n' |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
580 00eebaf8d2e2 secret |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
581 a09ad58faae3 secret |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
582 e704349bd21b secret |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
583 a61bcde8c529 draft |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
584 |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
585 Do not move things to secret even if phases.new-commit=secret |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
586 |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
587 $ cp -R $TESTTMP/clean $TESTTMP/phases2 |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
588 $ cd $TESTTMP/phases2 |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
589 $ cat >> .hg/hgrc <<EOF |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
590 > [phases] |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
591 > new-commit=secret |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
592 > EOF |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
593 $ hg log -T '{short(node)} {phase}\n' |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
594 1df0d5c5a3ab draft |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
595 a61bcde8c529 draft |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
596 $ runsplit tip >/dev/null |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
597 $ hg log -T '{short(node)} {phase}\n' |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
598 00eebaf8d2e2 draft |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
599 a09ad58faae3 draft |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
600 e704349bd21b draft |
4f885770c4a2
split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents:
38412
diff
changeset
|
601 a61bcde8c529 draft |
41557
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
602 |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
603 `hg split` with ignoreblanklines=1 does not infinite loop |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
604 |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
605 $ mkdir $TESTTMP/f |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
606 $ hg init $TESTTMP/f/a |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
607 $ cd $TESTTMP/f/a |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
608 $ printf '1\n2\n3\n4\n5\n' > foo |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
609 $ cp foo bar |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
610 $ hg ci -qAm initial |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
611 $ printf '1\n\n2\n3\ntest\n4\n5\n' > bar |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
612 $ printf '1\n2\n3\ntest\n4\n5\n' > foo |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
613 $ hg ci -qm splitme |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
614 $ cat > $TESTTMP/messages <<EOF |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
615 > split 1 |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
616 > -- |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
617 > split 2 |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
618 > EOF |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
619 $ printf 'f\nn\nf\n' | hg --config extensions.split= --config diff.ignoreblanklines=1 split |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
620 diff --git a/bar b/bar |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
621 2 hunks, 2 lines changed |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
622 examine changes to 'bar'? [Ynesfdaq?] f |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
623 |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
624 diff --git a/foo b/foo |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
625 1 hunks, 1 lines changed |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
626 examine changes to 'foo'? [Ynesfdaq?] n |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
627 |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
628 EDITOR: HG: Splitting dd3c45017cbf. Write commit message for the first split changeset. |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
629 EDITOR: splitme |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
630 EDITOR: |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
631 EDITOR: |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
632 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed. |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
633 EDITOR: HG: Leave message empty to abort commit. |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
634 EDITOR: HG: -- |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
635 EDITOR: HG: user: test |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
636 EDITOR: HG: branch 'default' |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
637 EDITOR: HG: changed bar |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
638 created new head |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
639 diff --git a/foo b/foo |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
640 1 hunks, 1 lines changed |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
641 examine changes to 'foo'? [Ynesfdaq?] f |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
642 |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
643 EDITOR: HG: Splitting dd3c45017cbf. So far it has been split into: |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
644 EDITOR: HG: - f205aea1c624: split 1 |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
645 EDITOR: HG: Write commit message for the next split changeset. |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
646 EDITOR: splitme |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
647 EDITOR: |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
648 EDITOR: |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
649 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed. |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
650 EDITOR: HG: Leave message empty to abort commit. |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
651 EDITOR: HG: -- |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
652 EDITOR: HG: user: test |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
653 EDITOR: HG: branch 'default' |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
654 EDITOR: HG: changed foo |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
655 saved backup bundle to $TESTTMP/f/a/.hg/strip-backup/dd3c45017cbf-463441b5-split.hg (obsstore-off !) |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
656 |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
657 Let's try that again, with a slightly different set of patches, to ensure that |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
658 the ignoreblanklines thing isn't somehow position dependent. |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
659 |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
660 $ hg init $TESTTMP/f/b |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
661 $ cd $TESTTMP/f/b |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
662 $ printf '1\n2\n3\n4\n5\n' > foo |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
663 $ cp foo bar |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
664 $ hg ci -qAm initial |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
665 $ printf '1\n2\n3\ntest\n4\n5\n' > bar |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
666 $ printf '1\n2\n3\ntest\n4\n\n5\n' > foo |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
667 $ hg ci -qm splitme |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
668 $ cat > $TESTTMP/messages <<EOF |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
669 > split 1 |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
670 > -- |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
671 > split 2 |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
672 > EOF |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
673 $ printf 'f\nn\nf\n' | hg --config extensions.split= --config diff.ignoreblanklines=1 split |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
674 diff --git a/bar b/bar |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
675 1 hunks, 1 lines changed |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
676 examine changes to 'bar'? [Ynesfdaq?] f |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
677 |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
678 diff --git a/foo b/foo |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
679 2 hunks, 2 lines changed |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
680 examine changes to 'foo'? [Ynesfdaq?] n |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
681 |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
682 EDITOR: HG: Splitting 904c80b40a4a. Write commit message for the first split changeset. |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
683 EDITOR: splitme |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
684 EDITOR: |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
685 EDITOR: |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
686 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed. |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
687 EDITOR: HG: Leave message empty to abort commit. |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
688 EDITOR: HG: -- |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
689 EDITOR: HG: user: test |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
690 EDITOR: HG: branch 'default' |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
691 EDITOR: HG: changed bar |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
692 created new head |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
693 diff --git a/foo b/foo |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
694 2 hunks, 2 lines changed |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
695 examine changes to 'foo'? [Ynesfdaq?] f |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
696 |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
697 EDITOR: HG: Splitting 904c80b40a4a. So far it has been split into: |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
698 EDITOR: HG: - ffecf40fa954: split 1 |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
699 EDITOR: HG: Write commit message for the next split changeset. |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
700 EDITOR: splitme |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
701 EDITOR: |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
702 EDITOR: |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
703 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed. |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
704 EDITOR: HG: Leave message empty to abort commit. |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
705 EDITOR: HG: -- |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
706 EDITOR: HG: user: test |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
707 EDITOR: HG: branch 'default' |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
708 EDITOR: HG: changed foo |
3a01ce246ece
commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents:
41454
diff
changeset
|
709 saved backup bundle to $TESTTMP/f/b/.hg/strip-backup/904c80b40a4a-47fb907f-split.hg (obsstore-off !) |