##// END OF EJS Templates
tests: adjust expected prompt choice outputs in test-record.t for Windows...
FUJIWARA Katsunori -
r23054:40c01f95 stable
parent child Browse files
Show More
@@ -1,1371 +1,1377
1 Set up a repo
1 Set up a repo
2
2
3 $ echo "[ui]" >> $HGRCPATH
3 $ echo "[ui]" >> $HGRCPATH
4 $ echo "interactive=true" >> $HGRCPATH
4 $ echo "interactive=true" >> $HGRCPATH
5 $ echo "[extensions]" >> $HGRCPATH
5 $ echo "[extensions]" >> $HGRCPATH
6 $ echo "record=" >> $HGRCPATH
6 $ echo "record=" >> $HGRCPATH
7
7
8 $ hg init a
8 $ hg init a
9 $ cd a
9 $ cd a
10
10
11 Select no files
11 Select no files
12
12
13 $ touch empty-rw
13 $ touch empty-rw
14 $ hg add empty-rw
14 $ hg add empty-rw
15
15
16 $ hg record empty-rw<<EOF
16 $ hg record empty-rw<<EOF
17 > n
17 > n
18 > EOF
18 > EOF
19 diff --git a/empty-rw b/empty-rw
19 diff --git a/empty-rw b/empty-rw
20 new file mode 100644
20 new file mode 100644
21 examine changes to 'empty-rw'? [Ynesfdaq?] n
21 examine changes to 'empty-rw'? [Ynesfdaq?] n
22
22
23 no changes to record
23 no changes to record
24
24
25 $ hg tip -p
25 $ hg tip -p
26 changeset: -1:000000000000
26 changeset: -1:000000000000
27 tag: tip
27 tag: tip
28 user:
28 user:
29 date: Thu Jan 01 00:00:00 1970 +0000
29 date: Thu Jan 01 00:00:00 1970 +0000
30
30
31
31
32
32
33 Select files but no hunks
33 Select files but no hunks
34
34
35 $ hg record empty-rw<<EOF
35 $ hg record empty-rw<<EOF
36 > y
36 > y
37 > n
37 > n
38 > EOF
38 > EOF
39 diff --git a/empty-rw b/empty-rw
39 diff --git a/empty-rw b/empty-rw
40 new file mode 100644
40 new file mode 100644
41 examine changes to 'empty-rw'? [Ynesfdaq?] y
41 examine changes to 'empty-rw'? [Ynesfdaq?] y
42
42
43 abort: empty commit message
43 abort: empty commit message
44 [255]
44 [255]
45
45
46 $ hg tip -p
46 $ hg tip -p
47 changeset: -1:000000000000
47 changeset: -1:000000000000
48 tag: tip
48 tag: tip
49 user:
49 user:
50 date: Thu Jan 01 00:00:00 1970 +0000
50 date: Thu Jan 01 00:00:00 1970 +0000
51
51
52
52
53
53
54 Record empty file
54 Record empty file
55
55
56 $ hg record -d '0 0' -m empty empty-rw<<EOF
56 $ hg record -d '0 0' -m empty empty-rw<<EOF
57 > y
57 > y
58 > y
58 > y
59 > EOF
59 > EOF
60 diff --git a/empty-rw b/empty-rw
60 diff --git a/empty-rw b/empty-rw
61 new file mode 100644
61 new file mode 100644
62 examine changes to 'empty-rw'? [Ynesfdaq?] y
62 examine changes to 'empty-rw'? [Ynesfdaq?] y
63
63
64
64
65 $ hg tip -p
65 $ hg tip -p
66 changeset: 0:c0708cf4e46e
66 changeset: 0:c0708cf4e46e
67 tag: tip
67 tag: tip
68 user: test
68 user: test
69 date: Thu Jan 01 00:00:00 1970 +0000
69 date: Thu Jan 01 00:00:00 1970 +0000
70 summary: empty
70 summary: empty
71
71
72
72
73
73
74 Summary shows we updated to the new cset
74 Summary shows we updated to the new cset
75
75
76 $ hg summary
76 $ hg summary
77 parent: 0:c0708cf4e46e tip
77 parent: 0:c0708cf4e46e tip
78 empty
78 empty
79 branch: default
79 branch: default
80 commit: (clean)
80 commit: (clean)
81 update: (current)
81 update: (current)
82
82
83 Rename empty file
83 Rename empty file
84
84
85 $ hg mv empty-rw empty-rename
85 $ hg mv empty-rw empty-rename
86 $ hg record -d '1 0' -m rename<<EOF
86 $ hg record -d '1 0' -m rename<<EOF
87 > y
87 > y
88 > EOF
88 > EOF
89 diff --git a/empty-rw b/empty-rename
89 diff --git a/empty-rw b/empty-rename
90 rename from empty-rw
90 rename from empty-rw
91 rename to empty-rename
91 rename to empty-rename
92 examine changes to 'empty-rw' and 'empty-rename'? [Ynesfdaq?] y
92 examine changes to 'empty-rw' and 'empty-rename'? [Ynesfdaq?] y
93
93
94
94
95 $ hg tip -p
95 $ hg tip -p
96 changeset: 1:d695e8dcb197
96 changeset: 1:d695e8dcb197
97 tag: tip
97 tag: tip
98 user: test
98 user: test
99 date: Thu Jan 01 00:00:01 1970 +0000
99 date: Thu Jan 01 00:00:01 1970 +0000
100 summary: rename
100 summary: rename
101
101
102
102
103
103
104 Copy empty file
104 Copy empty file
105
105
106 $ hg cp empty-rename empty-copy
106 $ hg cp empty-rename empty-copy
107 $ hg record -d '2 0' -m copy<<EOF
107 $ hg record -d '2 0' -m copy<<EOF
108 > y
108 > y
109 > EOF
109 > EOF
110 diff --git a/empty-rename b/empty-copy
110 diff --git a/empty-rename b/empty-copy
111 copy from empty-rename
111 copy from empty-rename
112 copy to empty-copy
112 copy to empty-copy
113 examine changes to 'empty-rename' and 'empty-copy'? [Ynesfdaq?] y
113 examine changes to 'empty-rename' and 'empty-copy'? [Ynesfdaq?] y
114
114
115
115
116 $ hg tip -p
116 $ hg tip -p
117 changeset: 2:1d4b90bea524
117 changeset: 2:1d4b90bea524
118 tag: tip
118 tag: tip
119 user: test
119 user: test
120 date: Thu Jan 01 00:00:02 1970 +0000
120 date: Thu Jan 01 00:00:02 1970 +0000
121 summary: copy
121 summary: copy
122
122
123
123
124
124
125 Delete empty file
125 Delete empty file
126
126
127 $ hg rm empty-copy
127 $ hg rm empty-copy
128 $ hg record -d '3 0' -m delete<<EOF
128 $ hg record -d '3 0' -m delete<<EOF
129 > y
129 > y
130 > EOF
130 > EOF
131 diff --git a/empty-copy b/empty-copy
131 diff --git a/empty-copy b/empty-copy
132 deleted file mode 100644
132 deleted file mode 100644
133 examine changes to 'empty-copy'? [Ynesfdaq?] y
133 examine changes to 'empty-copy'? [Ynesfdaq?] y
134
134
135
135
136 $ hg tip -p
136 $ hg tip -p
137 changeset: 3:b39a238f01a1
137 changeset: 3:b39a238f01a1
138 tag: tip
138 tag: tip
139 user: test
139 user: test
140 date: Thu Jan 01 00:00:03 1970 +0000
140 date: Thu Jan 01 00:00:03 1970 +0000
141 summary: delete
141 summary: delete
142
142
143
143
144
144
145 Add binary file
145 Add binary file
146
146
147 $ hg bundle --base -2 tip.bundle
147 $ hg bundle --base -2 tip.bundle
148 1 changesets found
148 1 changesets found
149 $ hg add tip.bundle
149 $ hg add tip.bundle
150 $ hg record -d '4 0' -m binary<<EOF
150 $ hg record -d '4 0' -m binary<<EOF
151 > y
151 > y
152 > EOF
152 > EOF
153 diff --git a/tip.bundle b/tip.bundle
153 diff --git a/tip.bundle b/tip.bundle
154 new file mode 100644
154 new file mode 100644
155 this is a binary file
155 this is a binary file
156 examine changes to 'tip.bundle'? [Ynesfdaq?] y
156 examine changes to 'tip.bundle'? [Ynesfdaq?] y
157
157
158
158
159 $ hg tip -p
159 $ hg tip -p
160 changeset: 4:ad816da3711e
160 changeset: 4:ad816da3711e
161 tag: tip
161 tag: tip
162 user: test
162 user: test
163 date: Thu Jan 01 00:00:04 1970 +0000
163 date: Thu Jan 01 00:00:04 1970 +0000
164 summary: binary
164 summary: binary
165
165
166 diff -r b39a238f01a1 -r ad816da3711e tip.bundle
166 diff -r b39a238f01a1 -r ad816da3711e tip.bundle
167 Binary file tip.bundle has changed
167 Binary file tip.bundle has changed
168
168
169
169
170 Change binary file
170 Change binary file
171
171
172 $ hg bundle --base -2 tip.bundle
172 $ hg bundle --base -2 tip.bundle
173 1 changesets found
173 1 changesets found
174 $ hg record -d '5 0' -m binary-change<<EOF
174 $ hg record -d '5 0' -m binary-change<<EOF
175 > y
175 > y
176 > EOF
176 > EOF
177 diff --git a/tip.bundle b/tip.bundle
177 diff --git a/tip.bundle b/tip.bundle
178 this modifies a binary file (all or nothing)
178 this modifies a binary file (all or nothing)
179 examine changes to 'tip.bundle'? [Ynesfdaq?] y
179 examine changes to 'tip.bundle'? [Ynesfdaq?] y
180
180
181
181
182 $ hg tip -p
182 $ hg tip -p
183 changeset: 5:dccd6f3eb485
183 changeset: 5:dccd6f3eb485
184 tag: tip
184 tag: tip
185 user: test
185 user: test
186 date: Thu Jan 01 00:00:05 1970 +0000
186 date: Thu Jan 01 00:00:05 1970 +0000
187 summary: binary-change
187 summary: binary-change
188
188
189 diff -r ad816da3711e -r dccd6f3eb485 tip.bundle
189 diff -r ad816da3711e -r dccd6f3eb485 tip.bundle
190 Binary file tip.bundle has changed
190 Binary file tip.bundle has changed
191
191
192
192
193 Rename and change binary file
193 Rename and change binary file
194
194
195 $ hg mv tip.bundle top.bundle
195 $ hg mv tip.bundle top.bundle
196 $ hg bundle --base -2 top.bundle
196 $ hg bundle --base -2 top.bundle
197 1 changesets found
197 1 changesets found
198 $ hg record -d '6 0' -m binary-change-rename<<EOF
198 $ hg record -d '6 0' -m binary-change-rename<<EOF
199 > y
199 > y
200 > EOF
200 > EOF
201 diff --git a/tip.bundle b/top.bundle
201 diff --git a/tip.bundle b/top.bundle
202 rename from tip.bundle
202 rename from tip.bundle
203 rename to top.bundle
203 rename to top.bundle
204 this modifies a binary file (all or nothing)
204 this modifies a binary file (all or nothing)
205 examine changes to 'tip.bundle' and 'top.bundle'? [Ynesfdaq?] y
205 examine changes to 'tip.bundle' and 'top.bundle'? [Ynesfdaq?] y
206
206
207
207
208 $ hg tip -p
208 $ hg tip -p
209 changeset: 6:7fa44105f5b3
209 changeset: 6:7fa44105f5b3
210 tag: tip
210 tag: tip
211 user: test
211 user: test
212 date: Thu Jan 01 00:00:06 1970 +0000
212 date: Thu Jan 01 00:00:06 1970 +0000
213 summary: binary-change-rename
213 summary: binary-change-rename
214
214
215 diff -r dccd6f3eb485 -r 7fa44105f5b3 tip.bundle
215 diff -r dccd6f3eb485 -r 7fa44105f5b3 tip.bundle
216 Binary file tip.bundle has changed
216 Binary file tip.bundle has changed
217 diff -r dccd6f3eb485 -r 7fa44105f5b3 top.bundle
217 diff -r dccd6f3eb485 -r 7fa44105f5b3 top.bundle
218 Binary file top.bundle has changed
218 Binary file top.bundle has changed
219
219
220
220
221 Add plain file
221 Add plain file
222
222
223 $ for i in 1 2 3 4 5 6 7 8 9 10; do
223 $ for i in 1 2 3 4 5 6 7 8 9 10; do
224 > echo $i >> plain
224 > echo $i >> plain
225 > done
225 > done
226
226
227 $ hg add plain
227 $ hg add plain
228 $ hg record -d '7 0' -m plain plain<<EOF
228 $ hg record -d '7 0' -m plain plain<<EOF
229 > y
229 > y
230 > y
230 > y
231 > EOF
231 > EOF
232 diff --git a/plain b/plain
232 diff --git a/plain b/plain
233 new file mode 100644
233 new file mode 100644
234 examine changes to 'plain'? [Ynesfdaq?] y
234 examine changes to 'plain'? [Ynesfdaq?] y
235
235
236
236
237 $ hg tip -p
237 $ hg tip -p
238 changeset: 7:11fb457c1be4
238 changeset: 7:11fb457c1be4
239 tag: tip
239 tag: tip
240 user: test
240 user: test
241 date: Thu Jan 01 00:00:07 1970 +0000
241 date: Thu Jan 01 00:00:07 1970 +0000
242 summary: plain
242 summary: plain
243
243
244 diff -r 7fa44105f5b3 -r 11fb457c1be4 plain
244 diff -r 7fa44105f5b3 -r 11fb457c1be4 plain
245 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
245 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
246 +++ b/plain Thu Jan 01 00:00:07 1970 +0000
246 +++ b/plain Thu Jan 01 00:00:07 1970 +0000
247 @@ -0,0 +1,10 @@
247 @@ -0,0 +1,10 @@
248 +1
248 +1
249 +2
249 +2
250 +3
250 +3
251 +4
251 +4
252 +5
252 +5
253 +6
253 +6
254 +7
254 +7
255 +8
255 +8
256 +9
256 +9
257 +10
257 +10
258
258
259 Modify end of plain file with username unset
259 Modify end of plain file with username unset
260
260
261 $ echo 11 >> plain
261 $ echo 11 >> plain
262 $ unset HGUSER
262 $ unset HGUSER
263 $ hg record --config ui.username= -d '8 0' -m end plain
263 $ hg record --config ui.username= -d '8 0' -m end plain
264 abort: no username supplied
264 abort: no username supplied
265 (use "hg config --edit" to set your username)
265 (use "hg config --edit" to set your username)
266 [255]
266 [255]
267
267
268
268
269 Modify end of plain file, also test that diffopts are accounted for
269 Modify end of plain file, also test that diffopts are accounted for
270
270
271 $ HGUSER="test"
271 $ HGUSER="test"
272 $ export HGUSER
272 $ export HGUSER
273 $ hg record --config diff.showfunc=true -d '8 0' -m end plain <<EOF
273 $ hg record --config diff.showfunc=true -d '8 0' -m end plain <<EOF
274 > y
274 > y
275 > y
275 > y
276 > EOF
276 > EOF
277 diff --git a/plain b/plain
277 diff --git a/plain b/plain
278 1 hunks, 1 lines changed
278 1 hunks, 1 lines changed
279 examine changes to 'plain'? [Ynesfdaq?] y
279 examine changes to 'plain'? [Ynesfdaq?] y
280
280
281 @@ -8,3 +8,4 @@ 7
281 @@ -8,3 +8,4 @@ 7
282 8
282 8
283 9
283 9
284 10
284 10
285 +11
285 +11
286 record this change to 'plain'? [Ynesfdaq?] y
286 record this change to 'plain'? [Ynesfdaq?] y
287
287
288
288
289 Modify end of plain file, no EOL
289 Modify end of plain file, no EOL
290
290
291 $ hg tip --template '{node}' >> plain
291 $ hg tip --template '{node}' >> plain
292 $ hg record -d '9 0' -m noeol plain <<EOF
292 $ hg record -d '9 0' -m noeol plain <<EOF
293 > y
293 > y
294 > y
294 > y
295 > EOF
295 > EOF
296 diff --git a/plain b/plain
296 diff --git a/plain b/plain
297 1 hunks, 1 lines changed
297 1 hunks, 1 lines changed
298 examine changes to 'plain'? [Ynesfdaq?] y
298 examine changes to 'plain'? [Ynesfdaq?] y
299
299
300 @@ -9,3 +9,4 @@
300 @@ -9,3 +9,4 @@
301 9
301 9
302 10
302 10
303 11
303 11
304 +7264f99c5f5ff3261504828afa4fb4d406c3af54
304 +7264f99c5f5ff3261504828afa4fb4d406c3af54
305 \ No newline at end of file
305 \ No newline at end of file
306 record this change to 'plain'? [Ynesfdaq?] y
306 record this change to 'plain'? [Ynesfdaq?] y
307
307
308
308
309 Modify end of plain file, add EOL
309 Modify end of plain file, add EOL
310
310
311 $ echo >> plain
311 $ echo >> plain
312 $ echo 1 > plain2
312 $ echo 1 > plain2
313 $ hg add plain2
313 $ hg add plain2
314 $ hg record -d '10 0' -m eol plain plain2 <<EOF
314 $ hg record -d '10 0' -m eol plain plain2 <<EOF
315 > y
315 > y
316 > y
316 > y
317 > y
317 > y
318 > EOF
318 > EOF
319 diff --git a/plain b/plain
319 diff --git a/plain b/plain
320 1 hunks, 1 lines changed
320 1 hunks, 1 lines changed
321 examine changes to 'plain'? [Ynesfdaq?] y
321 examine changes to 'plain'? [Ynesfdaq?] y
322
322
323 @@ -9,4 +9,4 @@
323 @@ -9,4 +9,4 @@
324 9
324 9
325 10
325 10
326 11
326 11
327 -7264f99c5f5ff3261504828afa4fb4d406c3af54
327 -7264f99c5f5ff3261504828afa4fb4d406c3af54
328 \ No newline at end of file
328 \ No newline at end of file
329 +7264f99c5f5ff3261504828afa4fb4d406c3af54
329 +7264f99c5f5ff3261504828afa4fb4d406c3af54
330 record change 1/2 to 'plain'? [Ynesfdaq?] y
330 record change 1/2 to 'plain'? [Ynesfdaq?] y
331
331
332 diff --git a/plain2 b/plain2
332 diff --git a/plain2 b/plain2
333 new file mode 100644
333 new file mode 100644
334 examine changes to 'plain2'? [Ynesfdaq?] y
334 examine changes to 'plain2'? [Ynesfdaq?] y
335
335
336
336
337 Modify beginning, trim end, record both, add another file to test
337 Modify beginning, trim end, record both, add another file to test
338 changes numbering
338 changes numbering
339
339
340 $ rm plain
340 $ rm plain
341 $ for i in 2 2 3 4 5 6 7 8 9 10; do
341 $ for i in 2 2 3 4 5 6 7 8 9 10; do
342 > echo $i >> plain
342 > echo $i >> plain
343 > done
343 > done
344 $ echo 2 >> plain2
344 $ echo 2 >> plain2
345
345
346 $ hg record -d '10 0' -m begin-and-end plain plain2 <<EOF
346 $ hg record -d '10 0' -m begin-and-end plain plain2 <<EOF
347 > y
347 > y
348 > y
348 > y
349 > y
349 > y
350 > y
350 > y
351 > y
351 > y
352 > EOF
352 > EOF
353 diff --git a/plain b/plain
353 diff --git a/plain b/plain
354 2 hunks, 3 lines changed
354 2 hunks, 3 lines changed
355 examine changes to 'plain'? [Ynesfdaq?] y
355 examine changes to 'plain'? [Ynesfdaq?] y
356
356
357 @@ -1,4 +1,4 @@
357 @@ -1,4 +1,4 @@
358 -1
358 -1
359 +2
359 +2
360 2
360 2
361 3
361 3
362 4
362 4
363 record change 1/3 to 'plain'? [Ynesfdaq?] y
363 record change 1/3 to 'plain'? [Ynesfdaq?] y
364
364
365 @@ -8,5 +8,3 @@
365 @@ -8,5 +8,3 @@
366 8
366 8
367 9
367 9
368 10
368 10
369 -11
369 -11
370 -7264f99c5f5ff3261504828afa4fb4d406c3af54
370 -7264f99c5f5ff3261504828afa4fb4d406c3af54
371 record change 2/3 to 'plain'? [Ynesfdaq?] y
371 record change 2/3 to 'plain'? [Ynesfdaq?] y
372
372
373 diff --git a/plain2 b/plain2
373 diff --git a/plain2 b/plain2
374 1 hunks, 1 lines changed
374 1 hunks, 1 lines changed
375 examine changes to 'plain2'? [Ynesfdaq?] y
375 examine changes to 'plain2'? [Ynesfdaq?] y
376
376
377 @@ -1,1 +1,2 @@
377 @@ -1,1 +1,2 @@
378 1
378 1
379 +2
379 +2
380 record change 3/3 to 'plain2'? [Ynesfdaq?] y
380 record change 3/3 to 'plain2'? [Ynesfdaq?] y
381
381
382
382
383 $ hg tip -p
383 $ hg tip -p
384 changeset: 11:21df83db12b8
384 changeset: 11:21df83db12b8
385 tag: tip
385 tag: tip
386 user: test
386 user: test
387 date: Thu Jan 01 00:00:10 1970 +0000
387 date: Thu Jan 01 00:00:10 1970 +0000
388 summary: begin-and-end
388 summary: begin-and-end
389
389
390 diff -r ddb8b281c3ff -r 21df83db12b8 plain
390 diff -r ddb8b281c3ff -r 21df83db12b8 plain
391 --- a/plain Thu Jan 01 00:00:10 1970 +0000
391 --- a/plain Thu Jan 01 00:00:10 1970 +0000
392 +++ b/plain Thu Jan 01 00:00:10 1970 +0000
392 +++ b/plain Thu Jan 01 00:00:10 1970 +0000
393 @@ -1,4 +1,4 @@
393 @@ -1,4 +1,4 @@
394 -1
394 -1
395 +2
395 +2
396 2
396 2
397 3
397 3
398 4
398 4
399 @@ -8,5 +8,3 @@
399 @@ -8,5 +8,3 @@
400 8
400 8
401 9
401 9
402 10
402 10
403 -11
403 -11
404 -7264f99c5f5ff3261504828afa4fb4d406c3af54
404 -7264f99c5f5ff3261504828afa4fb4d406c3af54
405 diff -r ddb8b281c3ff -r 21df83db12b8 plain2
405 diff -r ddb8b281c3ff -r 21df83db12b8 plain2
406 --- a/plain2 Thu Jan 01 00:00:10 1970 +0000
406 --- a/plain2 Thu Jan 01 00:00:10 1970 +0000
407 +++ b/plain2 Thu Jan 01 00:00:10 1970 +0000
407 +++ b/plain2 Thu Jan 01 00:00:10 1970 +0000
408 @@ -1,1 +1,2 @@
408 @@ -1,1 +1,2 @@
409 1
409 1
410 +2
410 +2
411
411
412
412
413 Trim beginning, modify end
413 Trim beginning, modify end
414
414
415 $ rm plain
415 $ rm plain
416 > for i in 4 5 6 7 8 9 10.new; do
416 > for i in 4 5 6 7 8 9 10.new; do
417 > echo $i >> plain
417 > echo $i >> plain
418 > done
418 > done
419
419
420 Record end
420 Record end
421
421
422 $ hg record -d '11 0' -m end-only plain <<EOF
422 $ hg record -d '11 0' -m end-only plain <<EOF
423 > y
423 > y
424 > n
424 > n
425 > y
425 > y
426 > EOF
426 > EOF
427 diff --git a/plain b/plain
427 diff --git a/plain b/plain
428 2 hunks, 4 lines changed
428 2 hunks, 4 lines changed
429 examine changes to 'plain'? [Ynesfdaq?] y
429 examine changes to 'plain'? [Ynesfdaq?] y
430
430
431 @@ -1,9 +1,6 @@
431 @@ -1,9 +1,6 @@
432 -2
432 -2
433 -2
433 -2
434 -3
434 -3
435 4
435 4
436 5
436 5
437 6
437 6
438 7
438 7
439 8
439 8
440 9
440 9
441 record change 1/2 to 'plain'? [Ynesfdaq?] n
441 record change 1/2 to 'plain'? [Ynesfdaq?] n
442
442
443 @@ -4,7 +1,7 @@
443 @@ -4,7 +1,7 @@
444 4
444 4
445 5
445 5
446 6
446 6
447 7
447 7
448 8
448 8
449 9
449 9
450 -10
450 -10
451 +10.new
451 +10.new
452 record change 2/2 to 'plain'? [Ynesfdaq?] y
452 record change 2/2 to 'plain'? [Ynesfdaq?] y
453
453
454
454
455 $ hg tip -p
455 $ hg tip -p
456 changeset: 12:99337501826f
456 changeset: 12:99337501826f
457 tag: tip
457 tag: tip
458 user: test
458 user: test
459 date: Thu Jan 01 00:00:11 1970 +0000
459 date: Thu Jan 01 00:00:11 1970 +0000
460 summary: end-only
460 summary: end-only
461
461
462 diff -r 21df83db12b8 -r 99337501826f plain
462 diff -r 21df83db12b8 -r 99337501826f plain
463 --- a/plain Thu Jan 01 00:00:10 1970 +0000
463 --- a/plain Thu Jan 01 00:00:10 1970 +0000
464 +++ b/plain Thu Jan 01 00:00:11 1970 +0000
464 +++ b/plain Thu Jan 01 00:00:11 1970 +0000
465 @@ -7,4 +7,4 @@
465 @@ -7,4 +7,4 @@
466 7
466 7
467 8
467 8
468 9
468 9
469 -10
469 -10
470 +10.new
470 +10.new
471
471
472
472
473 Record beginning
473 Record beginning
474
474
475 $ hg record -d '12 0' -m begin-only plain <<EOF
475 $ hg record -d '12 0' -m begin-only plain <<EOF
476 > y
476 > y
477 > y
477 > y
478 > EOF
478 > EOF
479 diff --git a/plain b/plain
479 diff --git a/plain b/plain
480 1 hunks, 3 lines changed
480 1 hunks, 3 lines changed
481 examine changes to 'plain'? [Ynesfdaq?] y
481 examine changes to 'plain'? [Ynesfdaq?] y
482
482
483 @@ -1,6 +1,3 @@
483 @@ -1,6 +1,3 @@
484 -2
484 -2
485 -2
485 -2
486 -3
486 -3
487 4
487 4
488 5
488 5
489 6
489 6
490 record this change to 'plain'? [Ynesfdaq?] y
490 record this change to 'plain'? [Ynesfdaq?] y
491
491
492
492
493 $ hg tip -p
493 $ hg tip -p
494 changeset: 13:bbd45465d540
494 changeset: 13:bbd45465d540
495 tag: tip
495 tag: tip
496 user: test
496 user: test
497 date: Thu Jan 01 00:00:12 1970 +0000
497 date: Thu Jan 01 00:00:12 1970 +0000
498 summary: begin-only
498 summary: begin-only
499
499
500 diff -r 99337501826f -r bbd45465d540 plain
500 diff -r 99337501826f -r bbd45465d540 plain
501 --- a/plain Thu Jan 01 00:00:11 1970 +0000
501 --- a/plain Thu Jan 01 00:00:11 1970 +0000
502 +++ b/plain Thu Jan 01 00:00:12 1970 +0000
502 +++ b/plain Thu Jan 01 00:00:12 1970 +0000
503 @@ -1,6 +1,3 @@
503 @@ -1,6 +1,3 @@
504 -2
504 -2
505 -2
505 -2
506 -3
506 -3
507 4
507 4
508 5
508 5
509 6
509 6
510
510
511
511
512 Add to beginning, trim from end
512 Add to beginning, trim from end
513
513
514 $ rm plain
514 $ rm plain
515 $ for i in 1 2 3 4 5 6 7 8 9; do
515 $ for i in 1 2 3 4 5 6 7 8 9; do
516 > echo $i >> plain
516 > echo $i >> plain
517 > done
517 > done
518
518
519 Record end
519 Record end
520
520
521 $ hg record --traceback -d '13 0' -m end-again plain<<EOF
521 $ hg record --traceback -d '13 0' -m end-again plain<<EOF
522 > y
522 > y
523 > n
523 > n
524 > y
524 > y
525 > EOF
525 > EOF
526 diff --git a/plain b/plain
526 diff --git a/plain b/plain
527 2 hunks, 4 lines changed
527 2 hunks, 4 lines changed
528 examine changes to 'plain'? [Ynesfdaq?] y
528 examine changes to 'plain'? [Ynesfdaq?] y
529
529
530 @@ -1,6 +1,9 @@
530 @@ -1,6 +1,9 @@
531 +1
531 +1
532 +2
532 +2
533 +3
533 +3
534 4
534 4
535 5
535 5
536 6
536 6
537 7
537 7
538 8
538 8
539 9
539 9
540 record change 1/2 to 'plain'? [Ynesfdaq?] n
540 record change 1/2 to 'plain'? [Ynesfdaq?] n
541
541
542 @@ -1,7 +4,6 @@
542 @@ -1,7 +4,6 @@
543 4
543 4
544 5
544 5
545 6
545 6
546 7
546 7
547 8
547 8
548 9
548 9
549 -10.new
549 -10.new
550 record change 2/2 to 'plain'? [Ynesfdaq?] y
550 record change 2/2 to 'plain'? [Ynesfdaq?] y
551
551
552
552
553 Add to beginning, middle, end
553 Add to beginning, middle, end
554
554
555 $ rm plain
555 $ rm plain
556 $ for i in 1 2 3 4 5 5.new 5.reallynew 6 7 8 9 10 11; do
556 $ for i in 1 2 3 4 5 5.new 5.reallynew 6 7 8 9 10 11; do
557 > echo $i >> plain
557 > echo $i >> plain
558 > done
558 > done
559
559
560 Record beginning, middle
560 Record beginning, middle
561
561
562 $ hg record -d '14 0' -m middle-only plain <<EOF
562 $ hg record -d '14 0' -m middle-only plain <<EOF
563 > y
563 > y
564 > y
564 > y
565 > y
565 > y
566 > n
566 > n
567 > EOF
567 > EOF
568 diff --git a/plain b/plain
568 diff --git a/plain b/plain
569 3 hunks, 7 lines changed
569 3 hunks, 7 lines changed
570 examine changes to 'plain'? [Ynesfdaq?] y
570 examine changes to 'plain'? [Ynesfdaq?] y
571
571
572 @@ -1,2 +1,5 @@
572 @@ -1,2 +1,5 @@
573 +1
573 +1
574 +2
574 +2
575 +3
575 +3
576 4
576 4
577 5
577 5
578 record change 1/3 to 'plain'? [Ynesfdaq?] y
578 record change 1/3 to 'plain'? [Ynesfdaq?] y
579
579
580 @@ -1,6 +4,8 @@
580 @@ -1,6 +4,8 @@
581 4
581 4
582 5
582 5
583 +5.new
583 +5.new
584 +5.reallynew
584 +5.reallynew
585 6
585 6
586 7
586 7
587 8
587 8
588 9
588 9
589 record change 2/3 to 'plain'? [Ynesfdaq?] y
589 record change 2/3 to 'plain'? [Ynesfdaq?] y
590
590
591 @@ -3,4 +8,6 @@
591 @@ -3,4 +8,6 @@
592 6
592 6
593 7
593 7
594 8
594 8
595 9
595 9
596 +10
596 +10
597 +11
597 +11
598 record change 3/3 to 'plain'? [Ynesfdaq?] n
598 record change 3/3 to 'plain'? [Ynesfdaq?] n
599
599
600
600
601 $ hg tip -p
601 $ hg tip -p
602 changeset: 15:f34a7937ec33
602 changeset: 15:f34a7937ec33
603 tag: tip
603 tag: tip
604 user: test
604 user: test
605 date: Thu Jan 01 00:00:14 1970 +0000
605 date: Thu Jan 01 00:00:14 1970 +0000
606 summary: middle-only
606 summary: middle-only
607
607
608 diff -r 82c065d0b850 -r f34a7937ec33 plain
608 diff -r 82c065d0b850 -r f34a7937ec33 plain
609 --- a/plain Thu Jan 01 00:00:13 1970 +0000
609 --- a/plain Thu Jan 01 00:00:13 1970 +0000
610 +++ b/plain Thu Jan 01 00:00:14 1970 +0000
610 +++ b/plain Thu Jan 01 00:00:14 1970 +0000
611 @@ -1,5 +1,10 @@
611 @@ -1,5 +1,10 @@
612 +1
612 +1
613 +2
613 +2
614 +3
614 +3
615 4
615 4
616 5
616 5
617 +5.new
617 +5.new
618 +5.reallynew
618 +5.reallynew
619 6
619 6
620 7
620 7
621 8
621 8
622
622
623
623
624 Record end
624 Record end
625
625
626 $ hg record -d '15 0' -m end-only plain <<EOF
626 $ hg record -d '15 0' -m end-only plain <<EOF
627 > y
627 > y
628 > y
628 > y
629 > EOF
629 > EOF
630 diff --git a/plain b/plain
630 diff --git a/plain b/plain
631 1 hunks, 2 lines changed
631 1 hunks, 2 lines changed
632 examine changes to 'plain'? [Ynesfdaq?] y
632 examine changes to 'plain'? [Ynesfdaq?] y
633
633
634 @@ -9,3 +9,5 @@
634 @@ -9,3 +9,5 @@
635 7
635 7
636 8
636 8
637 9
637 9
638 +10
638 +10
639 +11
639 +11
640 record this change to 'plain'? [Ynesfdaq?] y
640 record this change to 'plain'? [Ynesfdaq?] y
641
641
642
642
643 $ hg tip -p
643 $ hg tip -p
644 changeset: 16:f9900b71a04c
644 changeset: 16:f9900b71a04c
645 tag: tip
645 tag: tip
646 user: test
646 user: test
647 date: Thu Jan 01 00:00:15 1970 +0000
647 date: Thu Jan 01 00:00:15 1970 +0000
648 summary: end-only
648 summary: end-only
649
649
650 diff -r f34a7937ec33 -r f9900b71a04c plain
650 diff -r f34a7937ec33 -r f9900b71a04c plain
651 --- a/plain Thu Jan 01 00:00:14 1970 +0000
651 --- a/plain Thu Jan 01 00:00:14 1970 +0000
652 +++ b/plain Thu Jan 01 00:00:15 1970 +0000
652 +++ b/plain Thu Jan 01 00:00:15 1970 +0000
653 @@ -9,3 +9,5 @@
653 @@ -9,3 +9,5 @@
654 7
654 7
655 8
655 8
656 9
656 9
657 +10
657 +10
658 +11
658 +11
659
659
660
660
661 $ mkdir subdir
661 $ mkdir subdir
662 $ cd subdir
662 $ cd subdir
663 $ echo a > a
663 $ echo a > a
664 $ hg ci -d '16 0' -Amsubdir
664 $ hg ci -d '16 0' -Amsubdir
665 adding subdir/a
665 adding subdir/a
666
666
667 $ echo a >> a
667 $ echo a >> a
668 $ hg record -d '16 0' -m subdir-change a <<EOF
668 $ hg record -d '16 0' -m subdir-change a <<EOF
669 > y
669 > y
670 > y
670 > y
671 > EOF
671 > EOF
672 diff --git a/subdir/a b/subdir/a
672 diff --git a/subdir/a b/subdir/a
673 1 hunks, 1 lines changed
673 1 hunks, 1 lines changed
674 examine changes to 'subdir/a'? [Ynesfdaq?] y
674 examine changes to 'subdir/a'? [Ynesfdaq?] y
675
675
676 @@ -1,1 +1,2 @@
676 @@ -1,1 +1,2 @@
677 a
677 a
678 +a
678 +a
679 record this change to 'subdir/a'? [Ynesfdaq?] y
679 record this change to 'subdir/a'? [Ynesfdaq?] y
680
680
681
681
682 $ hg tip -p
682 $ hg tip -p
683 changeset: 18:61be427a9deb
683 changeset: 18:61be427a9deb
684 tag: tip
684 tag: tip
685 user: test
685 user: test
686 date: Thu Jan 01 00:00:16 1970 +0000
686 date: Thu Jan 01 00:00:16 1970 +0000
687 summary: subdir-change
687 summary: subdir-change
688
688
689 diff -r a7ffae4d61cb -r 61be427a9deb subdir/a
689 diff -r a7ffae4d61cb -r 61be427a9deb subdir/a
690 --- a/subdir/a Thu Jan 01 00:00:16 1970 +0000
690 --- a/subdir/a Thu Jan 01 00:00:16 1970 +0000
691 +++ b/subdir/a Thu Jan 01 00:00:16 1970 +0000
691 +++ b/subdir/a Thu Jan 01 00:00:16 1970 +0000
692 @@ -1,1 +1,2 @@
692 @@ -1,1 +1,2 @@
693 a
693 a
694 +a
694 +a
695
695
696
696
697 $ echo a > f1
697 $ echo a > f1
698 $ echo b > f2
698 $ echo b > f2
699 $ hg add f1 f2
699 $ hg add f1 f2
700
700
701 $ hg ci -mz -d '17 0'
701 $ hg ci -mz -d '17 0'
702
702
703 $ echo a >> f1
703 $ echo a >> f1
704 $ echo b >> f2
704 $ echo b >> f2
705
705
706 Help, quit
706 Help, quit
707
707
708 $ hg record <<EOF
708 $ hg record <<EOF
709 > ?
709 > ?
710 > q
710 > q
711 > EOF
711 > EOF
712 diff --git a/subdir/f1 b/subdir/f1
712 diff --git a/subdir/f1 b/subdir/f1
713 1 hunks, 1 lines changed
713 1 hunks, 1 lines changed
714 examine changes to 'subdir/f1'? [Ynesfdaq?] ?
714 examine changes to 'subdir/f1'? [Ynesfdaq?] ?
715
715
716 y - yes, record this change
716 y - yes, record this change
717 n - no, skip this change
717 n - no, skip this change
718 e - edit this change manually
718 e - edit this change manually
719 s - skip remaining changes to this file
719 s - skip remaining changes to this file
720 f - record remaining changes to this file
720 f - record remaining changes to this file
721 d - done, skip remaining changes and files
721 d - done, skip remaining changes and files
722 a - record all changes to all remaining files
722 a - record all changes to all remaining files
723 q - quit, recording no changes
723 q - quit, recording no changes
724 ? - ? (display help)
724 ? - ? (display help)
725 examine changes to 'subdir/f1'? [Ynesfdaq?] q
725 examine changes to 'subdir/f1'? [Ynesfdaq?] q
726
726
727 abort: user quit
727 abort: user quit
728 [255]
728 [255]
729
729
730 Skip
730 Skip
731
731
732 $ hg record <<EOF
732 $ hg record <<EOF
733 > s
733 > s
734 > EOF
734 > EOF
735 diff --git a/subdir/f1 b/subdir/f1
735 diff --git a/subdir/f1 b/subdir/f1
736 1 hunks, 1 lines changed
736 1 hunks, 1 lines changed
737 examine changes to 'subdir/f1'? [Ynesfdaq?] s
737 examine changes to 'subdir/f1'? [Ynesfdaq?] s
738
738
739 diff --git a/subdir/f2 b/subdir/f2
739 diff --git a/subdir/f2 b/subdir/f2
740 1 hunks, 1 lines changed
740 1 hunks, 1 lines changed
741 examine changes to 'subdir/f2'? [Ynesfdaq?] abort: response expected
741 examine changes to 'subdir/f2'? [Ynesfdaq?] abort: response expected
742 [255]
742 [255]
743
743
744 No
744 No
745
745
746 $ hg record <<EOF
746 $ hg record <<EOF
747 > n
747 > n
748 > EOF
748 > EOF
749 diff --git a/subdir/f1 b/subdir/f1
749 diff --git a/subdir/f1 b/subdir/f1
750 1 hunks, 1 lines changed
750 1 hunks, 1 lines changed
751 examine changes to 'subdir/f1'? [Ynesfdaq?] n
751 examine changes to 'subdir/f1'? [Ynesfdaq?] n
752
752
753 diff --git a/subdir/f2 b/subdir/f2
753 diff --git a/subdir/f2 b/subdir/f2
754 1 hunks, 1 lines changed
754 1 hunks, 1 lines changed
755 examine changes to 'subdir/f2'? [Ynesfdaq?] abort: response expected
755 examine changes to 'subdir/f2'? [Ynesfdaq?] abort: response expected
756 [255]
756 [255]
757
757
758 f, quit
758 f, quit
759
759
760 $ hg record <<EOF
760 $ hg record <<EOF
761 > f
761 > f
762 > q
762 > q
763 > EOF
763 > EOF
764 diff --git a/subdir/f1 b/subdir/f1
764 diff --git a/subdir/f1 b/subdir/f1
765 1 hunks, 1 lines changed
765 1 hunks, 1 lines changed
766 examine changes to 'subdir/f1'? [Ynesfdaq?] f
766 examine changes to 'subdir/f1'? [Ynesfdaq?] f
767
767
768 diff --git a/subdir/f2 b/subdir/f2
768 diff --git a/subdir/f2 b/subdir/f2
769 1 hunks, 1 lines changed
769 1 hunks, 1 lines changed
770 examine changes to 'subdir/f2'? [Ynesfdaq?] q
770 examine changes to 'subdir/f2'? [Ynesfdaq?] q
771
771
772 abort: user quit
772 abort: user quit
773 [255]
773 [255]
774
774
775 s, all
775 s, all
776
776
777 $ hg record -d '18 0' -mx <<EOF
777 $ hg record -d '18 0' -mx <<EOF
778 > s
778 > s
779 > a
779 > a
780 > EOF
780 > EOF
781 diff --git a/subdir/f1 b/subdir/f1
781 diff --git a/subdir/f1 b/subdir/f1
782 1 hunks, 1 lines changed
782 1 hunks, 1 lines changed
783 examine changes to 'subdir/f1'? [Ynesfdaq?] s
783 examine changes to 'subdir/f1'? [Ynesfdaq?] s
784
784
785 diff --git a/subdir/f2 b/subdir/f2
785 diff --git a/subdir/f2 b/subdir/f2
786 1 hunks, 1 lines changed
786 1 hunks, 1 lines changed
787 examine changes to 'subdir/f2'? [Ynesfdaq?] a
787 examine changes to 'subdir/f2'? [Ynesfdaq?] a
788
788
789
789
790 $ hg tip -p
790 $ hg tip -p
791 changeset: 20:b3df3dda369a
791 changeset: 20:b3df3dda369a
792 tag: tip
792 tag: tip
793 user: test
793 user: test
794 date: Thu Jan 01 00:00:18 1970 +0000
794 date: Thu Jan 01 00:00:18 1970 +0000
795 summary: x
795 summary: x
796
796
797 diff -r 6e02d6c9906d -r b3df3dda369a subdir/f2
797 diff -r 6e02d6c9906d -r b3df3dda369a subdir/f2
798 --- a/subdir/f2 Thu Jan 01 00:00:17 1970 +0000
798 --- a/subdir/f2 Thu Jan 01 00:00:17 1970 +0000
799 +++ b/subdir/f2 Thu Jan 01 00:00:18 1970 +0000
799 +++ b/subdir/f2 Thu Jan 01 00:00:18 1970 +0000
800 @@ -1,1 +1,2 @@
800 @@ -1,1 +1,2 @@
801 b
801 b
802 +b
802 +b
803
803
804
804
805 f
805 f
806
806
807 $ hg record -d '19 0' -my <<EOF
807 $ hg record -d '19 0' -my <<EOF
808 > f
808 > f
809 > EOF
809 > EOF
810 diff --git a/subdir/f1 b/subdir/f1
810 diff --git a/subdir/f1 b/subdir/f1
811 1 hunks, 1 lines changed
811 1 hunks, 1 lines changed
812 examine changes to 'subdir/f1'? [Ynesfdaq?] f
812 examine changes to 'subdir/f1'? [Ynesfdaq?] f
813
813
814
814
815 $ hg tip -p
815 $ hg tip -p
816 changeset: 21:38ec577f126b
816 changeset: 21:38ec577f126b
817 tag: tip
817 tag: tip
818 user: test
818 user: test
819 date: Thu Jan 01 00:00:19 1970 +0000
819 date: Thu Jan 01 00:00:19 1970 +0000
820 summary: y
820 summary: y
821
821
822 diff -r b3df3dda369a -r 38ec577f126b subdir/f1
822 diff -r b3df3dda369a -r 38ec577f126b subdir/f1
823 --- a/subdir/f1 Thu Jan 01 00:00:18 1970 +0000
823 --- a/subdir/f1 Thu Jan 01 00:00:18 1970 +0000
824 +++ b/subdir/f1 Thu Jan 01 00:00:19 1970 +0000
824 +++ b/subdir/f1 Thu Jan 01 00:00:19 1970 +0000
825 @@ -1,1 +1,2 @@
825 @@ -1,1 +1,2 @@
826 a
826 a
827 +a
827 +a
828
828
829
829
830 #if execbit
830 #if execbit
831
831
832 Preserve chmod +x
832 Preserve chmod +x
833
833
834 $ chmod +x f1
834 $ chmod +x f1
835 $ echo a >> f1
835 $ echo a >> f1
836 $ hg record -d '20 0' -mz <<EOF
836 $ hg record -d '20 0' -mz <<EOF
837 > y
837 > y
838 > y
838 > y
839 > y
839 > y
840 > EOF
840 > EOF
841 diff --git a/subdir/f1 b/subdir/f1
841 diff --git a/subdir/f1 b/subdir/f1
842 old mode 100644
842 old mode 100644
843 new mode 100755
843 new mode 100755
844 1 hunks, 1 lines changed
844 1 hunks, 1 lines changed
845 examine changes to 'subdir/f1'? [Ynesfdaq?] y
845 examine changes to 'subdir/f1'? [Ynesfdaq?] y
846
846
847 @@ -1,2 +1,3 @@
847 @@ -1,2 +1,3 @@
848 a
848 a
849 a
849 a
850 +a
850 +a
851 record this change to 'subdir/f1'? [Ynesfdaq?] y
851 record this change to 'subdir/f1'? [Ynesfdaq?] y
852
852
853
853
854 $ hg tip --config diff.git=True -p
854 $ hg tip --config diff.git=True -p
855 changeset: 22:3261adceb075
855 changeset: 22:3261adceb075
856 tag: tip
856 tag: tip
857 user: test
857 user: test
858 date: Thu Jan 01 00:00:20 1970 +0000
858 date: Thu Jan 01 00:00:20 1970 +0000
859 summary: z
859 summary: z
860
860
861 diff --git a/subdir/f1 b/subdir/f1
861 diff --git a/subdir/f1 b/subdir/f1
862 old mode 100644
862 old mode 100644
863 new mode 100755
863 new mode 100755
864 --- a/subdir/f1
864 --- a/subdir/f1
865 +++ b/subdir/f1
865 +++ b/subdir/f1
866 @@ -1,2 +1,3 @@
866 @@ -1,2 +1,3 @@
867 a
867 a
868 a
868 a
869 +a
869 +a
870
870
871
871
872 Preserve execute permission on original
872 Preserve execute permission on original
873
873
874 $ echo b >> f1
874 $ echo b >> f1
875 $ hg record -d '21 0' -maa <<EOF
875 $ hg record -d '21 0' -maa <<EOF
876 > y
876 > y
877 > y
877 > y
878 > y
878 > y
879 > EOF
879 > EOF
880 diff --git a/subdir/f1 b/subdir/f1
880 diff --git a/subdir/f1 b/subdir/f1
881 1 hunks, 1 lines changed
881 1 hunks, 1 lines changed
882 examine changes to 'subdir/f1'? [Ynesfdaq?] y
882 examine changes to 'subdir/f1'? [Ynesfdaq?] y
883
883
884 @@ -1,3 +1,4 @@
884 @@ -1,3 +1,4 @@
885 a
885 a
886 a
886 a
887 a
887 a
888 +b
888 +b
889 record this change to 'subdir/f1'? [Ynesfdaq?] y
889 record this change to 'subdir/f1'? [Ynesfdaq?] y
890
890
891
891
892 $ hg tip --config diff.git=True -p
892 $ hg tip --config diff.git=True -p
893 changeset: 23:b429867550db
893 changeset: 23:b429867550db
894 tag: tip
894 tag: tip
895 user: test
895 user: test
896 date: Thu Jan 01 00:00:21 1970 +0000
896 date: Thu Jan 01 00:00:21 1970 +0000
897 summary: aa
897 summary: aa
898
898
899 diff --git a/subdir/f1 b/subdir/f1
899 diff --git a/subdir/f1 b/subdir/f1
900 --- a/subdir/f1
900 --- a/subdir/f1
901 +++ b/subdir/f1
901 +++ b/subdir/f1
902 @@ -1,3 +1,4 @@
902 @@ -1,3 +1,4 @@
903 a
903 a
904 a
904 a
905 a
905 a
906 +b
906 +b
907
907
908
908
909 Preserve chmod -x
909 Preserve chmod -x
910
910
911 $ chmod -x f1
911 $ chmod -x f1
912 $ echo c >> f1
912 $ echo c >> f1
913 $ hg record -d '22 0' -mab <<EOF
913 $ hg record -d '22 0' -mab <<EOF
914 > y
914 > y
915 > y
915 > y
916 > y
916 > y
917 > EOF
917 > EOF
918 diff --git a/subdir/f1 b/subdir/f1
918 diff --git a/subdir/f1 b/subdir/f1
919 old mode 100755
919 old mode 100755
920 new mode 100644
920 new mode 100644
921 1 hunks, 1 lines changed
921 1 hunks, 1 lines changed
922 examine changes to 'subdir/f1'? [Ynesfdaq?] y
922 examine changes to 'subdir/f1'? [Ynesfdaq?] y
923
923
924 @@ -2,3 +2,4 @@
924 @@ -2,3 +2,4 @@
925 a
925 a
926 a
926 a
927 b
927 b
928 +c
928 +c
929 record this change to 'subdir/f1'? [Ynesfdaq?] y
929 record this change to 'subdir/f1'? [Ynesfdaq?] y
930
930
931
931
932 $ hg tip --config diff.git=True -p
932 $ hg tip --config diff.git=True -p
933 changeset: 24:0b082130c20a
933 changeset: 24:0b082130c20a
934 tag: tip
934 tag: tip
935 user: test
935 user: test
936 date: Thu Jan 01 00:00:22 1970 +0000
936 date: Thu Jan 01 00:00:22 1970 +0000
937 summary: ab
937 summary: ab
938
938
939 diff --git a/subdir/f1 b/subdir/f1
939 diff --git a/subdir/f1 b/subdir/f1
940 old mode 100755
940 old mode 100755
941 new mode 100644
941 new mode 100644
942 --- a/subdir/f1
942 --- a/subdir/f1
943 +++ b/subdir/f1
943 +++ b/subdir/f1
944 @@ -2,3 +2,4 @@
944 @@ -2,3 +2,4 @@
945 a
945 a
946 a
946 a
947 b
947 b
948 +c
948 +c
949
949
950
950
951 #else
951 #else
952
952
953 Slightly bogus tests to get almost same repo structure as when x bit is used
953 Slightly bogus tests to get almost same repo structure as when x bit is used
954 - but with different hashes.
954 - but with different hashes.
955
955
956 Mock "Preserve chmod +x"
956 Mock "Preserve chmod +x"
957
957
958 $ echo a >> f1
958 $ echo a >> f1
959 $ hg record -d '20 0' -mz <<EOF
959 $ hg record -d '20 0' -mz <<EOF
960 > y
960 > y
961 > y
961 > y
962 > y
962 > y
963 > EOF
963 > EOF
964 diff --git a/subdir/f1 b/subdir/f1
964 diff --git a/subdir/f1 b/subdir/f1
965 1 hunks, 1 lines changed
965 1 hunks, 1 lines changed
966 examine changes to 'subdir/f1'? [Ynesfdaq?]
966 examine changes to 'subdir/f1'? [Ynesfdaq?] y
967
967 @@ -1,2 +1,3 @@
968 @@ -1,2 +1,3 @@
968 a
969 a
969 a
970 a
970 +a
971 +a
971 record this change to 'subdir/f1'? [Ynesfdaq?]
972 record this change to 'subdir/f1'? [Ynesfdaq?] y
973
972
974
973 $ hg tip --config diff.git=True -p
975 $ hg tip --config diff.git=True -p
974 changeset: 22:0d463bd428f5
976 changeset: 22:0d463bd428f5
975 tag: tip
977 tag: tip
976 user: test
978 user: test
977 date: Thu Jan 01 00:00:20 1970 +0000
979 date: Thu Jan 01 00:00:20 1970 +0000
978 summary: z
980 summary: z
979
981
980 diff --git a/subdir/f1 b/subdir/f1
982 diff --git a/subdir/f1 b/subdir/f1
981 --- a/subdir/f1
983 --- a/subdir/f1
982 +++ b/subdir/f1
984 +++ b/subdir/f1
983 @@ -1,2 +1,3 @@
985 @@ -1,2 +1,3 @@
984 a
986 a
985 a
987 a
986 +a
988 +a
987
989
988
990
989 Mock "Preserve execute permission on original"
991 Mock "Preserve execute permission on original"
990
992
991 $ echo b >> f1
993 $ echo b >> f1
992 $ hg record -d '21 0' -maa <<EOF
994 $ hg record -d '21 0' -maa <<EOF
993 > y
995 > y
994 > y
996 > y
995 > y
997 > y
996 > EOF
998 > EOF
997 diff --git a/subdir/f1 b/subdir/f1
999 diff --git a/subdir/f1 b/subdir/f1
998 1 hunks, 1 lines changed
1000 1 hunks, 1 lines changed
999 examine changes to 'subdir/f1'? [Ynesfdaq?]
1001 examine changes to 'subdir/f1'? [Ynesfdaq?] y
1002
1000 @@ -1,3 +1,4 @@
1003 @@ -1,3 +1,4 @@
1001 a
1004 a
1002 a
1005 a
1003 a
1006 a
1004 +b
1007 +b
1005 record this change to 'subdir/f1'? [Ynesfdaq?]
1008 record this change to 'subdir/f1'? [Ynesfdaq?] y
1009
1006
1010
1007 $ hg tip --config diff.git=True -p
1011 $ hg tip --config diff.git=True -p
1008 changeset: 23:0eab41a3e524
1012 changeset: 23:0eab41a3e524
1009 tag: tip
1013 tag: tip
1010 user: test
1014 user: test
1011 date: Thu Jan 01 00:00:21 1970 +0000
1015 date: Thu Jan 01 00:00:21 1970 +0000
1012 summary: aa
1016 summary: aa
1013
1017
1014 diff --git a/subdir/f1 b/subdir/f1
1018 diff --git a/subdir/f1 b/subdir/f1
1015 --- a/subdir/f1
1019 --- a/subdir/f1
1016 +++ b/subdir/f1
1020 +++ b/subdir/f1
1017 @@ -1,3 +1,4 @@
1021 @@ -1,3 +1,4 @@
1018 a
1022 a
1019 a
1023 a
1020 a
1024 a
1021 +b
1025 +b
1022
1026
1023
1027
1024 Mock "Preserve chmod -x"
1028 Mock "Preserve chmod -x"
1025
1029
1026 $ chmod -x f1
1030 $ chmod -x f1
1027 $ echo c >> f1
1031 $ echo c >> f1
1028 $ hg record -d '22 0' -mab <<EOF
1032 $ hg record -d '22 0' -mab <<EOF
1029 > y
1033 > y
1030 > y
1034 > y
1031 > y
1035 > y
1032 > EOF
1036 > EOF
1033 diff --git a/subdir/f1 b/subdir/f1
1037 diff --git a/subdir/f1 b/subdir/f1
1034 1 hunks, 1 lines changed
1038 1 hunks, 1 lines changed
1035 examine changes to 'subdir/f1'? [Ynesfdaq?]
1039 examine changes to 'subdir/f1'? [Ynesfdaq?] y
1040
1036 @@ -2,3 +2,4 @@
1041 @@ -2,3 +2,4 @@
1037 a
1042 a
1038 a
1043 a
1039 b
1044 b
1040 +c
1045 +c
1041 record this change to 'subdir/f1'? [Ynesfdaq?]
1046 record this change to 'subdir/f1'? [Ynesfdaq?] y
1047
1042
1048
1043 $ hg tip --config diff.git=True -p
1049 $ hg tip --config diff.git=True -p
1044 changeset: 24:f4f718f27b7c
1050 changeset: 24:f4f718f27b7c
1045 tag: tip
1051 tag: tip
1046 user: test
1052 user: test
1047 date: Thu Jan 01 00:00:22 1970 +0000
1053 date: Thu Jan 01 00:00:22 1970 +0000
1048 summary: ab
1054 summary: ab
1049
1055
1050 diff --git a/subdir/f1 b/subdir/f1
1056 diff --git a/subdir/f1 b/subdir/f1
1051 --- a/subdir/f1
1057 --- a/subdir/f1
1052 +++ b/subdir/f1
1058 +++ b/subdir/f1
1053 @@ -2,3 +2,4 @@
1059 @@ -2,3 +2,4 @@
1054 a
1060 a
1055 a
1061 a
1056 b
1062 b
1057 +c
1063 +c
1058
1064
1059
1065
1060 #endif
1066 #endif
1061
1067
1062 $ cd ..
1068 $ cd ..
1063
1069
1064
1070
1065 Abort early when a merge is in progress
1071 Abort early when a merge is in progress
1066
1072
1067 $ hg up 4
1073 $ hg up 4
1068 1 files updated, 0 files merged, 6 files removed, 0 files unresolved
1074 1 files updated, 0 files merged, 6 files removed, 0 files unresolved
1069
1075
1070 $ touch iwillmergethat
1076 $ touch iwillmergethat
1071 $ hg add iwillmergethat
1077 $ hg add iwillmergethat
1072
1078
1073 $ hg branch thatbranch
1079 $ hg branch thatbranch
1074 marked working directory as branch thatbranch
1080 marked working directory as branch thatbranch
1075 (branches are permanent and global, did you want a bookmark?)
1081 (branches are permanent and global, did you want a bookmark?)
1076
1082
1077 $ hg ci -m'new head'
1083 $ hg ci -m'new head'
1078
1084
1079 $ hg up default
1085 $ hg up default
1080 6 files updated, 0 files merged, 2 files removed, 0 files unresolved
1086 6 files updated, 0 files merged, 2 files removed, 0 files unresolved
1081
1087
1082 $ hg merge thatbranch
1088 $ hg merge thatbranch
1083 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1089 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1084 (branch merge, don't forget to commit)
1090 (branch merge, don't forget to commit)
1085
1091
1086 $ hg record -m'will abort'
1092 $ hg record -m'will abort'
1087 abort: cannot partially commit a merge (use "hg commit" instead)
1093 abort: cannot partially commit a merge (use "hg commit" instead)
1088 [255]
1094 [255]
1089
1095
1090 $ hg up -C
1096 $ hg up -C
1091 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1097 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1092
1098
1093 Editing patch (and ignoring trailing text)
1099 Editing patch (and ignoring trailing text)
1094
1100
1095 $ cat > editor.sh << '__EOF__'
1101 $ cat > editor.sh << '__EOF__'
1096 > sed -e 7d -e '5s/^-/ /' -e '/^# ---/i\
1102 > sed -e 7d -e '5s/^-/ /' -e '/^# ---/i\
1097 > trailing\nditto' "$1" > tmp
1103 > trailing\nditto' "$1" > tmp
1098 > mv tmp "$1"
1104 > mv tmp "$1"
1099 > __EOF__
1105 > __EOF__
1100 $ cat > editedfile << '__EOF__'
1106 $ cat > editedfile << '__EOF__'
1101 > This is the first line
1107 > This is the first line
1102 > This is the second line
1108 > This is the second line
1103 > This is the third line
1109 > This is the third line
1104 > __EOF__
1110 > __EOF__
1105 $ hg add editedfile
1111 $ hg add editedfile
1106 $ hg commit -medit-patch-1
1112 $ hg commit -medit-patch-1
1107 $ cat > editedfile << '__EOF__'
1113 $ cat > editedfile << '__EOF__'
1108 > This line has changed
1114 > This line has changed
1109 > This change will be committed
1115 > This change will be committed
1110 > This is the third line
1116 > This is the third line
1111 > __EOF__
1117 > __EOF__
1112 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg record -d '23 0' -medit-patch-2 <<EOF
1118 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg record -d '23 0' -medit-patch-2 <<EOF
1113 > y
1119 > y
1114 > e
1120 > e
1115 > EOF
1121 > EOF
1116 diff --git a/editedfile b/editedfile
1122 diff --git a/editedfile b/editedfile
1117 1 hunks, 2 lines changed
1123 1 hunks, 2 lines changed
1118 examine changes to 'editedfile'? [Ynesfdaq?] y
1124 examine changes to 'editedfile'? [Ynesfdaq?] y
1119
1125
1120 @@ -1,3 +1,3 @@
1126 @@ -1,3 +1,3 @@
1121 -This is the first line
1127 -This is the first line
1122 -This is the second line
1128 -This is the second line
1123 +This line has changed
1129 +This line has changed
1124 +This change will be committed
1130 +This change will be committed
1125 This is the third line
1131 This is the third line
1126 record this change to 'editedfile'? [Ynesfdaq?] e
1132 record this change to 'editedfile'? [Ynesfdaq?] e
1127
1133
1128 $ cat editedfile
1134 $ cat editedfile
1129 This line has changed
1135 This line has changed
1130 This change will be committed
1136 This change will be committed
1131 This is the third line
1137 This is the third line
1132 $ hg cat -r tip editedfile
1138 $ hg cat -r tip editedfile
1133 This is the first line
1139 This is the first line
1134 This change will be committed
1140 This change will be committed
1135 This is the third line
1141 This is the third line
1136 $ hg revert editedfile
1142 $ hg revert editedfile
1137
1143
1138 Trying to edit patch for whole file
1144 Trying to edit patch for whole file
1139
1145
1140 $ echo "This is the fourth line" >> editedfile
1146 $ echo "This is the fourth line" >> editedfile
1141 $ hg record <<EOF
1147 $ hg record <<EOF
1142 > e
1148 > e
1143 > q
1149 > q
1144 > EOF
1150 > EOF
1145 diff --git a/editedfile b/editedfile
1151 diff --git a/editedfile b/editedfile
1146 1 hunks, 1 lines changed
1152 1 hunks, 1 lines changed
1147 examine changes to 'editedfile'? [Ynesfdaq?] e
1153 examine changes to 'editedfile'? [Ynesfdaq?] e
1148
1154
1149 cannot edit patch for whole file
1155 cannot edit patch for whole file
1150 examine changes to 'editedfile'? [Ynesfdaq?] q
1156 examine changes to 'editedfile'? [Ynesfdaq?] q
1151
1157
1152 abort: user quit
1158 abort: user quit
1153 [255]
1159 [255]
1154 $ hg revert editedfile
1160 $ hg revert editedfile
1155
1161
1156 Removing changes from patch
1162 Removing changes from patch
1157
1163
1158 $ sed -e '3s/third/second/' -e '2s/will/will not/' -e 1d editedfile > tmp
1164 $ sed -e '3s/third/second/' -e '2s/will/will not/' -e 1d editedfile > tmp
1159 $ mv tmp editedfile
1165 $ mv tmp editedfile
1160 $ echo "This line has been added" >> editedfile
1166 $ echo "This line has been added" >> editedfile
1161 $ cat > editor.sh << '__EOF__'
1167 $ cat > editor.sh << '__EOF__'
1162 > sed -e 's/^[-+]/ /' "$1" > tmp
1168 > sed -e 's/^[-+]/ /' "$1" > tmp
1163 > mv tmp "$1"
1169 > mv tmp "$1"
1164 > __EOF__
1170 > __EOF__
1165 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg record <<EOF
1171 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg record <<EOF
1166 > y
1172 > y
1167 > e
1173 > e
1168 > EOF
1174 > EOF
1169 diff --git a/editedfile b/editedfile
1175 diff --git a/editedfile b/editedfile
1170 1 hunks, 3 lines changed
1176 1 hunks, 3 lines changed
1171 examine changes to 'editedfile'? [Ynesfdaq?] y
1177 examine changes to 'editedfile'? [Ynesfdaq?] y
1172
1178
1173 @@ -1,3 +1,3 @@
1179 @@ -1,3 +1,3 @@
1174 -This is the first line
1180 -This is the first line
1175 -This change will be committed
1181 -This change will be committed
1176 -This is the third line
1182 -This is the third line
1177 +This change will not be committed
1183 +This change will not be committed
1178 +This is the second line
1184 +This is the second line
1179 +This line has been added
1185 +This line has been added
1180 record this change to 'editedfile'? [Ynesfdaq?] e
1186 record this change to 'editedfile'? [Ynesfdaq?] e
1181
1187
1182 no changes to record
1188 no changes to record
1183 $ cat editedfile
1189 $ cat editedfile
1184 This change will not be committed
1190 This change will not be committed
1185 This is the second line
1191 This is the second line
1186 This line has been added
1192 This line has been added
1187 $ hg cat -r tip editedfile
1193 $ hg cat -r tip editedfile
1188 This is the first line
1194 This is the first line
1189 This change will be committed
1195 This change will be committed
1190 This is the third line
1196 This is the third line
1191 $ hg revert editedfile
1197 $ hg revert editedfile
1192
1198
1193 Invalid patch
1199 Invalid patch
1194
1200
1195 $ sed -e '3s/third/second/' -e '2s/will/will not/' -e 1d editedfile > tmp
1201 $ sed -e '3s/third/second/' -e '2s/will/will not/' -e 1d editedfile > tmp
1196 $ mv tmp editedfile
1202 $ mv tmp editedfile
1197 $ echo "This line has been added" >> editedfile
1203 $ echo "This line has been added" >> editedfile
1198 $ cat > editor.sh << '__EOF__'
1204 $ cat > editor.sh << '__EOF__'
1199 > sed s/This/That/ "$1" > tmp
1205 > sed s/This/That/ "$1" > tmp
1200 > mv tmp "$1"
1206 > mv tmp "$1"
1201 > __EOF__
1207 > __EOF__
1202 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg record <<EOF
1208 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg record <<EOF
1203 > y
1209 > y
1204 > e
1210 > e
1205 > EOF
1211 > EOF
1206 diff --git a/editedfile b/editedfile
1212 diff --git a/editedfile b/editedfile
1207 1 hunks, 3 lines changed
1213 1 hunks, 3 lines changed
1208 examine changes to 'editedfile'? [Ynesfdaq?] y
1214 examine changes to 'editedfile'? [Ynesfdaq?] y
1209
1215
1210 @@ -1,3 +1,3 @@
1216 @@ -1,3 +1,3 @@
1211 -This is the first line
1217 -This is the first line
1212 -This change will be committed
1218 -This change will be committed
1213 -This is the third line
1219 -This is the third line
1214 +This change will not be committed
1220 +This change will not be committed
1215 +This is the second line
1221 +This is the second line
1216 +This line has been added
1222 +This line has been added
1217 record this change to 'editedfile'? [Ynesfdaq?] e
1223 record this change to 'editedfile'? [Ynesfdaq?] e
1218
1224
1219 patching file editedfile
1225 patching file editedfile
1220 Hunk #1 FAILED at 0
1226 Hunk #1 FAILED at 0
1221 1 out of 1 hunks FAILED -- saving rejects to file editedfile.rej
1227 1 out of 1 hunks FAILED -- saving rejects to file editedfile.rej
1222 abort: patch failed to apply
1228 abort: patch failed to apply
1223 [255]
1229 [255]
1224 $ cat editedfile
1230 $ cat editedfile
1225 This change will not be committed
1231 This change will not be committed
1226 This is the second line
1232 This is the second line
1227 This line has been added
1233 This line has been added
1228 $ hg cat -r tip editedfile
1234 $ hg cat -r tip editedfile
1229 This is the first line
1235 This is the first line
1230 This change will be committed
1236 This change will be committed
1231 This is the third line
1237 This is the third line
1232 $ cat editedfile.rej
1238 $ cat editedfile.rej
1233 --- editedfile
1239 --- editedfile
1234 +++ editedfile
1240 +++ editedfile
1235 @@ -1,3 +1,3 @@
1241 @@ -1,3 +1,3 @@
1236 -That is the first line
1242 -That is the first line
1237 -That change will be committed
1243 -That change will be committed
1238 -That is the third line
1244 -That is the third line
1239 +That change will not be committed
1245 +That change will not be committed
1240 +That is the second line
1246 +That is the second line
1241 +That line has been added
1247 +That line has been added
1242
1248
1243 Malformed patch - error handling
1249 Malformed patch - error handling
1244
1250
1245 $ cat > editor.sh << '__EOF__'
1251 $ cat > editor.sh << '__EOF__'
1246 > sed -e '/^@/p' "$1" > tmp
1252 > sed -e '/^@/p' "$1" > tmp
1247 > mv tmp "$1"
1253 > mv tmp "$1"
1248 > __EOF__
1254 > __EOF__
1249 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg record <<EOF
1255 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg record <<EOF
1250 > y
1256 > y
1251 > e
1257 > e
1252 > EOF
1258 > EOF
1253 diff --git a/editedfile b/editedfile
1259 diff --git a/editedfile b/editedfile
1254 1 hunks, 3 lines changed
1260 1 hunks, 3 lines changed
1255 examine changes to 'editedfile'? [Ynesfdaq?] y
1261 examine changes to 'editedfile'? [Ynesfdaq?] y
1256
1262
1257 @@ -1,3 +1,3 @@
1263 @@ -1,3 +1,3 @@
1258 -This is the first line
1264 -This is the first line
1259 -This change will be committed
1265 -This change will be committed
1260 -This is the third line
1266 -This is the third line
1261 +This change will not be committed
1267 +This change will not be committed
1262 +This is the second line
1268 +This is the second line
1263 +This line has been added
1269 +This line has been added
1264 record this change to 'editedfile'? [Ynesfdaq?] e
1270 record this change to 'editedfile'? [Ynesfdaq?] e
1265
1271
1266 abort: error parsing patch: unhandled transition: range -> range
1272 abort: error parsing patch: unhandled transition: range -> range
1267 [255]
1273 [255]
1268
1274
1269 random text in random positions is still an error
1275 random text in random positions is still an error
1270
1276
1271 $ cat > editor.sh << '__EOF__'
1277 $ cat > editor.sh << '__EOF__'
1272 > sed -e '/^@/i\
1278 > sed -e '/^@/i\
1273 > other' "$1" > tmp
1279 > other' "$1" > tmp
1274 > mv tmp "$1"
1280 > mv tmp "$1"
1275 > __EOF__
1281 > __EOF__
1276 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg record <<EOF
1282 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg record <<EOF
1277 > y
1283 > y
1278 > e
1284 > e
1279 > EOF
1285 > EOF
1280 diff --git a/editedfile b/editedfile
1286 diff --git a/editedfile b/editedfile
1281 1 hunks, 3 lines changed
1287 1 hunks, 3 lines changed
1282 examine changes to 'editedfile'? [Ynesfdaq?] y
1288 examine changes to 'editedfile'? [Ynesfdaq?] y
1283
1289
1284 @@ -1,3 +1,3 @@
1290 @@ -1,3 +1,3 @@
1285 -This is the first line
1291 -This is the first line
1286 -This change will be committed
1292 -This change will be committed
1287 -This is the third line
1293 -This is the third line
1288 +This change will not be committed
1294 +This change will not be committed
1289 +This is the second line
1295 +This is the second line
1290 +This line has been added
1296 +This line has been added
1291 record this change to 'editedfile'? [Ynesfdaq?] e
1297 record this change to 'editedfile'? [Ynesfdaq?] e
1292
1298
1293 abort: error parsing patch: unhandled transition: file -> other
1299 abort: error parsing patch: unhandled transition: file -> other
1294 [255]
1300 [255]
1295
1301
1296 $ hg up -C
1302 $ hg up -C
1297 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1303 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1298
1304
1299 With win32text
1305 With win32text
1300
1306
1301 $ echo '[extensions]' >> .hg/hgrc
1307 $ echo '[extensions]' >> .hg/hgrc
1302 $ echo 'win32text = ' >> .hg/hgrc
1308 $ echo 'win32text = ' >> .hg/hgrc
1303 $ echo '[decode]' >> .hg/hgrc
1309 $ echo '[decode]' >> .hg/hgrc
1304 $ echo '** = cleverdecode:' >> .hg/hgrc
1310 $ echo '** = cleverdecode:' >> .hg/hgrc
1305 $ echo '[encode]' >> .hg/hgrc
1311 $ echo '[encode]' >> .hg/hgrc
1306 $ echo '** = cleverencode:' >> .hg/hgrc
1312 $ echo '** = cleverencode:' >> .hg/hgrc
1307 $ echo '[patch]' >> .hg/hgrc
1313 $ echo '[patch]' >> .hg/hgrc
1308 $ echo 'eol = crlf' >> .hg/hgrc
1314 $ echo 'eol = crlf' >> .hg/hgrc
1309
1315
1310 Ignore win32text deprecation warning for now:
1316 Ignore win32text deprecation warning for now:
1311
1317
1312 $ echo '[win32text]' >> .hg/hgrc
1318 $ echo '[win32text]' >> .hg/hgrc
1313 $ echo 'warn = no' >> .hg/hgrc
1319 $ echo 'warn = no' >> .hg/hgrc
1314
1320
1315 $ echo d >> subdir/f1
1321 $ echo d >> subdir/f1
1316 $ hg record -d '24 0' -mw1 <<EOF
1322 $ hg record -d '24 0' -mw1 <<EOF
1317 > y
1323 > y
1318 > y
1324 > y
1319 > EOF
1325 > EOF
1320 diff --git a/subdir/f1 b/subdir/f1
1326 diff --git a/subdir/f1 b/subdir/f1
1321 1 hunks, 1 lines changed
1327 1 hunks, 1 lines changed
1322 examine changes to 'subdir/f1'? [Ynesfdaq?] y
1328 examine changes to 'subdir/f1'? [Ynesfdaq?] y
1323
1329
1324 @@ -3,3 +3,4 @@
1330 @@ -3,3 +3,4 @@
1325 a
1331 a
1326 b
1332 b
1327 c
1333 c
1328 +d
1334 +d
1329 record this change to 'subdir/f1'? [Ynesfdaq?] y
1335 record this change to 'subdir/f1'? [Ynesfdaq?] y
1330
1336
1331
1337
1332 $ hg tip -p
1338 $ hg tip -p
1333 changeset: 28:* (glob)
1339 changeset: 28:* (glob)
1334 tag: tip
1340 tag: tip
1335 user: test
1341 user: test
1336 date: Thu Jan 01 00:00:24 1970 +0000
1342 date: Thu Jan 01 00:00:24 1970 +0000
1337 summary: w1
1343 summary: w1
1338
1344
1339 diff -r ???????????? -r ???????????? subdir/f1 (glob)
1345 diff -r ???????????? -r ???????????? subdir/f1 (glob)
1340 --- a/subdir/f1 Thu Jan 01 00:00:23 1970 +0000
1346 --- a/subdir/f1 Thu Jan 01 00:00:23 1970 +0000
1341 +++ b/subdir/f1 Thu Jan 01 00:00:24 1970 +0000
1347 +++ b/subdir/f1 Thu Jan 01 00:00:24 1970 +0000
1342 @@ -3,3 +3,4 @@
1348 @@ -3,3 +3,4 @@
1343 a
1349 a
1344 b
1350 b
1345 c
1351 c
1346 +d
1352 +d
1347
1353
1348 Test --user when ui.username not set
1354 Test --user when ui.username not set
1349 $ unset HGUSER
1355 $ unset HGUSER
1350 $ echo e >> subdir/f1
1356 $ echo e >> subdir/f1
1351 $ hg record --config ui.username= -d '8 0' --user xyz -m "user flag" <<EOF
1357 $ hg record --config ui.username= -d '8 0' --user xyz -m "user flag" <<EOF
1352 > y
1358 > y
1353 > y
1359 > y
1354 > EOF
1360 > EOF
1355 diff --git a/subdir/f1 b/subdir/f1
1361 diff --git a/subdir/f1 b/subdir/f1
1356 1 hunks, 1 lines changed
1362 1 hunks, 1 lines changed
1357 examine changes to 'subdir/f1'? [Ynesfdaq?] y
1363 examine changes to 'subdir/f1'? [Ynesfdaq?] y
1358
1364
1359 @@ -4,3 +4,4 @@
1365 @@ -4,3 +4,4 @@
1360 b
1366 b
1361 c
1367 c
1362 d
1368 d
1363 +e
1369 +e
1364 record this change to 'subdir/f1'? [Ynesfdaq?] y
1370 record this change to 'subdir/f1'? [Ynesfdaq?] y
1365
1371
1366 $ hg log --template '{author}\n' -l 1
1372 $ hg log --template '{author}\n' -l 1
1367 xyz
1373 xyz
1368 $ HGUSER="test"
1374 $ HGUSER="test"
1369 $ export HGUSER
1375 $ export HGUSER
1370
1376
1371 $ cd ..
1377 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now