##// END OF EJS Templates
tests: update the exit status codes for Windows specific tests...
Matt Harbison -
r46688:f4f07cc9 default
parent child Browse files
Show More
@@ -1,346 +1,346 b''
1 #require icasefs
1 #require icasefs
2
2
3 ################################
3 ################################
4 test for branch merging
4 test for branch merging
5 ################################
5 ################################
6
6
7 test for rename awareness of case-folding collision check:
7 test for rename awareness of case-folding collision check:
8
8
9 (1) colliding file is one renamed from collided file:
9 (1) colliding file is one renamed from collided file:
10 this is also case for issue3370.
10 this is also case for issue3370.
11
11
12 $ hg init branch_merge_renaming
12 $ hg init branch_merge_renaming
13 $ cd branch_merge_renaming
13 $ cd branch_merge_renaming
14
14
15 $ echo a > a
15 $ echo a > a
16 $ hg add a
16 $ hg add a
17 $ echo b > b
17 $ echo b > b
18 $ hg add b
18 $ hg add b
19 $ hg commit -m '#0'
19 $ hg commit -m '#0'
20 $ hg tag -l A
20 $ hg tag -l A
21 $ hg rename a tmp
21 $ hg rename a tmp
22 $ hg rename tmp A
22 $ hg rename tmp A
23 $ hg commit -m '#1'
23 $ hg commit -m '#1'
24 $ hg tag -l B
24 $ hg tag -l B
25 $ hg update -q 0
25 $ hg update -q 0
26 $ touch x
26 $ touch x
27 $ hg add x
27 $ hg add x
28 $ hg commit -m '#2'
28 $ hg commit -m '#2'
29 created new head
29 created new head
30 $ hg tag -l C
30 $ hg tag -l C
31
31
32 $ hg merge -q
32 $ hg merge -q
33 $ hg status -A
33 $ hg status -A
34 M A
34 M A
35 R a
35 R a
36 C b
36 C b
37 C x
37 C x
38
38
39 $ hg update -q --clean 1
39 $ hg update -q --clean 1
40 $ hg merge -q
40 $ hg merge -q
41 $ hg status -A
41 $ hg status -A
42 M x
42 M x
43 C A
43 C A
44 C b
44 C b
45 $ hg commit -m '(D)'
45 $ hg commit -m '(D)'
46 $ hg tag -l D
46 $ hg tag -l D
47
47
48 additional test for issue3452:
48 additional test for issue3452:
49
49
50 | this assumes the history below.
50 | this assumes the history below.
51 |
51 |
52 | (A) -- (C) -- (E) -------
52 | (A) -- (C) -- (E) -------
53 | \ \ \
53 | \ \ \
54 | \ \ \
54 | \ \ \
55 | (B) -- (D) -- (F) -- (G)
55 | (B) -- (D) -- (F) -- (G)
56 |
56 |
57 | A: add file 'a'
57 | A: add file 'a'
58 | B: rename from 'a' to 'A'
58 | B: rename from 'a' to 'A'
59 | C: add 'x' (or operation other than modification of 'a')
59 | C: add 'x' (or operation other than modification of 'a')
60 | D: merge C into B
60 | D: merge C into B
61 | E: modify 'a'
61 | E: modify 'a'
62 | F: modify 'A'
62 | F: modify 'A'
63 | G: merge E into F
63 | G: merge E into F
64 |
64 |
65 | issue3452 occurs when (B) is recorded before (C)
65 | issue3452 occurs when (B) is recorded before (C)
66
66
67 $ hg update -q --clean C
67 $ hg update -q --clean C
68 $ echo "modify 'a' at (E)" > a
68 $ echo "modify 'a' at (E)" > a
69 $ echo "modify 'b' at (E)" > b
69 $ echo "modify 'b' at (E)" > b
70 $ hg commit -m '(E)'
70 $ hg commit -m '(E)'
71 created new head
71 created new head
72 $ hg tag -l E
72 $ hg tag -l E
73
73
74 $ hg update -q --clean D
74 $ hg update -q --clean D
75 $ echo "modify 'A' at (F)" > A
75 $ echo "modify 'A' at (F)" > A
76 $ hg commit -m '(F)'
76 $ hg commit -m '(F)'
77 $ hg tag -l F
77 $ hg tag -l F
78
78
79 $ hg merge -q --tool internal:other E
79 $ hg merge -q --tool internal:other E
80 $ hg status -A
80 $ hg status -A
81 M A
81 M A
82 a
82 a
83 M b
83 M b
84 C x
84 C x
85 $ cat A
85 $ cat A
86 modify 'a' at (E)
86 modify 'a' at (E)
87
87
88 test also the case that (B) is recorded after (C), to prevent
88 test also the case that (B) is recorded after (C), to prevent
89 regression by changes in the future.
89 regression by changes in the future.
90
90
91 to avoid unexpected (successful) behavior by filelog unification,
91 to avoid unexpected (successful) behavior by filelog unification,
92 target file is not 'a'/'A' but 'b'/'B' in this case.
92 target file is not 'a'/'A' but 'b'/'B' in this case.
93
93
94 $ hg update -q --clean A
94 $ hg update -q --clean A
95 $ hg rename b tmp
95 $ hg rename b tmp
96 $ hg rename tmp B
96 $ hg rename tmp B
97 $ hg commit -m '(B1)'
97 $ hg commit -m '(B1)'
98 created new head
98 created new head
99 $ hg tag -l B1
99 $ hg tag -l B1
100
100
101 $ hg merge -q C
101 $ hg merge -q C
102 $ hg status -A
102 $ hg status -A
103 M x
103 M x
104 C B
104 C B
105 C a
105 C a
106 $ hg commit -m '(D1)'
106 $ hg commit -m '(D1)'
107 $ hg tag -l D1
107 $ hg tag -l D1
108
108
109 $ echo "modify 'B' at (F1)" > B
109 $ echo "modify 'B' at (F1)" > B
110 $ hg commit -m '(F1)'
110 $ hg commit -m '(F1)'
111 $ hg tag -l F1
111 $ hg tag -l F1
112
112
113 $ hg merge -q --tool internal:other E
113 $ hg merge -q --tool internal:other E
114 $ hg status -A
114 $ hg status -A
115 M B
115 M B
116 b
116 b
117 M a
117 M a
118 C x
118 C x
119 $ cat B
119 $ cat B
120 modify 'b' at (E)
120 modify 'b' at (E)
121
121
122 $ cd ..
122 $ cd ..
123
123
124 (2) colliding file is not related to collided file
124 (2) colliding file is not related to collided file
125
125
126 $ hg init branch_merge_collding
126 $ hg init branch_merge_collding
127 $ cd branch_merge_collding
127 $ cd branch_merge_collding
128
128
129 $ echo a > a
129 $ echo a > a
130 $ hg add a
130 $ hg add a
131 $ hg commit -m '#0'
131 $ hg commit -m '#0'
132 $ hg remove a
132 $ hg remove a
133 $ hg commit -m '#1'
133 $ hg commit -m '#1'
134 $ echo A > A
134 $ echo A > A
135 $ hg add A
135 $ hg add A
136 $ hg commit -m '#2'
136 $ hg commit -m '#2'
137 $ hg update --clean 0
137 $ hg update --clean 0
138 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
138 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
139 $ echo x > x
139 $ echo x > x
140 $ hg add x
140 $ hg add x
141 $ hg commit -m '#3'
141 $ hg commit -m '#3'
142 created new head
142 created new head
143 $ echo 'modified at #4' > a
143 $ echo 'modified at #4' > a
144 $ hg commit -m '#4'
144 $ hg commit -m '#4'
145
145
146 $ hg merge
146 $ hg merge
147 abort: case-folding collision between [aA] and [Aa] (re)
147 abort: case-folding collision between [aA] and [Aa] (re)
148 [255]
148 [255]
149 $ hg parents --template '{rev}\n'
149 $ hg parents --template '{rev}\n'
150 4
150 4
151 $ hg status -A
151 $ hg status -A
152 C a
152 C a
153 C x
153 C x
154 $ cat a
154 $ cat a
155 modified at #4
155 modified at #4
156
156
157 $ hg update --clean 2
157 $ hg update --clean 2
158 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
158 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
159 $ hg merge
159 $ hg merge
160 abort: case-folding collision between [aA] and [Aa] (re)
160 abort: case-folding collision between [aA] and [Aa] (re)
161 [255]
161 [255]
162 $ hg parents --template '{rev}\n'
162 $ hg parents --template '{rev}\n'
163 2
163 2
164 $ hg status -A
164 $ hg status -A
165 C A
165 C A
166 $ cat A
166 $ cat A
167 A
167 A
168
168
169 test for deletion awareness of case-folding collision check (issue3648):
169 test for deletion awareness of case-folding collision check (issue3648):
170 revision '#3' doesn't change 'a', so 'a' should be recognized as
170 revision '#3' doesn't change 'a', so 'a' should be recognized as
171 safely removed in merging between #2 and #3.
171 safely removed in merging between #2 and #3.
172
172
173 $ hg update --clean 3
173 $ hg update --clean 3
174 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
174 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
175 $ hg merge 2
175 $ hg merge 2
176 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
176 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
177 (branch merge, don't forget to commit)
177 (branch merge, don't forget to commit)
178 $ hg status -A
178 $ hg status -A
179 M A
179 M A
180 R a
180 R a
181 C x
181 C x
182
182
183 $ hg update --clean 2
183 $ hg update --clean 2
184 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
184 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
185 $ hg merge 3
185 $ hg merge 3
186 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
186 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
187 (branch merge, don't forget to commit)
187 (branch merge, don't forget to commit)
188 $ hg status -A
188 $ hg status -A
189 M x
189 M x
190 C A
190 C A
191
191
192 $ cd ..
192 $ cd ..
193
193
194 Prepare for tests of directory case-folding collisions
194 Prepare for tests of directory case-folding collisions
195
195
196 $ hg init directory-casing
196 $ hg init directory-casing
197 $ cd directory-casing
197 $ cd directory-casing
198 $ touch 0 # test: file without directory
198 $ touch 0 # test: file without directory
199 $ mkdir 0a
199 $ mkdir 0a
200 $ touch 0a/f
200 $ touch 0a/f
201 $ mkdir aA
201 $ mkdir aA
202 $ touch aA/a
202 $ touch aA/a
203 $ hg ci -Aqm0
203 $ hg ci -Aqm0
204
204
205 Directory/file case-folding collision:
205 Directory/file case-folding collision:
206
206
207 $ hg up -q null
207 $ hg up -q null
208 $ touch 00 # test: starts as '0'
208 $ touch 00 # test: starts as '0'
209 $ mkdir 000 # test: starts as '0'
209 $ mkdir 000 # test: starts as '0'
210 $ touch 000/f
210 $ touch 000/f
211 $ touch Aa # test: collision with 'aA/a'
211 $ touch Aa # test: collision with 'aA/a'
212 $ hg ci -Aqm1
212 $ hg ci -Aqm1
213
213
214 $ hg merge 0
214 $ hg merge 0
215 abort: case-folding collision between Aa and directory of aA/a
215 abort: case-folding collision between Aa and directory of aA/a
216 [255]
216 [255]
217 (note: no collision between 0 and 00 or 000/f)
217 (note: no collision between 0 and 00 or 000/f)
218
218
219 Directory case-folding collision:
219 Directory case-folding collision:
220
220
221 $ hg up -qC null
221 $ hg up -qC null
222 $ hg --config extensions.purge= purge
222 $ hg --config extensions.purge= purge
223 $ mkdir 0A0
223 $ mkdir 0A0
224 $ touch 0A0/f # test: starts as '0a'
224 $ touch 0A0/f # test: starts as '0a'
225 $ mkdir Aa
225 $ mkdir Aa
226 $ touch Aa/b # test: collision with 'aA/a'
226 $ touch Aa/b # test: collision with 'aA/a'
227 $ hg ci -Aqm2
227 $ hg ci -Aqm2
228
228
229 $ hg merge 0
229 $ hg merge 0
230 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
230 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
231 (branch merge, don't forget to commit)
231 (branch merge, don't forget to commit)
232
232
233 $ cd ..
233 $ cd ..
234
234
235 ################################
235 ################################
236 test for linear updates
236 test for linear updates
237 ################################
237 ################################
238
238
239 test for rename awareness of case-folding collision check:
239 test for rename awareness of case-folding collision check:
240
240
241 (1) colliding file is one renamed from collided file
241 (1) colliding file is one renamed from collided file
242
242
243 $ hg init linearupdate_renameaware_1
243 $ hg init linearupdate_renameaware_1
244 $ cd linearupdate_renameaware_1
244 $ cd linearupdate_renameaware_1
245
245
246 $ echo a > a
246 $ echo a > a
247 $ hg add a
247 $ hg add a
248 $ hg commit -m '#0'
248 $ hg commit -m '#0'
249 $ hg rename a tmp
249 $ hg rename a tmp
250 $ hg rename tmp A
250 $ hg rename tmp A
251 $ hg commit -m '#1'
251 $ hg commit -m '#1'
252
252
253 $ hg update 0
253 $ hg update 0
254 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
254 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
255
255
256 $ echo 'this is added line' >> a
256 $ echo 'this is added line' >> a
257 $ hg update 1
257 $ hg update 1
258 merging a and A to A
258 merging a and A to A
259 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
259 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
260 $ hg status -A
260 $ hg status -A
261 M A
261 M A
262 $ cat A
262 $ cat A
263 a
263 a
264 this is added line
264 this is added line
265
265
266 $ cd ..
266 $ cd ..
267
267
268 (2) colliding file is not related to collided file
268 (2) colliding file is not related to collided file
269
269
270 $ hg init linearupdate_renameaware_2
270 $ hg init linearupdate_renameaware_2
271 $ cd linearupdate_renameaware_2
271 $ cd linearupdate_renameaware_2
272
272
273 $ echo a > a
273 $ echo a > a
274 $ hg add a
274 $ hg add a
275 $ hg commit -m '#0'
275 $ hg commit -m '#0'
276 $ hg remove a
276 $ hg remove a
277 $ hg commit -m '#1'
277 $ hg commit -m '#1'
278 $ echo A > A
278 $ echo A > A
279 $ hg add A
279 $ hg add A
280 $ hg commit -m '#2'
280 $ hg commit -m '#2'
281
281
282 $ hg update 0
282 $ hg update 0
283 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
283 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
284 $ hg parents --template '{rev}\n'
284 $ hg parents --template '{rev}\n'
285 0
285 0
286 $ hg status -A
286 $ hg status -A
287 C a
287 C a
288 $ cat A
288 $ cat A
289 a
289 a
290 $ hg up -qC 2
290 $ hg up -qC 2
291
291
292 $ hg update --check 0
292 $ hg update --check 0
293 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
293 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
294 $ hg parents --template '{rev}\n'
294 $ hg parents --template '{rev}\n'
295 0
295 0
296 $ hg status -A
296 $ hg status -A
297 C a
297 C a
298 $ cat a
298 $ cat a
299 a
299 a
300
300
301 $ hg update --clean 2
301 $ hg update --clean 2
302 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
302 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
303 $ hg parents --template '{rev}\n'
303 $ hg parents --template '{rev}\n'
304 2
304 2
305 $ hg status -A
305 $ hg status -A
306 C A
306 C A
307 $ cat A
307 $ cat A
308 A
308 A
309
309
310 $ cd ..
310 $ cd ..
311
311
312 (3) colliding file is not related to collided file: added in working dir
312 (3) colliding file is not related to collided file: added in working dir
313
313
314 $ hg init linearupdate_renameaware_3
314 $ hg init linearupdate_renameaware_3
315 $ cd linearupdate_renameaware_3
315 $ cd linearupdate_renameaware_3
316
316
317 $ echo a > a
317 $ echo a > a
318 $ hg add a
318 $ hg add a
319 $ hg commit -m '#0'
319 $ hg commit -m '#0'
320 $ hg rename a b
320 $ hg rename a b
321 $ hg commit -m '#1'
321 $ hg commit -m '#1'
322 $ hg update 0
322 $ hg update 0
323 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
323 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
324
324
325 $ echo B > B
325 $ echo B > B
326 $ hg add B
326 $ hg add B
327 $ hg status
327 $ hg status
328 A B
328 A B
329 $ hg update
329 $ hg update
330 abort: case-folding collision between [bB] and [Bb] (re)
330 abort: case-folding collision between [bB] and [Bb] (re)
331 [255]
331 [255]
332
332
333 $ hg update --check
333 $ hg update --check
334 abort: uncommitted changes
334 abort: uncommitted changes
335 [255]
335 [20]
336
336
337 $ hg update --clean
337 $ hg update --clean
338 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
338 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
339 $ hg parents --template '{rev}\n'
339 $ hg parents --template '{rev}\n'
340 1
340 1
341 $ hg status -A
341 $ hg status -A
342 C b
342 C b
343 $ cat b
343 $ cat b
344 a
344 a
345
345
346 $ cd ..
346 $ cd ..
@@ -1,1309 +1,1309 b''
1 #testcases sshv1 sshv2
1 #testcases sshv1 sshv2
2
2
3 #if sshv2
3 #if sshv2
4 $ cat >> $HGRCPATH << EOF
4 $ cat >> $HGRCPATH << EOF
5 > [experimental]
5 > [experimental]
6 > sshpeer.advertise-v2 = true
6 > sshpeer.advertise-v2 = true
7 > sshserver.support-v2 = true
7 > sshserver.support-v2 = true
8 > EOF
8 > EOF
9 #endif
9 #endif
10
10
11 Prepare repo a:
11 Prepare repo a:
12
12
13 $ hg init a
13 $ hg init a
14 $ cd a
14 $ cd a
15 $ echo a > a
15 $ echo a > a
16 $ hg add a
16 $ hg add a
17 $ hg commit -m test
17 $ hg commit -m test
18 $ echo first line > b
18 $ echo first line > b
19 $ hg add b
19 $ hg add b
20
20
21 Create a non-inlined filelog:
21 Create a non-inlined filelog:
22
22
23 $ "$PYTHON" -c 'open("data1", "wb").write(b"".join(b"%d\n" % x for x in range(10000)))'
23 $ "$PYTHON" -c 'open("data1", "wb").write(b"".join(b"%d\n" % x for x in range(10000)))'
24 $ for j in 0 1 2 3 4 5 6 7 8 9; do
24 $ for j in 0 1 2 3 4 5 6 7 8 9; do
25 > cat data1 >> b
25 > cat data1 >> b
26 > hg commit -m test
26 > hg commit -m test
27 > done
27 > done
28
28
29 List files in store/data (should show a 'b.d'):
29 List files in store/data (should show a 'b.d'):
30
30
31 #if reporevlogstore
31 #if reporevlogstore
32 $ for i in .hg/store/data/*; do
32 $ for i in .hg/store/data/*; do
33 > echo $i
33 > echo $i
34 > done
34 > done
35 .hg/store/data/a.i
35 .hg/store/data/a.i
36 .hg/store/data/b.d
36 .hg/store/data/b.d
37 .hg/store/data/b.i
37 .hg/store/data/b.i
38 #endif
38 #endif
39
39
40 Trigger branchcache creation:
40 Trigger branchcache creation:
41
41
42 $ hg branches
42 $ hg branches
43 default 10:a7949464abda
43 default 10:a7949464abda
44 $ ls .hg/cache
44 $ ls .hg/cache
45 branch2-served
45 branch2-served
46 rbc-names-v1
46 rbc-names-v1
47 rbc-revs-v1
47 rbc-revs-v1
48
48
49 Default operation:
49 Default operation:
50
50
51 $ hg clone . ../b
51 $ hg clone . ../b
52 updating to branch default
52 updating to branch default
53 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
53 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
54 $ cd ../b
54 $ cd ../b
55
55
56 Ensure branchcache got copied over:
56 Ensure branchcache got copied over:
57
57
58 $ ls .hg/cache
58 $ ls .hg/cache
59 branch2-served
59 branch2-served
60 rbc-names-v1
60 rbc-names-v1
61 rbc-revs-v1
61 rbc-revs-v1
62
62
63 $ cat a
63 $ cat a
64 a
64 a
65 $ hg verify
65 $ hg verify
66 checking changesets
66 checking changesets
67 checking manifests
67 checking manifests
68 crosschecking files in changesets and manifests
68 crosschecking files in changesets and manifests
69 checking files
69 checking files
70 checked 11 changesets with 11 changes to 2 files
70 checked 11 changesets with 11 changes to 2 files
71
71
72 Invalid dest '' must abort:
72 Invalid dest '' must abort:
73
73
74 $ hg clone . ''
74 $ hg clone . ''
75 abort: empty destination path is not valid
75 abort: empty destination path is not valid
76 [10]
76 [10]
77
77
78 No update, with debug option:
78 No update, with debug option:
79
79
80 #if hardlink
80 #if hardlink
81 $ hg --debug clone -U . ../c --config progress.debug=true
81 $ hg --debug clone -U . ../c --config progress.debug=true
82 linking: 1 files
82 linking: 1 files
83 linking: 2 files
83 linking: 2 files
84 linking: 3 files
84 linking: 3 files
85 linking: 4 files
85 linking: 4 files
86 linking: 5 files
86 linking: 5 files
87 linking: 6 files
87 linking: 6 files
88 linking: 7 files
88 linking: 7 files
89 linking: 8 files
89 linking: 8 files
90 linked 8 files (reporevlogstore !)
90 linked 8 files (reporevlogstore !)
91 linking: 9 files (reposimplestore !)
91 linking: 9 files (reposimplestore !)
92 linking: 10 files (reposimplestore !)
92 linking: 10 files (reposimplestore !)
93 linking: 11 files (reposimplestore !)
93 linking: 11 files (reposimplestore !)
94 linking: 12 files (reposimplestore !)
94 linking: 12 files (reposimplestore !)
95 linking: 13 files (reposimplestore !)
95 linking: 13 files (reposimplestore !)
96 linking: 14 files (reposimplestore !)
96 linking: 14 files (reposimplestore !)
97 linking: 15 files (reposimplestore !)
97 linking: 15 files (reposimplestore !)
98 linking: 16 files (reposimplestore !)
98 linking: 16 files (reposimplestore !)
99 linking: 17 files (reposimplestore !)
99 linking: 17 files (reposimplestore !)
100 linking: 18 files (reposimplestore !)
100 linking: 18 files (reposimplestore !)
101 linked 18 files (reposimplestore !)
101 linked 18 files (reposimplestore !)
102 #else
102 #else
103 $ hg --debug clone -U . ../c --config progress.debug=true
103 $ hg --debug clone -U . ../c --config progress.debug=true
104 linking: 1 files
104 linking: 1 files
105 copying: 2 files
105 copying: 2 files
106 copying: 3 files
106 copying: 3 files
107 copying: 4 files
107 copying: 4 files
108 copying: 5 files
108 copying: 5 files
109 copying: 6 files
109 copying: 6 files
110 copying: 7 files
110 copying: 7 files
111 copying: 8 files
111 copying: 8 files
112 copied 8 files (reporevlogstore !)
112 copied 8 files (reporevlogstore !)
113 copying: 9 files (reposimplestore !)
113 copying: 9 files (reposimplestore !)
114 copying: 10 files (reposimplestore !)
114 copying: 10 files (reposimplestore !)
115 copying: 11 files (reposimplestore !)
115 copying: 11 files (reposimplestore !)
116 copying: 12 files (reposimplestore !)
116 copying: 12 files (reposimplestore !)
117 copying: 13 files (reposimplestore !)
117 copying: 13 files (reposimplestore !)
118 copying: 14 files (reposimplestore !)
118 copying: 14 files (reposimplestore !)
119 copying: 15 files (reposimplestore !)
119 copying: 15 files (reposimplestore !)
120 copying: 16 files (reposimplestore !)
120 copying: 16 files (reposimplestore !)
121 copying: 17 files (reposimplestore !)
121 copying: 17 files (reposimplestore !)
122 copying: 18 files (reposimplestore !)
122 copying: 18 files (reposimplestore !)
123 copied 18 files (reposimplestore !)
123 copied 18 files (reposimplestore !)
124 #endif
124 #endif
125 $ cd ../c
125 $ cd ../c
126
126
127 Ensure branchcache got copied over:
127 Ensure branchcache got copied over:
128
128
129 $ ls .hg/cache
129 $ ls .hg/cache
130 branch2-served
130 branch2-served
131 rbc-names-v1
131 rbc-names-v1
132 rbc-revs-v1
132 rbc-revs-v1
133
133
134 $ cat a 2>/dev/null || echo "a not present"
134 $ cat a 2>/dev/null || echo "a not present"
135 a not present
135 a not present
136 $ hg verify
136 $ hg verify
137 checking changesets
137 checking changesets
138 checking manifests
138 checking manifests
139 crosschecking files in changesets and manifests
139 crosschecking files in changesets and manifests
140 checking files
140 checking files
141 checked 11 changesets with 11 changes to 2 files
141 checked 11 changesets with 11 changes to 2 files
142
142
143 Default destination:
143 Default destination:
144
144
145 $ mkdir ../d
145 $ mkdir ../d
146 $ cd ../d
146 $ cd ../d
147 $ hg clone ../a
147 $ hg clone ../a
148 destination directory: a
148 destination directory: a
149 updating to branch default
149 updating to branch default
150 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
150 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
151 $ cd a
151 $ cd a
152 $ hg cat a
152 $ hg cat a
153 a
153 a
154 $ cd ../..
154 $ cd ../..
155
155
156 Check that we drop the 'file:' from the path before writing the .hgrc:
156 Check that we drop the 'file:' from the path before writing the .hgrc:
157
157
158 $ hg clone file:a e
158 $ hg clone file:a e
159 updating to branch default
159 updating to branch default
160 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
160 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
161 $ grep 'file:' e/.hg/hgrc
161 $ grep 'file:' e/.hg/hgrc
162 [1]
162 [1]
163
163
164 Check that path aliases are expanded:
164 Check that path aliases are expanded:
165
165
166 $ hg clone -q -U --config 'paths.foobar=a#0' foobar f
166 $ hg clone -q -U --config 'paths.foobar=a#0' foobar f
167 $ hg -R f showconfig paths.default
167 $ hg -R f showconfig paths.default
168 $TESTTMP/a#0
168 $TESTTMP/a#0
169
169
170 Use --pull:
170 Use --pull:
171
171
172 $ hg clone --pull a g
172 $ hg clone --pull a g
173 requesting all changes
173 requesting all changes
174 adding changesets
174 adding changesets
175 adding manifests
175 adding manifests
176 adding file changes
176 adding file changes
177 added 11 changesets with 11 changes to 2 files
177 added 11 changesets with 11 changes to 2 files
178 new changesets acb14030fe0a:a7949464abda
178 new changesets acb14030fe0a:a7949464abda
179 updating to branch default
179 updating to branch default
180 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
180 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
181 $ hg -R g verify
181 $ hg -R g verify
182 checking changesets
182 checking changesets
183 checking manifests
183 checking manifests
184 crosschecking files in changesets and manifests
184 crosschecking files in changesets and manifests
185 checking files
185 checking files
186 checked 11 changesets with 11 changes to 2 files
186 checked 11 changesets with 11 changes to 2 files
187
187
188 Invalid dest '' with --pull must abort (issue2528):
188 Invalid dest '' with --pull must abort (issue2528):
189
189
190 $ hg clone --pull a ''
190 $ hg clone --pull a ''
191 abort: empty destination path is not valid
191 abort: empty destination path is not valid
192 [10]
192 [10]
193
193
194 Clone to '.':
194 Clone to '.':
195
195
196 $ mkdir h
196 $ mkdir h
197 $ cd h
197 $ cd h
198 $ hg clone ../a .
198 $ hg clone ../a .
199 updating to branch default
199 updating to branch default
200 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
200 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
201 $ cd ..
201 $ cd ..
202
202
203
203
204 *** Tests for option -u ***
204 *** Tests for option -u ***
205
205
206 Adding some more history to repo a:
206 Adding some more history to repo a:
207
207
208 $ cd a
208 $ cd a
209 $ hg tag ref1
209 $ hg tag ref1
210 $ echo the quick brown fox >a
210 $ echo the quick brown fox >a
211 $ hg ci -m "hacked default"
211 $ hg ci -m "hacked default"
212 $ hg up ref1
212 $ hg up ref1
213 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
213 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
214 $ hg branch stable
214 $ hg branch stable
215 marked working directory as branch stable
215 marked working directory as branch stable
216 (branches are permanent and global, did you want a bookmark?)
216 (branches are permanent and global, did you want a bookmark?)
217 $ echo some text >a
217 $ echo some text >a
218 $ hg ci -m "starting branch stable"
218 $ hg ci -m "starting branch stable"
219 $ hg tag ref2
219 $ hg tag ref2
220 $ echo some more text >a
220 $ echo some more text >a
221 $ hg ci -m "another change for branch stable"
221 $ hg ci -m "another change for branch stable"
222 $ hg up ref2
222 $ hg up ref2
223 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
223 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
224 $ hg parents
224 $ hg parents
225 changeset: 13:e8ece76546a6
225 changeset: 13:e8ece76546a6
226 branch: stable
226 branch: stable
227 tag: ref2
227 tag: ref2
228 parent: 10:a7949464abda
228 parent: 10:a7949464abda
229 user: test
229 user: test
230 date: Thu Jan 01 00:00:00 1970 +0000
230 date: Thu Jan 01 00:00:00 1970 +0000
231 summary: starting branch stable
231 summary: starting branch stable
232
232
233
233
234 Repo a has two heads:
234 Repo a has two heads:
235
235
236 $ hg heads
236 $ hg heads
237 changeset: 15:0aae7cf88f0d
237 changeset: 15:0aae7cf88f0d
238 branch: stable
238 branch: stable
239 tag: tip
239 tag: tip
240 user: test
240 user: test
241 date: Thu Jan 01 00:00:00 1970 +0000
241 date: Thu Jan 01 00:00:00 1970 +0000
242 summary: another change for branch stable
242 summary: another change for branch stable
243
243
244 changeset: 12:f21241060d6a
244 changeset: 12:f21241060d6a
245 user: test
245 user: test
246 date: Thu Jan 01 00:00:00 1970 +0000
246 date: Thu Jan 01 00:00:00 1970 +0000
247 summary: hacked default
247 summary: hacked default
248
248
249
249
250 $ cd ..
250 $ cd ..
251
251
252
252
253 Testing --noupdate with --updaterev (must abort):
253 Testing --noupdate with --updaterev (must abort):
254
254
255 $ hg clone --noupdate --updaterev 1 a ua
255 $ hg clone --noupdate --updaterev 1 a ua
256 abort: cannot specify both --noupdate and --updaterev
256 abort: cannot specify both --noupdate and --updaterev
257 [10]
257 [10]
258
258
259
259
260 Testing clone -u:
260 Testing clone -u:
261
261
262 $ hg clone -u . a ua
262 $ hg clone -u . a ua
263 updating to branch stable
263 updating to branch stable
264 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
264 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
265
265
266 Repo ua has both heads:
266 Repo ua has both heads:
267
267
268 $ hg -R ua heads
268 $ hg -R ua heads
269 changeset: 15:0aae7cf88f0d
269 changeset: 15:0aae7cf88f0d
270 branch: stable
270 branch: stable
271 tag: tip
271 tag: tip
272 user: test
272 user: test
273 date: Thu Jan 01 00:00:00 1970 +0000
273 date: Thu Jan 01 00:00:00 1970 +0000
274 summary: another change for branch stable
274 summary: another change for branch stable
275
275
276 changeset: 12:f21241060d6a
276 changeset: 12:f21241060d6a
277 user: test
277 user: test
278 date: Thu Jan 01 00:00:00 1970 +0000
278 date: Thu Jan 01 00:00:00 1970 +0000
279 summary: hacked default
279 summary: hacked default
280
280
281
281
282 Same revision checked out in repo a and ua:
282 Same revision checked out in repo a and ua:
283
283
284 $ hg -R a parents --template "{node|short}\n"
284 $ hg -R a parents --template "{node|short}\n"
285 e8ece76546a6
285 e8ece76546a6
286 $ hg -R ua parents --template "{node|short}\n"
286 $ hg -R ua parents --template "{node|short}\n"
287 e8ece76546a6
287 e8ece76546a6
288
288
289 $ rm -r ua
289 $ rm -r ua
290
290
291
291
292 Testing clone --pull -u:
292 Testing clone --pull -u:
293
293
294 $ hg clone --pull -u . a ua
294 $ hg clone --pull -u . a ua
295 requesting all changes
295 requesting all changes
296 adding changesets
296 adding changesets
297 adding manifests
297 adding manifests
298 adding file changes
298 adding file changes
299 added 16 changesets with 16 changes to 3 files (+1 heads)
299 added 16 changesets with 16 changes to 3 files (+1 heads)
300 new changesets acb14030fe0a:0aae7cf88f0d
300 new changesets acb14030fe0a:0aae7cf88f0d
301 updating to branch stable
301 updating to branch stable
302 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
302 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
303
303
304 Repo ua has both heads:
304 Repo ua has both heads:
305
305
306 $ hg -R ua heads
306 $ hg -R ua heads
307 changeset: 15:0aae7cf88f0d
307 changeset: 15:0aae7cf88f0d
308 branch: stable
308 branch: stable
309 tag: tip
309 tag: tip
310 user: test
310 user: test
311 date: Thu Jan 01 00:00:00 1970 +0000
311 date: Thu Jan 01 00:00:00 1970 +0000
312 summary: another change for branch stable
312 summary: another change for branch stable
313
313
314 changeset: 12:f21241060d6a
314 changeset: 12:f21241060d6a
315 user: test
315 user: test
316 date: Thu Jan 01 00:00:00 1970 +0000
316 date: Thu Jan 01 00:00:00 1970 +0000
317 summary: hacked default
317 summary: hacked default
318
318
319
319
320 Same revision checked out in repo a and ua:
320 Same revision checked out in repo a and ua:
321
321
322 $ hg -R a parents --template "{node|short}\n"
322 $ hg -R a parents --template "{node|short}\n"
323 e8ece76546a6
323 e8ece76546a6
324 $ hg -R ua parents --template "{node|short}\n"
324 $ hg -R ua parents --template "{node|short}\n"
325 e8ece76546a6
325 e8ece76546a6
326
326
327 $ rm -r ua
327 $ rm -r ua
328
328
329
329
330 Testing clone -u <branch>:
330 Testing clone -u <branch>:
331
331
332 $ hg clone -u stable a ua
332 $ hg clone -u stable a ua
333 updating to branch stable
333 updating to branch stable
334 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
334 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
335
335
336 Repo ua has both heads:
336 Repo ua has both heads:
337
337
338 $ hg -R ua heads
338 $ hg -R ua heads
339 changeset: 15:0aae7cf88f0d
339 changeset: 15:0aae7cf88f0d
340 branch: stable
340 branch: stable
341 tag: tip
341 tag: tip
342 user: test
342 user: test
343 date: Thu Jan 01 00:00:00 1970 +0000
343 date: Thu Jan 01 00:00:00 1970 +0000
344 summary: another change for branch stable
344 summary: another change for branch stable
345
345
346 changeset: 12:f21241060d6a
346 changeset: 12:f21241060d6a
347 user: test
347 user: test
348 date: Thu Jan 01 00:00:00 1970 +0000
348 date: Thu Jan 01 00:00:00 1970 +0000
349 summary: hacked default
349 summary: hacked default
350
350
351
351
352 Branch 'stable' is checked out:
352 Branch 'stable' is checked out:
353
353
354 $ hg -R ua parents
354 $ hg -R ua parents
355 changeset: 15:0aae7cf88f0d
355 changeset: 15:0aae7cf88f0d
356 branch: stable
356 branch: stable
357 tag: tip
357 tag: tip
358 user: test
358 user: test
359 date: Thu Jan 01 00:00:00 1970 +0000
359 date: Thu Jan 01 00:00:00 1970 +0000
360 summary: another change for branch stable
360 summary: another change for branch stable
361
361
362
362
363 $ rm -r ua
363 $ rm -r ua
364
364
365
365
366 Testing default checkout:
366 Testing default checkout:
367
367
368 $ hg clone a ua
368 $ hg clone a ua
369 updating to branch default
369 updating to branch default
370 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
370 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
371
371
372 Repo ua has both heads:
372 Repo ua has both heads:
373
373
374 $ hg -R ua heads
374 $ hg -R ua heads
375 changeset: 15:0aae7cf88f0d
375 changeset: 15:0aae7cf88f0d
376 branch: stable
376 branch: stable
377 tag: tip
377 tag: tip
378 user: test
378 user: test
379 date: Thu Jan 01 00:00:00 1970 +0000
379 date: Thu Jan 01 00:00:00 1970 +0000
380 summary: another change for branch stable
380 summary: another change for branch stable
381
381
382 changeset: 12:f21241060d6a
382 changeset: 12:f21241060d6a
383 user: test
383 user: test
384 date: Thu Jan 01 00:00:00 1970 +0000
384 date: Thu Jan 01 00:00:00 1970 +0000
385 summary: hacked default
385 summary: hacked default
386
386
387
387
388 Branch 'default' is checked out:
388 Branch 'default' is checked out:
389
389
390 $ hg -R ua parents
390 $ hg -R ua parents
391 changeset: 12:f21241060d6a
391 changeset: 12:f21241060d6a
392 user: test
392 user: test
393 date: Thu Jan 01 00:00:00 1970 +0000
393 date: Thu Jan 01 00:00:00 1970 +0000
394 summary: hacked default
394 summary: hacked default
395
395
396 Test clone with a branch named "@" (issue3677)
396 Test clone with a branch named "@" (issue3677)
397
397
398 $ hg -R ua branch @
398 $ hg -R ua branch @
399 marked working directory as branch @
399 marked working directory as branch @
400 $ hg -R ua commit -m 'created branch @'
400 $ hg -R ua commit -m 'created branch @'
401 $ hg clone ua atbranch
401 $ hg clone ua atbranch
402 updating to branch default
402 updating to branch default
403 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
403 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
404 $ hg -R atbranch heads
404 $ hg -R atbranch heads
405 changeset: 16:798b6d97153e
405 changeset: 16:798b6d97153e
406 branch: @
406 branch: @
407 tag: tip
407 tag: tip
408 parent: 12:f21241060d6a
408 parent: 12:f21241060d6a
409 user: test
409 user: test
410 date: Thu Jan 01 00:00:00 1970 +0000
410 date: Thu Jan 01 00:00:00 1970 +0000
411 summary: created branch @
411 summary: created branch @
412
412
413 changeset: 15:0aae7cf88f0d
413 changeset: 15:0aae7cf88f0d
414 branch: stable
414 branch: stable
415 user: test
415 user: test
416 date: Thu Jan 01 00:00:00 1970 +0000
416 date: Thu Jan 01 00:00:00 1970 +0000
417 summary: another change for branch stable
417 summary: another change for branch stable
418
418
419 changeset: 12:f21241060d6a
419 changeset: 12:f21241060d6a
420 user: test
420 user: test
421 date: Thu Jan 01 00:00:00 1970 +0000
421 date: Thu Jan 01 00:00:00 1970 +0000
422 summary: hacked default
422 summary: hacked default
423
423
424 $ hg -R atbranch parents
424 $ hg -R atbranch parents
425 changeset: 12:f21241060d6a
425 changeset: 12:f21241060d6a
426 user: test
426 user: test
427 date: Thu Jan 01 00:00:00 1970 +0000
427 date: Thu Jan 01 00:00:00 1970 +0000
428 summary: hacked default
428 summary: hacked default
429
429
430
430
431 $ rm -r ua atbranch
431 $ rm -r ua atbranch
432
432
433
433
434 Testing #<branch>:
434 Testing #<branch>:
435
435
436 $ hg clone -u . a#stable ua
436 $ hg clone -u . a#stable ua
437 adding changesets
437 adding changesets
438 adding manifests
438 adding manifests
439 adding file changes
439 adding file changes
440 added 14 changesets with 14 changes to 3 files
440 added 14 changesets with 14 changes to 3 files
441 new changesets acb14030fe0a:0aae7cf88f0d
441 new changesets acb14030fe0a:0aae7cf88f0d
442 updating to branch stable
442 updating to branch stable
443 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
443 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
444
444
445 Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6):
445 Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6):
446
446
447 $ hg -R ua heads
447 $ hg -R ua heads
448 changeset: 13:0aae7cf88f0d
448 changeset: 13:0aae7cf88f0d
449 branch: stable
449 branch: stable
450 tag: tip
450 tag: tip
451 user: test
451 user: test
452 date: Thu Jan 01 00:00:00 1970 +0000
452 date: Thu Jan 01 00:00:00 1970 +0000
453 summary: another change for branch stable
453 summary: another change for branch stable
454
454
455 changeset: 10:a7949464abda
455 changeset: 10:a7949464abda
456 user: test
456 user: test
457 date: Thu Jan 01 00:00:00 1970 +0000
457 date: Thu Jan 01 00:00:00 1970 +0000
458 summary: test
458 summary: test
459
459
460
460
461 Same revision checked out in repo a and ua:
461 Same revision checked out in repo a and ua:
462
462
463 $ hg -R a parents --template "{node|short}\n"
463 $ hg -R a parents --template "{node|short}\n"
464 e8ece76546a6
464 e8ece76546a6
465 $ hg -R ua parents --template "{node|short}\n"
465 $ hg -R ua parents --template "{node|short}\n"
466 e8ece76546a6
466 e8ece76546a6
467
467
468 $ rm -r ua
468 $ rm -r ua
469
469
470
470
471 Testing -u -r <branch>:
471 Testing -u -r <branch>:
472
472
473 $ hg clone -u . -r stable a ua
473 $ hg clone -u . -r stable a ua
474 adding changesets
474 adding changesets
475 adding manifests
475 adding manifests
476 adding file changes
476 adding file changes
477 added 14 changesets with 14 changes to 3 files
477 added 14 changesets with 14 changes to 3 files
478 new changesets acb14030fe0a:0aae7cf88f0d
478 new changesets acb14030fe0a:0aae7cf88f0d
479 updating to branch stable
479 updating to branch stable
480 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
480 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
481
481
482 Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6):
482 Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6):
483
483
484 $ hg -R ua heads
484 $ hg -R ua heads
485 changeset: 13:0aae7cf88f0d
485 changeset: 13:0aae7cf88f0d
486 branch: stable
486 branch: stable
487 tag: tip
487 tag: tip
488 user: test
488 user: test
489 date: Thu Jan 01 00:00:00 1970 +0000
489 date: Thu Jan 01 00:00:00 1970 +0000
490 summary: another change for branch stable
490 summary: another change for branch stable
491
491
492 changeset: 10:a7949464abda
492 changeset: 10:a7949464abda
493 user: test
493 user: test
494 date: Thu Jan 01 00:00:00 1970 +0000
494 date: Thu Jan 01 00:00:00 1970 +0000
495 summary: test
495 summary: test
496
496
497
497
498 Same revision checked out in repo a and ua:
498 Same revision checked out in repo a and ua:
499
499
500 $ hg -R a parents --template "{node|short}\n"
500 $ hg -R a parents --template "{node|short}\n"
501 e8ece76546a6
501 e8ece76546a6
502 $ hg -R ua parents --template "{node|short}\n"
502 $ hg -R ua parents --template "{node|short}\n"
503 e8ece76546a6
503 e8ece76546a6
504
504
505 $ rm -r ua
505 $ rm -r ua
506
506
507
507
508 Testing -r <branch>:
508 Testing -r <branch>:
509
509
510 $ hg clone -r stable a ua
510 $ hg clone -r stable a ua
511 adding changesets
511 adding changesets
512 adding manifests
512 adding manifests
513 adding file changes
513 adding file changes
514 added 14 changesets with 14 changes to 3 files
514 added 14 changesets with 14 changes to 3 files
515 new changesets acb14030fe0a:0aae7cf88f0d
515 new changesets acb14030fe0a:0aae7cf88f0d
516 updating to branch stable
516 updating to branch stable
517 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
517 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
518
518
519 Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6):
519 Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6):
520
520
521 $ hg -R ua heads
521 $ hg -R ua heads
522 changeset: 13:0aae7cf88f0d
522 changeset: 13:0aae7cf88f0d
523 branch: stable
523 branch: stable
524 tag: tip
524 tag: tip
525 user: test
525 user: test
526 date: Thu Jan 01 00:00:00 1970 +0000
526 date: Thu Jan 01 00:00:00 1970 +0000
527 summary: another change for branch stable
527 summary: another change for branch stable
528
528
529 changeset: 10:a7949464abda
529 changeset: 10:a7949464abda
530 user: test
530 user: test
531 date: Thu Jan 01 00:00:00 1970 +0000
531 date: Thu Jan 01 00:00:00 1970 +0000
532 summary: test
532 summary: test
533
533
534
534
535 Branch 'stable' is checked out:
535 Branch 'stable' is checked out:
536
536
537 $ hg -R ua parents
537 $ hg -R ua parents
538 changeset: 13:0aae7cf88f0d
538 changeset: 13:0aae7cf88f0d
539 branch: stable
539 branch: stable
540 tag: tip
540 tag: tip
541 user: test
541 user: test
542 date: Thu Jan 01 00:00:00 1970 +0000
542 date: Thu Jan 01 00:00:00 1970 +0000
543 summary: another change for branch stable
543 summary: another change for branch stable
544
544
545
545
546 $ rm -r ua
546 $ rm -r ua
547
547
548
548
549 Issue2267: Error in 1.6 hg.py: TypeError: 'NoneType' object is not
549 Issue2267: Error in 1.6 hg.py: TypeError: 'NoneType' object is not
550 iterable in addbranchrevs()
550 iterable in addbranchrevs()
551
551
552 $ cat <<EOF > simpleclone.py
552 $ cat <<EOF > simpleclone.py
553 > from mercurial import hg, ui as uimod
553 > from mercurial import hg, ui as uimod
554 > myui = uimod.ui.load()
554 > myui = uimod.ui.load()
555 > repo = hg.repository(myui, b'a')
555 > repo = hg.repository(myui, b'a')
556 > hg.clone(myui, {}, repo, dest=b"ua")
556 > hg.clone(myui, {}, repo, dest=b"ua")
557 > EOF
557 > EOF
558
558
559 $ "$PYTHON" simpleclone.py
559 $ "$PYTHON" simpleclone.py
560 updating to branch default
560 updating to branch default
561 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
561 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
562
562
563 $ rm -r ua
563 $ rm -r ua
564
564
565 $ cat <<EOF > branchclone.py
565 $ cat <<EOF > branchclone.py
566 > from mercurial import extensions, hg, ui as uimod
566 > from mercurial import extensions, hg, ui as uimod
567 > myui = uimod.ui.load()
567 > myui = uimod.ui.load()
568 > extensions.loadall(myui)
568 > extensions.loadall(myui)
569 > extensions.populateui(myui)
569 > extensions.populateui(myui)
570 > repo = hg.repository(myui, b'a')
570 > repo = hg.repository(myui, b'a')
571 > hg.clone(myui, {}, repo, dest=b"ua", branch=[b"stable"])
571 > hg.clone(myui, {}, repo, dest=b"ua", branch=[b"stable"])
572 > EOF
572 > EOF
573
573
574 $ "$PYTHON" branchclone.py
574 $ "$PYTHON" branchclone.py
575 adding changesets
575 adding changesets
576 adding manifests
576 adding manifests
577 adding file changes
577 adding file changes
578 added 14 changesets with 14 changes to 3 files
578 added 14 changesets with 14 changes to 3 files
579 new changesets acb14030fe0a:0aae7cf88f0d
579 new changesets acb14030fe0a:0aae7cf88f0d
580 updating to branch stable
580 updating to branch stable
581 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
581 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
582 $ rm -r ua
582 $ rm -r ua
583
583
584
584
585 Test clone with special '@' bookmark:
585 Test clone with special '@' bookmark:
586 $ cd a
586 $ cd a
587 $ hg bookmark -r a7949464abda @ # branch point of stable from default
587 $ hg bookmark -r a7949464abda @ # branch point of stable from default
588 $ hg clone . ../i
588 $ hg clone . ../i
589 updating to bookmark @
589 updating to bookmark @
590 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
590 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
591 $ hg id -i ../i
591 $ hg id -i ../i
592 a7949464abda
592 a7949464abda
593 $ rm -r ../i
593 $ rm -r ../i
594
594
595 $ hg bookmark -f -r stable @
595 $ hg bookmark -f -r stable @
596 $ hg bookmarks
596 $ hg bookmarks
597 @ 15:0aae7cf88f0d
597 @ 15:0aae7cf88f0d
598 $ hg clone . ../i
598 $ hg clone . ../i
599 updating to bookmark @ on branch stable
599 updating to bookmark @ on branch stable
600 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
600 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
601 $ hg id -i ../i
601 $ hg id -i ../i
602 0aae7cf88f0d
602 0aae7cf88f0d
603 $ cd "$TESTTMP"
603 $ cd "$TESTTMP"
604
604
605
605
606 Testing failures:
606 Testing failures:
607
607
608 $ mkdir fail
608 $ mkdir fail
609 $ cd fail
609 $ cd fail
610
610
611 No local source
611 No local source
612
612
613 $ hg clone a b
613 $ hg clone a b
614 abort: repository a not found
614 abort: repository a not found
615 [255]
615 [255]
616
616
617 Invalid URL
617 Invalid URL
618
618
619 $ hg clone http://invalid:url/a b
619 $ hg clone http://invalid:url/a b
620 abort: error: nonnumeric port: 'url'
620 abort: error: nonnumeric port: 'url'
621 [100]
621 [100]
622
622
623 No remote source
623 No remote source
624
624
625 #if windows
625 #if windows
626 $ hg clone http://$LOCALIP:3121/a b
626 $ hg clone http://$LOCALIP:3121/a b
627 abort: error: * (glob)
627 abort: error: * (glob)
628 [255]
628 [100]
629 #else
629 #else
630 $ hg clone http://$LOCALIP:3121/a b
630 $ hg clone http://$LOCALIP:3121/a b
631 abort: error: *refused* (glob)
631 abort: error: *refused* (glob)
632 [100]
632 [100]
633 #endif
633 #endif
634 $ rm -rf b # work around bug with http clone
634 $ rm -rf b # work around bug with http clone
635
635
636
636
637 #if unix-permissions no-root
637 #if unix-permissions no-root
638
638
639 Inaccessible source
639 Inaccessible source
640
640
641 $ mkdir a
641 $ mkdir a
642 $ chmod 000 a
642 $ chmod 000 a
643 $ hg clone a b
643 $ hg clone a b
644 abort: Permission denied: *$TESTTMP/fail/a/.hg* (glob)
644 abort: Permission denied: *$TESTTMP/fail/a/.hg* (glob)
645 [255]
645 [255]
646
646
647 Inaccessible destination
647 Inaccessible destination
648
648
649 $ hg init b
649 $ hg init b
650 $ cd b
650 $ cd b
651 $ hg clone . ../a
651 $ hg clone . ../a
652 abort: Permission denied: *../a* (glob)
652 abort: Permission denied: *../a* (glob)
653 [255]
653 [255]
654 $ cd ..
654 $ cd ..
655 $ chmod 700 a
655 $ chmod 700 a
656 $ rm -r a b
656 $ rm -r a b
657
657
658 #endif
658 #endif
659
659
660
660
661 #if fifo
661 #if fifo
662
662
663 Source of wrong type
663 Source of wrong type
664
664
665 $ mkfifo a
665 $ mkfifo a
666 $ hg clone a b
666 $ hg clone a b
667 abort: $ENOTDIR$: *$TESTTMP/fail/a/.hg* (glob)
667 abort: $ENOTDIR$: *$TESTTMP/fail/a/.hg* (glob)
668 [255]
668 [255]
669 $ rm a
669 $ rm a
670
670
671 #endif
671 #endif
672
672
673 Default destination, same directory
673 Default destination, same directory
674
674
675 $ hg init q
675 $ hg init q
676 $ hg clone q
676 $ hg clone q
677 destination directory: q
677 destination directory: q
678 abort: destination 'q' is not empty
678 abort: destination 'q' is not empty
679 [10]
679 [10]
680
680
681 destination directory not empty
681 destination directory not empty
682
682
683 $ mkdir a
683 $ mkdir a
684 $ echo stuff > a/a
684 $ echo stuff > a/a
685 $ hg clone q a
685 $ hg clone q a
686 abort: destination 'a' is not empty
686 abort: destination 'a' is not empty
687 [10]
687 [10]
688
688
689
689
690 #if unix-permissions no-root
690 #if unix-permissions no-root
691
691
692 leave existing directory in place after clone failure
692 leave existing directory in place after clone failure
693
693
694 $ hg init c
694 $ hg init c
695 $ cd c
695 $ cd c
696 $ echo c > c
696 $ echo c > c
697 $ hg commit -A -m test
697 $ hg commit -A -m test
698 adding c
698 adding c
699 $ chmod -rx .hg/store/data
699 $ chmod -rx .hg/store/data
700 $ cd ..
700 $ cd ..
701 $ mkdir d
701 $ mkdir d
702 $ hg clone c d 2> err
702 $ hg clone c d 2> err
703 [255]
703 [255]
704 $ test -d d
704 $ test -d d
705 $ test -d d/.hg
705 $ test -d d/.hg
706 [1]
706 [1]
707
707
708 re-enable perm to allow deletion
708 re-enable perm to allow deletion
709
709
710 $ chmod +rx c/.hg/store/data
710 $ chmod +rx c/.hg/store/data
711
711
712 #endif
712 #endif
713
713
714 $ cd ..
714 $ cd ..
715
715
716 Test clone from the repository in (emulated) revlog format 0 (issue4203):
716 Test clone from the repository in (emulated) revlog format 0 (issue4203):
717
717
718 $ mkdir issue4203
718 $ mkdir issue4203
719 $ mkdir -p src/.hg
719 $ mkdir -p src/.hg
720 $ echo foo > src/foo
720 $ echo foo > src/foo
721 $ hg -R src add src/foo
721 $ hg -R src add src/foo
722 $ hg -R src commit -m '#0'
722 $ hg -R src commit -m '#0'
723 $ hg -R src log -q
723 $ hg -R src log -q
724 0:e1bab28bca43
724 0:e1bab28bca43
725 $ hg -R src debugrevlog -c | egrep 'format|flags'
725 $ hg -R src debugrevlog -c | egrep 'format|flags'
726 format : 0
726 format : 0
727 flags : (none)
727 flags : (none)
728 $ hg root -R src -T json | sed 's|\\\\|\\|g'
728 $ hg root -R src -T json | sed 's|\\\\|\\|g'
729 [
729 [
730 {
730 {
731 "hgpath": "$TESTTMP/src/.hg",
731 "hgpath": "$TESTTMP/src/.hg",
732 "reporoot": "$TESTTMP/src",
732 "reporoot": "$TESTTMP/src",
733 "storepath": "$TESTTMP/src/.hg"
733 "storepath": "$TESTTMP/src/.hg"
734 }
734 }
735 ]
735 ]
736 $ hg clone -U -q src dst
736 $ hg clone -U -q src dst
737 $ hg -R dst log -q
737 $ hg -R dst log -q
738 0:e1bab28bca43
738 0:e1bab28bca43
739
739
740 Create repositories to test auto sharing functionality
740 Create repositories to test auto sharing functionality
741
741
742 $ cat >> $HGRCPATH << EOF
742 $ cat >> $HGRCPATH << EOF
743 > [extensions]
743 > [extensions]
744 > share=
744 > share=
745 > EOF
745 > EOF
746
746
747 $ hg init empty
747 $ hg init empty
748 $ hg init source1a
748 $ hg init source1a
749 $ cd source1a
749 $ cd source1a
750 $ echo initial1 > foo
750 $ echo initial1 > foo
751 $ hg -q commit -A -m initial
751 $ hg -q commit -A -m initial
752 $ echo second > foo
752 $ echo second > foo
753 $ hg commit -m second
753 $ hg commit -m second
754 $ cd ..
754 $ cd ..
755
755
756 $ hg init filteredrev0
756 $ hg init filteredrev0
757 $ cd filteredrev0
757 $ cd filteredrev0
758 $ cat >> .hg/hgrc << EOF
758 $ cat >> .hg/hgrc << EOF
759 > [experimental]
759 > [experimental]
760 > evolution.createmarkers=True
760 > evolution.createmarkers=True
761 > EOF
761 > EOF
762 $ echo initial1 > foo
762 $ echo initial1 > foo
763 $ hg -q commit -A -m initial0
763 $ hg -q commit -A -m initial0
764 $ hg -q up -r null
764 $ hg -q up -r null
765 $ echo initial2 > foo
765 $ echo initial2 > foo
766 $ hg -q commit -A -m initial1
766 $ hg -q commit -A -m initial1
767 $ hg debugobsolete c05d5c47a5cf81401869999f3d05f7d699d2b29a e082c1832e09a7d1e78b7fd49a592d372de854c8
767 $ hg debugobsolete c05d5c47a5cf81401869999f3d05f7d699d2b29a e082c1832e09a7d1e78b7fd49a592d372de854c8
768 1 new obsolescence markers
768 1 new obsolescence markers
769 obsoleted 1 changesets
769 obsoleted 1 changesets
770 $ cd ..
770 $ cd ..
771
771
772 $ hg -q clone --pull source1a source1b
772 $ hg -q clone --pull source1a source1b
773 $ cd source1a
773 $ cd source1a
774 $ hg bookmark bookA
774 $ hg bookmark bookA
775 $ echo 1a > foo
775 $ echo 1a > foo
776 $ hg commit -m 1a
776 $ hg commit -m 1a
777 $ cd ../source1b
777 $ cd ../source1b
778 $ hg -q up -r 0
778 $ hg -q up -r 0
779 $ echo head1 > foo
779 $ echo head1 > foo
780 $ hg commit -m head1
780 $ hg commit -m head1
781 created new head
781 created new head
782 $ hg bookmark head1
782 $ hg bookmark head1
783 $ hg -q up -r 0
783 $ hg -q up -r 0
784 $ echo head2 > foo
784 $ echo head2 > foo
785 $ hg commit -m head2
785 $ hg commit -m head2
786 created new head
786 created new head
787 $ hg bookmark head2
787 $ hg bookmark head2
788 $ hg -q up -r 0
788 $ hg -q up -r 0
789 $ hg branch branch1
789 $ hg branch branch1
790 marked working directory as branch branch1
790 marked working directory as branch branch1
791 (branches are permanent and global, did you want a bookmark?)
791 (branches are permanent and global, did you want a bookmark?)
792 $ echo branch1 > foo
792 $ echo branch1 > foo
793 $ hg commit -m branch1
793 $ hg commit -m branch1
794 $ hg -q up -r 0
794 $ hg -q up -r 0
795 $ hg branch branch2
795 $ hg branch branch2
796 marked working directory as branch branch2
796 marked working directory as branch branch2
797 $ echo branch2 > foo
797 $ echo branch2 > foo
798 $ hg commit -m branch2
798 $ hg commit -m branch2
799 $ cd ..
799 $ cd ..
800 $ hg init source2
800 $ hg init source2
801 $ cd source2
801 $ cd source2
802 $ echo initial2 > foo
802 $ echo initial2 > foo
803 $ hg -q commit -A -m initial2
803 $ hg -q commit -A -m initial2
804 $ echo second > foo
804 $ echo second > foo
805 $ hg commit -m second
805 $ hg commit -m second
806 $ cd ..
806 $ cd ..
807
807
808 Clone with auto share from an empty repo should not result in share
808 Clone with auto share from an empty repo should not result in share
809
809
810 $ mkdir share
810 $ mkdir share
811 $ hg --config share.pool=share clone empty share-empty
811 $ hg --config share.pool=share clone empty share-empty
812 (not using pooled storage: remote appears to be empty)
812 (not using pooled storage: remote appears to be empty)
813 updating to branch default
813 updating to branch default
814 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
814 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
815 $ ls share
815 $ ls share
816 $ test -d share-empty/.hg/store
816 $ test -d share-empty/.hg/store
817 $ test -f share-empty/.hg/sharedpath
817 $ test -f share-empty/.hg/sharedpath
818 [1]
818 [1]
819
819
820 Clone with auto share from a repo with filtered revision 0 should not result in share
820 Clone with auto share from a repo with filtered revision 0 should not result in share
821
821
822 $ hg --config share.pool=share clone filteredrev0 share-filtered
822 $ hg --config share.pool=share clone filteredrev0 share-filtered
823 (not using pooled storage: unable to resolve identity of remote)
823 (not using pooled storage: unable to resolve identity of remote)
824 requesting all changes
824 requesting all changes
825 adding changesets
825 adding changesets
826 adding manifests
826 adding manifests
827 adding file changes
827 adding file changes
828 added 1 changesets with 1 changes to 1 files
828 added 1 changesets with 1 changes to 1 files
829 new changesets e082c1832e09
829 new changesets e082c1832e09
830 updating to branch default
830 updating to branch default
831 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
831 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
832
832
833 Clone from repo with content should result in shared store being created
833 Clone from repo with content should result in shared store being created
834
834
835 $ hg --config share.pool=share clone source1a share-dest1a
835 $ hg --config share.pool=share clone source1a share-dest1a
836 (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
836 (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
837 requesting all changes
837 requesting all changes
838 adding changesets
838 adding changesets
839 adding manifests
839 adding manifests
840 adding file changes
840 adding file changes
841 added 3 changesets with 3 changes to 1 files
841 added 3 changesets with 3 changes to 1 files
842 new changesets b5f04eac9d8f:e5bfe23c0b47
842 new changesets b5f04eac9d8f:e5bfe23c0b47
843 searching for changes
843 searching for changes
844 no changes found
844 no changes found
845 adding remote bookmark bookA
845 adding remote bookmark bookA
846 updating working directory
846 updating working directory
847 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
847 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
848
848
849 The shared repo should have been created
849 The shared repo should have been created
850
850
851 $ ls share
851 $ ls share
852 b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1
852 b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1
853
853
854 The destination should point to it
854 The destination should point to it
855
855
856 $ cat share-dest1a/.hg/sharedpath; echo
856 $ cat share-dest1a/.hg/sharedpath; echo
857 $TESTTMP/share/b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1/.hg
857 $TESTTMP/share/b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1/.hg
858
858
859 The destination should have bookmarks
859 The destination should have bookmarks
860
860
861 $ hg -R share-dest1a bookmarks
861 $ hg -R share-dest1a bookmarks
862 bookA 2:e5bfe23c0b47
862 bookA 2:e5bfe23c0b47
863
863
864 The default path should be the remote, not the share
864 The default path should be the remote, not the share
865
865
866 $ hg -R share-dest1a config paths.default
866 $ hg -R share-dest1a config paths.default
867 $TESTTMP/source1a
867 $TESTTMP/source1a
868
868
869 Clone with existing share dir should result in pull + share
869 Clone with existing share dir should result in pull + share
870
870
871 $ hg --config share.pool=share clone source1b share-dest1b
871 $ hg --config share.pool=share clone source1b share-dest1b
872 (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
872 (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
873 searching for changes
873 searching for changes
874 adding changesets
874 adding changesets
875 adding manifests
875 adding manifests
876 adding file changes
876 adding file changes
877 adding remote bookmark head1
877 adding remote bookmark head1
878 adding remote bookmark head2
878 adding remote bookmark head2
879 added 4 changesets with 4 changes to 1 files (+4 heads)
879 added 4 changesets with 4 changes to 1 files (+4 heads)
880 new changesets 4a8dc1ab4c13:6bacf4683960
880 new changesets 4a8dc1ab4c13:6bacf4683960
881 updating working directory
881 updating working directory
882 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
882 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
883
883
884 $ ls share
884 $ ls share
885 b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1
885 b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1
886
886
887 $ cat share-dest1b/.hg/sharedpath; echo
887 $ cat share-dest1b/.hg/sharedpath; echo
888 $TESTTMP/share/b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1/.hg
888 $TESTTMP/share/b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1/.hg
889
889
890 We only get bookmarks from the remote, not everything in the share
890 We only get bookmarks from the remote, not everything in the share
891
891
892 $ hg -R share-dest1b bookmarks
892 $ hg -R share-dest1b bookmarks
893 head1 3:4a8dc1ab4c13
893 head1 3:4a8dc1ab4c13
894 head2 4:99f71071f117
894 head2 4:99f71071f117
895
895
896 Default path should be source, not share.
896 Default path should be source, not share.
897
897
898 $ hg -R share-dest1b config paths.default
898 $ hg -R share-dest1b config paths.default
899 $TESTTMP/source1b
899 $TESTTMP/source1b
900
900
901 Checked out revision should be head of default branch
901 Checked out revision should be head of default branch
902
902
903 $ hg -R share-dest1b log -r .
903 $ hg -R share-dest1b log -r .
904 changeset: 4:99f71071f117
904 changeset: 4:99f71071f117
905 bookmark: head2
905 bookmark: head2
906 parent: 0:b5f04eac9d8f
906 parent: 0:b5f04eac9d8f
907 user: test
907 user: test
908 date: Thu Jan 01 00:00:00 1970 +0000
908 date: Thu Jan 01 00:00:00 1970 +0000
909 summary: head2
909 summary: head2
910
910
911
911
912 Clone from unrelated repo should result in new share
912 Clone from unrelated repo should result in new share
913
913
914 $ hg --config share.pool=share clone source2 share-dest2
914 $ hg --config share.pool=share clone source2 share-dest2
915 (sharing from new pooled repository 22aeff664783fd44c6d9b435618173c118c3448e)
915 (sharing from new pooled repository 22aeff664783fd44c6d9b435618173c118c3448e)
916 requesting all changes
916 requesting all changes
917 adding changesets
917 adding changesets
918 adding manifests
918 adding manifests
919 adding file changes
919 adding file changes
920 added 2 changesets with 2 changes to 1 files
920 added 2 changesets with 2 changes to 1 files
921 new changesets 22aeff664783:63cf6c3dba4a
921 new changesets 22aeff664783:63cf6c3dba4a
922 searching for changes
922 searching for changes
923 no changes found
923 no changes found
924 updating working directory
924 updating working directory
925 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
925 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
926
926
927 $ ls share
927 $ ls share
928 22aeff664783fd44c6d9b435618173c118c3448e
928 22aeff664783fd44c6d9b435618173c118c3448e
929 b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1
929 b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1
930
930
931 remote naming mode works as advertised
931 remote naming mode works as advertised
932
932
933 $ hg --config share.pool=shareremote --config share.poolnaming=remote clone source1a share-remote1a
933 $ hg --config share.pool=shareremote --config share.poolnaming=remote clone source1a share-remote1a
934 (sharing from new pooled repository 195bb1fcdb595c14a6c13e0269129ed78f6debde)
934 (sharing from new pooled repository 195bb1fcdb595c14a6c13e0269129ed78f6debde)
935 requesting all changes
935 requesting all changes
936 adding changesets
936 adding changesets
937 adding manifests
937 adding manifests
938 adding file changes
938 adding file changes
939 added 3 changesets with 3 changes to 1 files
939 added 3 changesets with 3 changes to 1 files
940 new changesets b5f04eac9d8f:e5bfe23c0b47
940 new changesets b5f04eac9d8f:e5bfe23c0b47
941 searching for changes
941 searching for changes
942 no changes found
942 no changes found
943 adding remote bookmark bookA
943 adding remote bookmark bookA
944 updating working directory
944 updating working directory
945 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
945 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
946
946
947 $ ls shareremote
947 $ ls shareremote
948 195bb1fcdb595c14a6c13e0269129ed78f6debde
948 195bb1fcdb595c14a6c13e0269129ed78f6debde
949
949
950 $ hg --config share.pool=shareremote --config share.poolnaming=remote clone source1b share-remote1b
950 $ hg --config share.pool=shareremote --config share.poolnaming=remote clone source1b share-remote1b
951 (sharing from new pooled repository c0d4f83847ca2a873741feb7048a45085fd47c46)
951 (sharing from new pooled repository c0d4f83847ca2a873741feb7048a45085fd47c46)
952 requesting all changes
952 requesting all changes
953 adding changesets
953 adding changesets
954 adding manifests
954 adding manifests
955 adding file changes
955 adding file changes
956 added 6 changesets with 6 changes to 1 files (+4 heads)
956 added 6 changesets with 6 changes to 1 files (+4 heads)
957 new changesets b5f04eac9d8f:6bacf4683960
957 new changesets b5f04eac9d8f:6bacf4683960
958 searching for changes
958 searching for changes
959 no changes found
959 no changes found
960 adding remote bookmark head1
960 adding remote bookmark head1
961 adding remote bookmark head2
961 adding remote bookmark head2
962 updating working directory
962 updating working directory
963 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
963 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
964
964
965 $ ls shareremote
965 $ ls shareremote
966 195bb1fcdb595c14a6c13e0269129ed78f6debde
966 195bb1fcdb595c14a6c13e0269129ed78f6debde
967 c0d4f83847ca2a873741feb7048a45085fd47c46
967 c0d4f83847ca2a873741feb7048a45085fd47c46
968
968
969 request to clone a single revision is respected in sharing mode
969 request to clone a single revision is respected in sharing mode
970
970
971 $ hg --config share.pool=sharerevs clone -r 4a8dc1ab4c13 source1b share-1arev
971 $ hg --config share.pool=sharerevs clone -r 4a8dc1ab4c13 source1b share-1arev
972 (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
972 (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
973 adding changesets
973 adding changesets
974 adding manifests
974 adding manifests
975 adding file changes
975 adding file changes
976 added 2 changesets with 2 changes to 1 files
976 added 2 changesets with 2 changes to 1 files
977 new changesets b5f04eac9d8f:4a8dc1ab4c13
977 new changesets b5f04eac9d8f:4a8dc1ab4c13
978 no changes found
978 no changes found
979 adding remote bookmark head1
979 adding remote bookmark head1
980 updating working directory
980 updating working directory
981 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
981 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
982
982
983 $ hg -R share-1arev log -G
983 $ hg -R share-1arev log -G
984 @ changeset: 1:4a8dc1ab4c13
984 @ changeset: 1:4a8dc1ab4c13
985 | bookmark: head1
985 | bookmark: head1
986 | tag: tip
986 | tag: tip
987 | user: test
987 | user: test
988 | date: Thu Jan 01 00:00:00 1970 +0000
988 | date: Thu Jan 01 00:00:00 1970 +0000
989 | summary: head1
989 | summary: head1
990 |
990 |
991 o changeset: 0:b5f04eac9d8f
991 o changeset: 0:b5f04eac9d8f
992 user: test
992 user: test
993 date: Thu Jan 01 00:00:00 1970 +0000
993 date: Thu Jan 01 00:00:00 1970 +0000
994 summary: initial
994 summary: initial
995
995
996
996
997 making another clone should only pull down requested rev
997 making another clone should only pull down requested rev
998
998
999 $ hg --config share.pool=sharerevs clone -r 99f71071f117 source1b share-1brev
999 $ hg --config share.pool=sharerevs clone -r 99f71071f117 source1b share-1brev
1000 (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
1000 (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
1001 searching for changes
1001 searching for changes
1002 adding changesets
1002 adding changesets
1003 adding manifests
1003 adding manifests
1004 adding file changes
1004 adding file changes
1005 adding remote bookmark head1
1005 adding remote bookmark head1
1006 adding remote bookmark head2
1006 adding remote bookmark head2
1007 added 1 changesets with 1 changes to 1 files (+1 heads)
1007 added 1 changesets with 1 changes to 1 files (+1 heads)
1008 new changesets 99f71071f117
1008 new changesets 99f71071f117
1009 updating working directory
1009 updating working directory
1010 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1010 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1011
1011
1012 $ hg -R share-1brev log -G
1012 $ hg -R share-1brev log -G
1013 @ changeset: 2:99f71071f117
1013 @ changeset: 2:99f71071f117
1014 | bookmark: head2
1014 | bookmark: head2
1015 | tag: tip
1015 | tag: tip
1016 | parent: 0:b5f04eac9d8f
1016 | parent: 0:b5f04eac9d8f
1017 | user: test
1017 | user: test
1018 | date: Thu Jan 01 00:00:00 1970 +0000
1018 | date: Thu Jan 01 00:00:00 1970 +0000
1019 | summary: head2
1019 | summary: head2
1020 |
1020 |
1021 | o changeset: 1:4a8dc1ab4c13
1021 | o changeset: 1:4a8dc1ab4c13
1022 |/ bookmark: head1
1022 |/ bookmark: head1
1023 | user: test
1023 | user: test
1024 | date: Thu Jan 01 00:00:00 1970 +0000
1024 | date: Thu Jan 01 00:00:00 1970 +0000
1025 | summary: head1
1025 | summary: head1
1026 |
1026 |
1027 o changeset: 0:b5f04eac9d8f
1027 o changeset: 0:b5f04eac9d8f
1028 user: test
1028 user: test
1029 date: Thu Jan 01 00:00:00 1970 +0000
1029 date: Thu Jan 01 00:00:00 1970 +0000
1030 summary: initial
1030 summary: initial
1031
1031
1032
1032
1033 Request to clone a single branch is respected in sharing mode
1033 Request to clone a single branch is respected in sharing mode
1034
1034
1035 $ hg --config share.pool=sharebranch clone -b branch1 source1b share-1bbranch1
1035 $ hg --config share.pool=sharebranch clone -b branch1 source1b share-1bbranch1
1036 (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
1036 (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
1037 adding changesets
1037 adding changesets
1038 adding manifests
1038 adding manifests
1039 adding file changes
1039 adding file changes
1040 added 2 changesets with 2 changes to 1 files
1040 added 2 changesets with 2 changes to 1 files
1041 new changesets b5f04eac9d8f:5f92a6c1a1b1
1041 new changesets b5f04eac9d8f:5f92a6c1a1b1
1042 no changes found
1042 no changes found
1043 updating working directory
1043 updating working directory
1044 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1044 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1045
1045
1046 $ hg -R share-1bbranch1 log -G
1046 $ hg -R share-1bbranch1 log -G
1047 o changeset: 1:5f92a6c1a1b1
1047 o changeset: 1:5f92a6c1a1b1
1048 | branch: branch1
1048 | branch: branch1
1049 | tag: tip
1049 | tag: tip
1050 | user: test
1050 | user: test
1051 | date: Thu Jan 01 00:00:00 1970 +0000
1051 | date: Thu Jan 01 00:00:00 1970 +0000
1052 | summary: branch1
1052 | summary: branch1
1053 |
1053 |
1054 @ changeset: 0:b5f04eac9d8f
1054 @ changeset: 0:b5f04eac9d8f
1055 user: test
1055 user: test
1056 date: Thu Jan 01 00:00:00 1970 +0000
1056 date: Thu Jan 01 00:00:00 1970 +0000
1057 summary: initial
1057 summary: initial
1058
1058
1059
1059
1060 $ hg --config share.pool=sharebranch clone -b branch2 source1b share-1bbranch2
1060 $ hg --config share.pool=sharebranch clone -b branch2 source1b share-1bbranch2
1061 (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
1061 (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
1062 searching for changes
1062 searching for changes
1063 adding changesets
1063 adding changesets
1064 adding manifests
1064 adding manifests
1065 adding file changes
1065 adding file changes
1066 added 1 changesets with 1 changes to 1 files (+1 heads)
1066 added 1 changesets with 1 changes to 1 files (+1 heads)
1067 new changesets 6bacf4683960
1067 new changesets 6bacf4683960
1068 updating working directory
1068 updating working directory
1069 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1069 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1070
1070
1071 $ hg -R share-1bbranch2 log -G
1071 $ hg -R share-1bbranch2 log -G
1072 o changeset: 2:6bacf4683960
1072 o changeset: 2:6bacf4683960
1073 | branch: branch2
1073 | branch: branch2
1074 | tag: tip
1074 | tag: tip
1075 | parent: 0:b5f04eac9d8f
1075 | parent: 0:b5f04eac9d8f
1076 | user: test
1076 | user: test
1077 | date: Thu Jan 01 00:00:00 1970 +0000
1077 | date: Thu Jan 01 00:00:00 1970 +0000
1078 | summary: branch2
1078 | summary: branch2
1079 |
1079 |
1080 | o changeset: 1:5f92a6c1a1b1
1080 | o changeset: 1:5f92a6c1a1b1
1081 |/ branch: branch1
1081 |/ branch: branch1
1082 | user: test
1082 | user: test
1083 | date: Thu Jan 01 00:00:00 1970 +0000
1083 | date: Thu Jan 01 00:00:00 1970 +0000
1084 | summary: branch1
1084 | summary: branch1
1085 |
1085 |
1086 @ changeset: 0:b5f04eac9d8f
1086 @ changeset: 0:b5f04eac9d8f
1087 user: test
1087 user: test
1088 date: Thu Jan 01 00:00:00 1970 +0000
1088 date: Thu Jan 01 00:00:00 1970 +0000
1089 summary: initial
1089 summary: initial
1090
1090
1091
1091
1092 -U is respected in share clone mode
1092 -U is respected in share clone mode
1093
1093
1094 $ hg --config share.pool=share clone -U source1a share-1anowc
1094 $ hg --config share.pool=share clone -U source1a share-1anowc
1095 (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
1095 (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
1096 searching for changes
1096 searching for changes
1097 no changes found
1097 no changes found
1098 adding remote bookmark bookA
1098 adding remote bookmark bookA
1099
1099
1100 $ ls -A share-1anowc
1100 $ ls -A share-1anowc
1101 .hg
1101 .hg
1102
1102
1103 Test that auto sharing doesn't cause failure of "hg clone local remote"
1103 Test that auto sharing doesn't cause failure of "hg clone local remote"
1104
1104
1105 $ cd $TESTTMP
1105 $ cd $TESTTMP
1106 $ hg -R a id -r 0
1106 $ hg -R a id -r 0
1107 acb14030fe0a
1107 acb14030fe0a
1108 $ hg id -R remote -r 0
1108 $ hg id -R remote -r 0
1109 abort: repository remote not found
1109 abort: repository remote not found
1110 [255]
1110 [255]
1111 $ hg --config share.pool=share -q clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" a ssh://user@dummy/remote
1111 $ hg --config share.pool=share -q clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" a ssh://user@dummy/remote
1112 $ hg -R remote id -r 0
1112 $ hg -R remote id -r 0
1113 acb14030fe0a
1113 acb14030fe0a
1114
1114
1115 Cloning into pooled storage doesn't race (issue5104)
1115 Cloning into pooled storage doesn't race (issue5104)
1116
1116
1117 $ HGPOSTLOCKDELAY=2.0 hg --config share.pool=racepool --config extensions.lockdelay=$TESTDIR/lockdelay.py clone source1a share-destrace1 > race1.log 2>&1 &
1117 $ HGPOSTLOCKDELAY=2.0 hg --config share.pool=racepool --config extensions.lockdelay=$TESTDIR/lockdelay.py clone source1a share-destrace1 > race1.log 2>&1 &
1118 $ HGPRELOCKDELAY=1.0 hg --config share.pool=racepool --config extensions.lockdelay=$TESTDIR/lockdelay.py clone source1a share-destrace2 > race2.log 2>&1
1118 $ HGPRELOCKDELAY=1.0 hg --config share.pool=racepool --config extensions.lockdelay=$TESTDIR/lockdelay.py clone source1a share-destrace2 > race2.log 2>&1
1119 $ wait
1119 $ wait
1120
1120
1121 $ hg -R share-destrace1 log -r tip
1121 $ hg -R share-destrace1 log -r tip
1122 changeset: 2:e5bfe23c0b47
1122 changeset: 2:e5bfe23c0b47
1123 bookmark: bookA
1123 bookmark: bookA
1124 tag: tip
1124 tag: tip
1125 user: test
1125 user: test
1126 date: Thu Jan 01 00:00:00 1970 +0000
1126 date: Thu Jan 01 00:00:00 1970 +0000
1127 summary: 1a
1127 summary: 1a
1128
1128
1129
1129
1130 $ hg -R share-destrace2 log -r tip
1130 $ hg -R share-destrace2 log -r tip
1131 changeset: 2:e5bfe23c0b47
1131 changeset: 2:e5bfe23c0b47
1132 bookmark: bookA
1132 bookmark: bookA
1133 tag: tip
1133 tag: tip
1134 user: test
1134 user: test
1135 date: Thu Jan 01 00:00:00 1970 +0000
1135 date: Thu Jan 01 00:00:00 1970 +0000
1136 summary: 1a
1136 summary: 1a
1137
1137
1138 One repo should be new, the other should be shared from the pool. We
1138 One repo should be new, the other should be shared from the pool. We
1139 don't care which is which, so we just make sure we always print the
1139 don't care which is which, so we just make sure we always print the
1140 one containing "new pooled" first, then one one containing "existing
1140 one containing "new pooled" first, then one one containing "existing
1141 pooled".
1141 pooled".
1142
1142
1143 $ (grep 'new pooled' race1.log > /dev/null && cat race1.log || cat race2.log) | grep -v lock
1143 $ (grep 'new pooled' race1.log > /dev/null && cat race1.log || cat race2.log) | grep -v lock
1144 (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
1144 (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
1145 requesting all changes
1145 requesting all changes
1146 adding changesets
1146 adding changesets
1147 adding manifests
1147 adding manifests
1148 adding file changes
1148 adding file changes
1149 added 3 changesets with 3 changes to 1 files
1149 added 3 changesets with 3 changes to 1 files
1150 new changesets b5f04eac9d8f:e5bfe23c0b47
1150 new changesets b5f04eac9d8f:e5bfe23c0b47
1151 searching for changes
1151 searching for changes
1152 no changes found
1152 no changes found
1153 adding remote bookmark bookA
1153 adding remote bookmark bookA
1154 updating working directory
1154 updating working directory
1155 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1155 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1156
1156
1157 $ (grep 'existing pooled' race1.log > /dev/null && cat race1.log || cat race2.log) | grep -v lock
1157 $ (grep 'existing pooled' race1.log > /dev/null && cat race1.log || cat race2.log) | grep -v lock
1158 (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
1158 (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
1159 searching for changes
1159 searching for changes
1160 no changes found
1160 no changes found
1161 adding remote bookmark bookA
1161 adding remote bookmark bookA
1162 updating working directory
1162 updating working directory
1163 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1163 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1164
1164
1165 SEC: check for unsafe ssh url
1165 SEC: check for unsafe ssh url
1166
1166
1167 $ cat >> $HGRCPATH << EOF
1167 $ cat >> $HGRCPATH << EOF
1168 > [ui]
1168 > [ui]
1169 > ssh = sh -c "read l; read l; read l"
1169 > ssh = sh -c "read l; read l; read l"
1170 > EOF
1170 > EOF
1171
1171
1172 $ hg clone 'ssh://-oProxyCommand=touch${IFS}owned/path'
1172 $ hg clone 'ssh://-oProxyCommand=touch${IFS}owned/path'
1173 abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path'
1173 abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path'
1174 [255]
1174 [255]
1175 $ hg clone 'ssh://%2DoProxyCommand=touch${IFS}owned/path'
1175 $ hg clone 'ssh://%2DoProxyCommand=touch${IFS}owned/path'
1176 abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path'
1176 abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path'
1177 [255]
1177 [255]
1178 $ hg clone 'ssh://fakehost|touch%20owned/path'
1178 $ hg clone 'ssh://fakehost|touch%20owned/path'
1179 abort: no suitable response from remote hg
1179 abort: no suitable response from remote hg
1180 [255]
1180 [255]
1181 $ hg clone 'ssh://fakehost%7Ctouch%20owned/path'
1181 $ hg clone 'ssh://fakehost%7Ctouch%20owned/path'
1182 abort: no suitable response from remote hg
1182 abort: no suitable response from remote hg
1183 [255]
1183 [255]
1184
1184
1185 $ hg clone 'ssh://-oProxyCommand=touch owned%20foo@example.com/nonexistent/path'
1185 $ hg clone 'ssh://-oProxyCommand=touch owned%20foo@example.com/nonexistent/path'
1186 abort: potentially unsafe url: 'ssh://-oProxyCommand=touch owned foo@example.com/nonexistent/path'
1186 abort: potentially unsafe url: 'ssh://-oProxyCommand=touch owned foo@example.com/nonexistent/path'
1187 [255]
1187 [255]
1188
1188
1189 #if windows
1189 #if windows
1190 $ hg clone "ssh://%26touch%20owned%20/" --debug
1190 $ hg clone "ssh://%26touch%20owned%20/" --debug
1191 running sh -c "read l; read l; read l" "&touch owned " "hg -R . serve --stdio"
1191 running sh -c "read l; read l; read l" "&touch owned " "hg -R . serve --stdio"
1192 sending upgrade request: * proto=exp-ssh-v2-0003 (glob) (sshv2 !)
1192 sending upgrade request: * proto=exp-ssh-v2-0003 (glob) (sshv2 !)
1193 sending hello command
1193 sending hello command
1194 sending between command
1194 sending between command
1195 abort: no suitable response from remote hg
1195 abort: no suitable response from remote hg
1196 [255]
1196 [255]
1197 $ hg clone "ssh://example.com:%26touch%20owned%20/" --debug
1197 $ hg clone "ssh://example.com:%26touch%20owned%20/" --debug
1198 running sh -c "read l; read l; read l" -p "&touch owned " example.com "hg -R . serve --stdio"
1198 running sh -c "read l; read l; read l" -p "&touch owned " example.com "hg -R . serve --stdio"
1199 sending upgrade request: * proto=exp-ssh-v2-0003 (glob) (sshv2 !)
1199 sending upgrade request: * proto=exp-ssh-v2-0003 (glob) (sshv2 !)
1200 sending hello command
1200 sending hello command
1201 sending between command
1201 sending between command
1202 abort: no suitable response from remote hg
1202 abort: no suitable response from remote hg
1203 [255]
1203 [255]
1204 #else
1204 #else
1205 $ hg clone "ssh://%3btouch%20owned%20/" --debug
1205 $ hg clone "ssh://%3btouch%20owned%20/" --debug
1206 running sh -c "read l; read l; read l" ';touch owned ' 'hg -R . serve --stdio'
1206 running sh -c "read l; read l; read l" ';touch owned ' 'hg -R . serve --stdio'
1207 sending upgrade request: * proto=exp-ssh-v2-0003 (glob) (sshv2 !)
1207 sending upgrade request: * proto=exp-ssh-v2-0003 (glob) (sshv2 !)
1208 sending hello command
1208 sending hello command
1209 sending between command
1209 sending between command
1210 abort: no suitable response from remote hg
1210 abort: no suitable response from remote hg
1211 [255]
1211 [255]
1212 $ hg clone "ssh://example.com:%3btouch%20owned%20/" --debug
1212 $ hg clone "ssh://example.com:%3btouch%20owned%20/" --debug
1213 running sh -c "read l; read l; read l" -p ';touch owned ' example.com 'hg -R . serve --stdio'
1213 running sh -c "read l; read l; read l" -p ';touch owned ' example.com 'hg -R . serve --stdio'
1214 sending upgrade request: * proto=exp-ssh-v2-0003 (glob) (sshv2 !)
1214 sending upgrade request: * proto=exp-ssh-v2-0003 (glob) (sshv2 !)
1215 sending hello command
1215 sending hello command
1216 sending between command
1216 sending between command
1217 abort: no suitable response from remote hg
1217 abort: no suitable response from remote hg
1218 [255]
1218 [255]
1219 #endif
1219 #endif
1220
1220
1221 $ hg clone "ssh://v-alid.example.com/" --debug
1221 $ hg clone "ssh://v-alid.example.com/" --debug
1222 running sh -c "read l; read l; read l" v-alid\.example\.com ['"]hg -R \. serve --stdio['"] (re)
1222 running sh -c "read l; read l; read l" v-alid\.example\.com ['"]hg -R \. serve --stdio['"] (re)
1223 sending upgrade request: * proto=exp-ssh-v2-0003 (glob) (sshv2 !)
1223 sending upgrade request: * proto=exp-ssh-v2-0003 (glob) (sshv2 !)
1224 sending hello command
1224 sending hello command
1225 sending between command
1225 sending between command
1226 abort: no suitable response from remote hg
1226 abort: no suitable response from remote hg
1227 [255]
1227 [255]
1228
1228
1229 We should not have created a file named owned - if it exists, the
1229 We should not have created a file named owned - if it exists, the
1230 attack succeeded.
1230 attack succeeded.
1231 $ if test -f owned; then echo 'you got owned'; fi
1231 $ if test -f owned; then echo 'you got owned'; fi
1232
1232
1233 Cloning without fsmonitor enabled does not print a warning for small repos
1233 Cloning without fsmonitor enabled does not print a warning for small repos
1234
1234
1235 $ hg clone a fsmonitor-default
1235 $ hg clone a fsmonitor-default
1236 updating to bookmark @ on branch stable
1236 updating to bookmark @ on branch stable
1237 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
1237 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
1238
1238
1239 Lower the warning threshold to simulate a large repo
1239 Lower the warning threshold to simulate a large repo
1240
1240
1241 $ cat >> $HGRCPATH << EOF
1241 $ cat >> $HGRCPATH << EOF
1242 > [fsmonitor]
1242 > [fsmonitor]
1243 > warn_update_file_count = 2
1243 > warn_update_file_count = 2
1244 > warn_update_file_count_rust = 2
1244 > warn_update_file_count_rust = 2
1245 > EOF
1245 > EOF
1246
1246
1247 We should see a warning about no fsmonitor on supported platforms
1247 We should see a warning about no fsmonitor on supported platforms
1248
1248
1249 #if linuxormacos no-fsmonitor
1249 #if linuxormacos no-fsmonitor
1250 $ hg clone a nofsmonitor
1250 $ hg clone a nofsmonitor
1251 updating to bookmark @ on branch stable
1251 updating to bookmark @ on branch stable
1252 (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor")
1252 (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor")
1253 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
1253 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
1254 #else
1254 #else
1255 $ hg clone a nofsmonitor
1255 $ hg clone a nofsmonitor
1256 updating to bookmark @ on branch stable
1256 updating to bookmark @ on branch stable
1257 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
1257 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
1258 #endif
1258 #endif
1259
1259
1260 We should not see warning about fsmonitor when it is enabled
1260 We should not see warning about fsmonitor when it is enabled
1261
1261
1262 #if fsmonitor
1262 #if fsmonitor
1263 $ hg clone a fsmonitor-enabled
1263 $ hg clone a fsmonitor-enabled
1264 updating to bookmark @ on branch stable
1264 updating to bookmark @ on branch stable
1265 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
1265 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
1266 #endif
1266 #endif
1267
1267
1268 We can disable the fsmonitor warning
1268 We can disable the fsmonitor warning
1269
1269
1270 $ hg --config fsmonitor.warn_when_unused=false clone a fsmonitor-disable-warning
1270 $ hg --config fsmonitor.warn_when_unused=false clone a fsmonitor-disable-warning
1271 updating to bookmark @ on branch stable
1271 updating to bookmark @ on branch stable
1272 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
1272 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
1273
1273
1274 Loaded fsmonitor but disabled in config should still print warning
1274 Loaded fsmonitor but disabled in config should still print warning
1275
1275
1276 #if linuxormacos fsmonitor
1276 #if linuxormacos fsmonitor
1277 $ hg --config fsmonitor.mode=off clone a fsmonitor-mode-off
1277 $ hg --config fsmonitor.mode=off clone a fsmonitor-mode-off
1278 updating to bookmark @ on branch stable
1278 updating to bookmark @ on branch stable
1279 (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor") (fsmonitor !)
1279 (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor") (fsmonitor !)
1280 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
1280 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
1281 #endif
1281 #endif
1282
1282
1283 Warning not printed if working directory isn't empty
1283 Warning not printed if working directory isn't empty
1284
1284
1285 $ hg -q clone a fsmonitor-update
1285 $ hg -q clone a fsmonitor-update
1286 (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor") (?)
1286 (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor") (?)
1287 $ cd fsmonitor-update
1287 $ cd fsmonitor-update
1288 $ hg up acb14030fe0a
1288 $ hg up acb14030fe0a
1289 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
1289 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
1290 (leaving bookmark @)
1290 (leaving bookmark @)
1291 $ hg up cf0fe1914066
1291 $ hg up cf0fe1914066
1292 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1292 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1293
1293
1294 `hg update` from null revision also prints
1294 `hg update` from null revision also prints
1295
1295
1296 $ hg up null
1296 $ hg up null
1297 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1297 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1298
1298
1299 #if linuxormacos no-fsmonitor
1299 #if linuxormacos no-fsmonitor
1300 $ hg up cf0fe1914066
1300 $ hg up cf0fe1914066
1301 (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor")
1301 (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor")
1302 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1302 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1303 #else
1303 #else
1304 $ hg up cf0fe1914066
1304 $ hg up cf0fe1914066
1305 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1305 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1306 #endif
1306 #endif
1307
1307
1308 $ cd ..
1308 $ cd ..
1309
1309
@@ -1,1048 +1,1048 b''
1 #testcases obsstore-on obsstore-off
1 #testcases obsstore-on obsstore-off
2
2
3 $ cat > $TESTTMP/editor.py <<EOF
3 $ cat > $TESTTMP/editor.py <<EOF
4 > #!"$PYTHON"
4 > #!"$PYTHON"
5 > import os
5 > import os
6 > import sys
6 > import sys
7 > path = os.path.join(os.environ['TESTTMP'], 'messages')
7 > path = os.path.join(os.environ['TESTTMP'], 'messages')
8 > messages = open(path).read().split('--\n')
8 > messages = open(path).read().split('--\n')
9 > prompt = open(sys.argv[1]).read()
9 > prompt = open(sys.argv[1]).read()
10 > sys.stdout.write(''.join('EDITOR: %s' % l for l in prompt.splitlines(True)))
10 > sys.stdout.write(''.join('EDITOR: %s' % l for l in prompt.splitlines(True)))
11 > sys.stdout.flush()
11 > sys.stdout.flush()
12 > with open(sys.argv[1], 'w') as f:
12 > with open(sys.argv[1], 'w') as f:
13 > f.write(messages[0])
13 > f.write(messages[0])
14 > with open(path, 'w') as f:
14 > with open(path, 'w') as f:
15 > f.write('--\n'.join(messages[1:]))
15 > f.write('--\n'.join(messages[1:]))
16 > EOF
16 > EOF
17
17
18 $ cat >> $HGRCPATH <<EOF
18 $ cat >> $HGRCPATH <<EOF
19 > [extensions]
19 > [extensions]
20 > drawdag=$TESTDIR/drawdag.py
20 > drawdag=$TESTDIR/drawdag.py
21 > split=
21 > split=
22 > [ui]
22 > [ui]
23 > interactive=1
23 > interactive=1
24 > color=no
24 > color=no
25 > paginate=never
25 > paginate=never
26 > [diff]
26 > [diff]
27 > git=1
27 > git=1
28 > unified=0
28 > unified=0
29 > [commands]
29 > [commands]
30 > commit.interactive.unified=0
30 > commit.interactive.unified=0
31 > [alias]
31 > [alias]
32 > glog=log -G -T '{rev}:{node|short} {desc} {bookmarks}\n'
32 > glog=log -G -T '{rev}:{node|short} {desc} {bookmarks}\n'
33 > EOF
33 > EOF
34
34
35 #if obsstore-on
35 #if obsstore-on
36 $ cat >> $HGRCPATH <<EOF
36 $ cat >> $HGRCPATH <<EOF
37 > [experimental]
37 > [experimental]
38 > evolution=all
38 > evolution=all
39 > EOF
39 > EOF
40 #endif
40 #endif
41
41
42 $ hg init a
42 $ hg init a
43 $ cd a
43 $ cd a
44
44
45 Nothing to split
45 Nothing to split
46
46
47 $ hg split
47 $ hg split
48 nothing to split
48 nothing to split
49 [1]
49 [1]
50
50
51 $ hg commit -m empty --config ui.allowemptycommit=1
51 $ hg commit -m empty --config ui.allowemptycommit=1
52 $ hg split
52 $ hg split
53 abort: cannot split an empty revision
53 abort: cannot split an empty revision
54 [10]
54 [10]
55
55
56 $ rm -rf .hg
56 $ rm -rf .hg
57 $ hg init
57 $ hg init
58
58
59 Cannot split working directory
59 Cannot split working directory
60
60
61 $ hg split -r 'wdir()'
61 $ hg split -r 'wdir()'
62 abort: cannot split working directory
62 abort: cannot split working directory
63 [10]
63 [10]
64
64
65 Generate some content. The sed filter drop CR on Windows, which is dropped in
65 Generate some content. The sed filter drop CR on Windows, which is dropped in
66 the a > b line.
66 the a > b line.
67
67
68 $ $TESTDIR/seq.py 1 5 | sed 's/\r$//' >> a
68 $ $TESTDIR/seq.py 1 5 | sed 's/\r$//' >> a
69 $ hg ci -m a1 -A a -q
69 $ hg ci -m a1 -A a -q
70 $ hg bookmark -i r1
70 $ hg bookmark -i r1
71 $ sed 's/1/11/;s/3/33/;s/5/55/' a > b
71 $ sed 's/1/11/;s/3/33/;s/5/55/' a > b
72 $ mv b a
72 $ mv b a
73 $ hg ci -m a2 -q
73 $ hg ci -m a2 -q
74 $ hg bookmark -i r2
74 $ hg bookmark -i r2
75
75
76 Cannot split a public changeset
76 Cannot split a public changeset
77
77
78 $ hg phase --public -r 'all()'
78 $ hg phase --public -r 'all()'
79 $ hg split .
79 $ hg split .
80 abort: cannot split public changesets
80 abort: cannot split public changesets
81 (see 'hg help phases' for details)
81 (see 'hg help phases' for details)
82 [10]
82 [10]
83
83
84 $ hg phase --draft -f -r 'all()'
84 $ hg phase --draft -f -r 'all()'
85
85
86 Cannot split while working directory is dirty
86 Cannot split while working directory is dirty
87
87
88 $ touch dirty
88 $ touch dirty
89 $ hg add dirty
89 $ hg add dirty
90 $ hg split .
90 $ hg split .
91 abort: uncommitted changes
91 abort: uncommitted changes
92 [20]
92 [20]
93 $ hg forget dirty
93 $ hg forget dirty
94 $ rm dirty
94 $ rm dirty
95
95
96 Make a clean directory for future tests to build off of
96 Make a clean directory for future tests to build off of
97
97
98 $ cp -R . ../clean
98 $ cp -R . ../clean
99
99
100 Split a head
100 Split a head
101
101
102 $ hg bookmark r3
102 $ hg bookmark r3
103
103
104 $ hg split 'all()'
104 $ hg split 'all()'
105 abort: cannot split multiple revisions
105 abort: cannot split multiple revisions
106 [10]
106 [10]
107
107
108 This function splits a bit strangely primarily to avoid changing the behavior of
108 This function splits a bit strangely primarily to avoid changing the behavior of
109 the test after a bug was fixed with how split/commit --interactive handled
109 the test after a bug was fixed with how split/commit --interactive handled
110 `commands.commit.interactive.unified=0`: when there were no context lines,
110 `commands.commit.interactive.unified=0`: when there were no context lines,
111 it kept only the last diff hunk. When running split, this meant that runsplit
111 it kept only the last diff hunk. When running split, this meant that runsplit
112 was always recording three commits, one for each diff hunk, in reverse order
112 was always recording three commits, one for each diff hunk, in reverse order
113 (the base commit was the last diff hunk in the file).
113 (the base commit was the last diff hunk in the file).
114 $ runsplit() {
114 $ runsplit() {
115 > cat > $TESTTMP/messages <<EOF
115 > cat > $TESTTMP/messages <<EOF
116 > split 1
116 > split 1
117 > --
117 > --
118 > split 2
118 > split 2
119 > --
119 > --
120 > split 3
120 > split 3
121 > EOF
121 > EOF
122 > cat <<EOF | hg split "$@"
122 > cat <<EOF | hg split "$@"
123 > y
123 > y
124 > n
124 > n
125 > n
125 > n
126 > y
126 > y
127 > y
127 > y
128 > n
128 > n
129 > y
129 > y
130 > y
130 > y
131 > y
131 > y
132 > EOF
132 > EOF
133 > }
133 > }
134
134
135 $ HGEDITOR=false runsplit
135 $ HGEDITOR=false runsplit
136 diff --git a/a b/a
136 diff --git a/a b/a
137 3 hunks, 3 lines changed
137 3 hunks, 3 lines changed
138 examine changes to 'a'?
138 examine changes to 'a'?
139 (enter ? for help) [Ynesfdaq?] y
139 (enter ? for help) [Ynesfdaq?] y
140
140
141 @@ -1,1 +1,1 @@
141 @@ -1,1 +1,1 @@
142 -1
142 -1
143 +11
143 +11
144 record change 1/3 to 'a'?
144 record change 1/3 to 'a'?
145 (enter ? for help) [Ynesfdaq?] n
145 (enter ? for help) [Ynesfdaq?] n
146
146
147 @@ -3,1 +3,1 @@ 2
147 @@ -3,1 +3,1 @@ 2
148 -3
148 -3
149 +33
149 +33
150 record change 2/3 to 'a'?
150 record change 2/3 to 'a'?
151 (enter ? for help) [Ynesfdaq?] n
151 (enter ? for help) [Ynesfdaq?] n
152
152
153 @@ -5,1 +5,1 @@ 4
153 @@ -5,1 +5,1 @@ 4
154 -5
154 -5
155 +55
155 +55
156 record change 3/3 to 'a'?
156 record change 3/3 to 'a'?
157 (enter ? for help) [Ynesfdaq?] y
157 (enter ? for help) [Ynesfdaq?] y
158
158
159 transaction abort!
159 transaction abort!
160 rollback completed
160 rollback completed
161 abort: edit failed: false exited with status 1
161 abort: edit failed: false exited with status 1
162 [250]
162 [250]
163 $ hg status
163 $ hg status
164
164
165 $ HGEDITOR="\"$PYTHON\" $TESTTMP/editor.py"
165 $ HGEDITOR="\"$PYTHON\" $TESTTMP/editor.py"
166 $ runsplit
166 $ runsplit
167 diff --git a/a b/a
167 diff --git a/a b/a
168 3 hunks, 3 lines changed
168 3 hunks, 3 lines changed
169 examine changes to 'a'?
169 examine changes to 'a'?
170 (enter ? for help) [Ynesfdaq?] y
170 (enter ? for help) [Ynesfdaq?] y
171
171
172 @@ -1,1 +1,1 @@
172 @@ -1,1 +1,1 @@
173 -1
173 -1
174 +11
174 +11
175 record change 1/3 to 'a'?
175 record change 1/3 to 'a'?
176 (enter ? for help) [Ynesfdaq?] n
176 (enter ? for help) [Ynesfdaq?] n
177
177
178 @@ -3,1 +3,1 @@ 2
178 @@ -3,1 +3,1 @@ 2
179 -3
179 -3
180 +33
180 +33
181 record change 2/3 to 'a'?
181 record change 2/3 to 'a'?
182 (enter ? for help) [Ynesfdaq?] n
182 (enter ? for help) [Ynesfdaq?] n
183
183
184 @@ -5,1 +5,1 @@ 4
184 @@ -5,1 +5,1 @@ 4
185 -5
185 -5
186 +55
186 +55
187 record change 3/3 to 'a'?
187 record change 3/3 to 'a'?
188 (enter ? for help) [Ynesfdaq?] y
188 (enter ? for help) [Ynesfdaq?] y
189
189
190 EDITOR: HG: Splitting 1df0d5c5a3ab. Write commit message for the first split changeset.
190 EDITOR: HG: Splitting 1df0d5c5a3ab. Write commit message for the first split changeset.
191 EDITOR: a2
191 EDITOR: a2
192 EDITOR:
192 EDITOR:
193 EDITOR:
193 EDITOR:
194 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
194 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
195 EDITOR: HG: Leave message empty to abort commit.
195 EDITOR: HG: Leave message empty to abort commit.
196 EDITOR: HG: --
196 EDITOR: HG: --
197 EDITOR: HG: user: test
197 EDITOR: HG: user: test
198 EDITOR: HG: branch 'default'
198 EDITOR: HG: branch 'default'
199 EDITOR: HG: changed a
199 EDITOR: HG: changed a
200 created new head
200 created new head
201 diff --git a/a b/a
201 diff --git a/a b/a
202 2 hunks, 2 lines changed
202 2 hunks, 2 lines changed
203 examine changes to 'a'?
203 examine changes to 'a'?
204 (enter ? for help) [Ynesfdaq?] y
204 (enter ? for help) [Ynesfdaq?] y
205
205
206 @@ -1,1 +1,1 @@
206 @@ -1,1 +1,1 @@
207 -1
207 -1
208 +11
208 +11
209 record change 1/2 to 'a'?
209 record change 1/2 to 'a'?
210 (enter ? for help) [Ynesfdaq?] n
210 (enter ? for help) [Ynesfdaq?] n
211
211
212 @@ -3,1 +3,1 @@ 2
212 @@ -3,1 +3,1 @@ 2
213 -3
213 -3
214 +33
214 +33
215 record change 2/2 to 'a'?
215 record change 2/2 to 'a'?
216 (enter ? for help) [Ynesfdaq?] y
216 (enter ? for help) [Ynesfdaq?] y
217
217
218 EDITOR: HG: Splitting 1df0d5c5a3ab. So far it has been split into:
218 EDITOR: HG: Splitting 1df0d5c5a3ab. So far it has been split into:
219 EDITOR: HG: - 2:e704349bd21b tip "split 1"
219 EDITOR: HG: - 2:e704349bd21b tip "split 1"
220 EDITOR: HG: Write commit message for the next split changeset.
220 EDITOR: HG: Write commit message for the next split changeset.
221 EDITOR: a2
221 EDITOR: a2
222 EDITOR:
222 EDITOR:
223 EDITOR:
223 EDITOR:
224 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
224 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
225 EDITOR: HG: Leave message empty to abort commit.
225 EDITOR: HG: Leave message empty to abort commit.
226 EDITOR: HG: --
226 EDITOR: HG: --
227 EDITOR: HG: user: test
227 EDITOR: HG: user: test
228 EDITOR: HG: branch 'default'
228 EDITOR: HG: branch 'default'
229 EDITOR: HG: changed a
229 EDITOR: HG: changed a
230 diff --git a/a b/a
230 diff --git a/a b/a
231 1 hunks, 1 lines changed
231 1 hunks, 1 lines changed
232 examine changes to 'a'?
232 examine changes to 'a'?
233 (enter ? for help) [Ynesfdaq?] y
233 (enter ? for help) [Ynesfdaq?] y
234
234
235 @@ -1,1 +1,1 @@
235 @@ -1,1 +1,1 @@
236 -1
236 -1
237 +11
237 +11
238 record this change to 'a'?
238 record this change to 'a'?
239 (enter ? for help) [Ynesfdaq?] y
239 (enter ? for help) [Ynesfdaq?] y
240
240
241 EDITOR: HG: Splitting 1df0d5c5a3ab. So far it has been split into:
241 EDITOR: HG: Splitting 1df0d5c5a3ab. So far it has been split into:
242 EDITOR: HG: - 2:e704349bd21b tip "split 1"
242 EDITOR: HG: - 2:e704349bd21b tip "split 1"
243 EDITOR: HG: - 3:a09ad58faae3 "split 2"
243 EDITOR: HG: - 3:a09ad58faae3 "split 2"
244 EDITOR: HG: Write commit message for the next split changeset.
244 EDITOR: HG: Write commit message for the next split changeset.
245 EDITOR: a2
245 EDITOR: a2
246 EDITOR:
246 EDITOR:
247 EDITOR:
247 EDITOR:
248 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
248 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
249 EDITOR: HG: Leave message empty to abort commit.
249 EDITOR: HG: Leave message empty to abort commit.
250 EDITOR: HG: --
250 EDITOR: HG: --
251 EDITOR: HG: user: test
251 EDITOR: HG: user: test
252 EDITOR: HG: branch 'default'
252 EDITOR: HG: branch 'default'
253 EDITOR: HG: changed a
253 EDITOR: HG: changed a
254 saved backup bundle to $TESTTMP/a/.hg/strip-backup/1df0d5c5a3ab-8341b760-split.hg (obsstore-off !)
254 saved backup bundle to $TESTTMP/a/.hg/strip-backup/1df0d5c5a3ab-8341b760-split.hg (obsstore-off !)
255
255
256 #if obsstore-off
256 #if obsstore-off
257 $ hg bookmark
257 $ hg bookmark
258 r1 0:a61bcde8c529
258 r1 0:a61bcde8c529
259 r2 3:00eebaf8d2e2
259 r2 3:00eebaf8d2e2
260 * r3 3:00eebaf8d2e2
260 * r3 3:00eebaf8d2e2
261 $ hg glog -p
261 $ hg glog -p
262 @ 3:00eebaf8d2e2 split 3 r2 r3
262 @ 3:00eebaf8d2e2 split 3 r2 r3
263 | diff --git a/a b/a
263 | diff --git a/a b/a
264 | --- a/a
264 | --- a/a
265 | +++ b/a
265 | +++ b/a
266 | @@ -1,1 +1,1 @@
266 | @@ -1,1 +1,1 @@
267 | -1
267 | -1
268 | +11
268 | +11
269 |
269 |
270 o 2:a09ad58faae3 split 2
270 o 2:a09ad58faae3 split 2
271 | diff --git a/a b/a
271 | diff --git a/a b/a
272 | --- a/a
272 | --- a/a
273 | +++ b/a
273 | +++ b/a
274 | @@ -3,1 +3,1 @@
274 | @@ -3,1 +3,1 @@
275 | -3
275 | -3
276 | +33
276 | +33
277 |
277 |
278 o 1:e704349bd21b split 1
278 o 1:e704349bd21b split 1
279 | diff --git a/a b/a
279 | diff --git a/a b/a
280 | --- a/a
280 | --- a/a
281 | +++ b/a
281 | +++ b/a
282 | @@ -5,1 +5,1 @@
282 | @@ -5,1 +5,1 @@
283 | -5
283 | -5
284 | +55
284 | +55
285 |
285 |
286 o 0:a61bcde8c529 a1 r1
286 o 0:a61bcde8c529 a1 r1
287 diff --git a/a b/a
287 diff --git a/a b/a
288 new file mode 100644
288 new file mode 100644
289 --- /dev/null
289 --- /dev/null
290 +++ b/a
290 +++ b/a
291 @@ -0,0 +1,5 @@
291 @@ -0,0 +1,5 @@
292 +1
292 +1
293 +2
293 +2
294 +3
294 +3
295 +4
295 +4
296 +5
296 +5
297
297
298 #else
298 #else
299 $ hg bookmark
299 $ hg bookmark
300 r1 0:a61bcde8c529
300 r1 0:a61bcde8c529
301 r2 4:00eebaf8d2e2
301 r2 4:00eebaf8d2e2
302 * r3 4:00eebaf8d2e2
302 * r3 4:00eebaf8d2e2
303 $ hg glog
303 $ hg glog
304 @ 4:00eebaf8d2e2 split 3 r2 r3
304 @ 4:00eebaf8d2e2 split 3 r2 r3
305 |
305 |
306 o 3:a09ad58faae3 split 2
306 o 3:a09ad58faae3 split 2
307 |
307 |
308 o 2:e704349bd21b split 1
308 o 2:e704349bd21b split 1
309 |
309 |
310 o 0:a61bcde8c529 a1 r1
310 o 0:a61bcde8c529 a1 r1
311
311
312 #endif
312 #endif
313
313
314 Split a head while working parent is not that head
314 Split a head while working parent is not that head
315
315
316 $ cp -R $TESTTMP/clean $TESTTMP/b
316 $ cp -R $TESTTMP/clean $TESTTMP/b
317 $ cd $TESTTMP/b
317 $ cd $TESTTMP/b
318
318
319 $ hg up 0 -q
319 $ hg up 0 -q
320 $ hg bookmark r3
320 $ hg bookmark r3
321
321
322 $ runsplit tip >/dev/null
322 $ runsplit tip >/dev/null
323
323
324 #if obsstore-off
324 #if obsstore-off
325 $ hg bookmark
325 $ hg bookmark
326 r1 0:a61bcde8c529
326 r1 0:a61bcde8c529
327 r2 3:00eebaf8d2e2
327 r2 3:00eebaf8d2e2
328 * r3 0:a61bcde8c529
328 * r3 0:a61bcde8c529
329 $ hg glog
329 $ hg glog
330 o 3:00eebaf8d2e2 split 3 r2
330 o 3:00eebaf8d2e2 split 3 r2
331 |
331 |
332 o 2:a09ad58faae3 split 2
332 o 2:a09ad58faae3 split 2
333 |
333 |
334 o 1:e704349bd21b split 1
334 o 1:e704349bd21b split 1
335 |
335 |
336 @ 0:a61bcde8c529 a1 r1 r3
336 @ 0:a61bcde8c529 a1 r1 r3
337
337
338 #else
338 #else
339 $ hg bookmark
339 $ hg bookmark
340 r1 0:a61bcde8c529
340 r1 0:a61bcde8c529
341 r2 4:00eebaf8d2e2
341 r2 4:00eebaf8d2e2
342 * r3 0:a61bcde8c529
342 * r3 0:a61bcde8c529
343 $ hg glog
343 $ hg glog
344 o 4:00eebaf8d2e2 split 3 r2
344 o 4:00eebaf8d2e2 split 3 r2
345 |
345 |
346 o 3:a09ad58faae3 split 2
346 o 3:a09ad58faae3 split 2
347 |
347 |
348 o 2:e704349bd21b split 1
348 o 2:e704349bd21b split 1
349 |
349 |
350 @ 0:a61bcde8c529 a1 r1 r3
350 @ 0:a61bcde8c529 a1 r1 r3
351
351
352 #endif
352 #endif
353
353
354 Split a non-head
354 Split a non-head
355
355
356 $ cp -R $TESTTMP/clean $TESTTMP/c
356 $ cp -R $TESTTMP/clean $TESTTMP/c
357 $ cd $TESTTMP/c
357 $ cd $TESTTMP/c
358 $ echo d > d
358 $ echo d > d
359 $ hg ci -m d1 -A d
359 $ hg ci -m d1 -A d
360 $ hg bookmark -i d1
360 $ hg bookmark -i d1
361 $ echo 2 >> d
361 $ echo 2 >> d
362 $ hg ci -m d2
362 $ hg ci -m d2
363 $ echo 3 >> d
363 $ echo 3 >> d
364 $ hg ci -m d3
364 $ hg ci -m d3
365 $ hg bookmark -i d3
365 $ hg bookmark -i d3
366 $ hg up '.^' -q
366 $ hg up '.^' -q
367 $ hg bookmark d2
367 $ hg bookmark d2
368 $ cp -R . ../d
368 $ cp -R . ../d
369
369
370 $ runsplit -r 1 | grep rebasing
370 $ runsplit -r 1 | grep rebasing
371 rebasing 2:b5c5ea414030 d1 "d1"
371 rebasing 2:b5c5ea414030 d1 "d1"
372 rebasing 3:f4a0a8d004cc d2 "d2"
372 rebasing 3:f4a0a8d004cc d2 "d2"
373 rebasing 4:777940761eba d3 "d3"
373 rebasing 4:777940761eba d3 "d3"
374 #if obsstore-off
374 #if obsstore-off
375 $ hg bookmark
375 $ hg bookmark
376 d1 4:c4b449ef030e
376 d1 4:c4b449ef030e
377 * d2 5:c9dd00ab36a3
377 * d2 5:c9dd00ab36a3
378 d3 6:19f476bc865c
378 d3 6:19f476bc865c
379 r1 0:a61bcde8c529
379 r1 0:a61bcde8c529
380 r2 3:00eebaf8d2e2
380 r2 3:00eebaf8d2e2
381 $ hg glog -p
381 $ hg glog -p
382 o 6:19f476bc865c d3 d3
382 o 6:19f476bc865c d3 d3
383 | diff --git a/d b/d
383 | diff --git a/d b/d
384 | --- a/d
384 | --- a/d
385 | +++ b/d
385 | +++ b/d
386 | @@ -2,0 +3,1 @@
386 | @@ -2,0 +3,1 @@
387 | +3
387 | +3
388 |
388 |
389 @ 5:c9dd00ab36a3 d2 d2
389 @ 5:c9dd00ab36a3 d2 d2
390 | diff --git a/d b/d
390 | diff --git a/d b/d
391 | --- a/d
391 | --- a/d
392 | +++ b/d
392 | +++ b/d
393 | @@ -1,0 +2,1 @@
393 | @@ -1,0 +2,1 @@
394 | +2
394 | +2
395 |
395 |
396 o 4:c4b449ef030e d1 d1
396 o 4:c4b449ef030e d1 d1
397 | diff --git a/d b/d
397 | diff --git a/d b/d
398 | new file mode 100644
398 | new file mode 100644
399 | --- /dev/null
399 | --- /dev/null
400 | +++ b/d
400 | +++ b/d
401 | @@ -0,0 +1,1 @@
401 | @@ -0,0 +1,1 @@
402 | +d
402 | +d
403 |
403 |
404 o 3:00eebaf8d2e2 split 3 r2
404 o 3:00eebaf8d2e2 split 3 r2
405 | diff --git a/a b/a
405 | diff --git a/a b/a
406 | --- a/a
406 | --- a/a
407 | +++ b/a
407 | +++ b/a
408 | @@ -1,1 +1,1 @@
408 | @@ -1,1 +1,1 @@
409 | -1
409 | -1
410 | +11
410 | +11
411 |
411 |
412 o 2:a09ad58faae3 split 2
412 o 2:a09ad58faae3 split 2
413 | diff --git a/a b/a
413 | diff --git a/a b/a
414 | --- a/a
414 | --- a/a
415 | +++ b/a
415 | +++ b/a
416 | @@ -3,1 +3,1 @@
416 | @@ -3,1 +3,1 @@
417 | -3
417 | -3
418 | +33
418 | +33
419 |
419 |
420 o 1:e704349bd21b split 1
420 o 1:e704349bd21b split 1
421 | diff --git a/a b/a
421 | diff --git a/a b/a
422 | --- a/a
422 | --- a/a
423 | +++ b/a
423 | +++ b/a
424 | @@ -5,1 +5,1 @@
424 | @@ -5,1 +5,1 @@
425 | -5
425 | -5
426 | +55
426 | +55
427 |
427 |
428 o 0:a61bcde8c529 a1 r1
428 o 0:a61bcde8c529 a1 r1
429 diff --git a/a b/a
429 diff --git a/a b/a
430 new file mode 100644
430 new file mode 100644
431 --- /dev/null
431 --- /dev/null
432 +++ b/a
432 +++ b/a
433 @@ -0,0 +1,5 @@
433 @@ -0,0 +1,5 @@
434 +1
434 +1
435 +2
435 +2
436 +3
436 +3
437 +4
437 +4
438 +5
438 +5
439
439
440 #else
440 #else
441 $ hg bookmark
441 $ hg bookmark
442 d1 8:c4b449ef030e
442 d1 8:c4b449ef030e
443 * d2 9:c9dd00ab36a3
443 * d2 9:c9dd00ab36a3
444 d3 10:19f476bc865c
444 d3 10:19f476bc865c
445 r1 0:a61bcde8c529
445 r1 0:a61bcde8c529
446 r2 7:00eebaf8d2e2
446 r2 7:00eebaf8d2e2
447 $ hg glog
447 $ hg glog
448 o 10:19f476bc865c d3 d3
448 o 10:19f476bc865c d3 d3
449 |
449 |
450 @ 9:c9dd00ab36a3 d2 d2
450 @ 9:c9dd00ab36a3 d2 d2
451 |
451 |
452 o 8:c4b449ef030e d1 d1
452 o 8:c4b449ef030e d1 d1
453 |
453 |
454 o 7:00eebaf8d2e2 split 3 r2
454 o 7:00eebaf8d2e2 split 3 r2
455 |
455 |
456 o 6:a09ad58faae3 split 2
456 o 6:a09ad58faae3 split 2
457 |
457 |
458 o 5:e704349bd21b split 1
458 o 5:e704349bd21b split 1
459 |
459 |
460 o 0:a61bcde8c529 a1 r1
460 o 0:a61bcde8c529 a1 r1
461
461
462 #endif
462 #endif
463
463
464 Split a non-head without rebase
464 Split a non-head without rebase
465
465
466 $ cd $TESTTMP/d
466 $ cd $TESTTMP/d
467 #if obsstore-off
467 #if obsstore-off
468 $ runsplit -r 1 --no-rebase
468 $ runsplit -r 1 --no-rebase
469 abort: cannot split changeset with children
469 abort: cannot split changeset with children
470 [10]
470 [10]
471 #else
471 #else
472 $ runsplit -r 1 --no-rebase >/dev/null
472 $ runsplit -r 1 --no-rebase >/dev/null
473 3 new orphan changesets
473 3 new orphan changesets
474 $ hg bookmark
474 $ hg bookmark
475 d1 2:b5c5ea414030
475 d1 2:b5c5ea414030
476 * d2 3:f4a0a8d004cc
476 * d2 3:f4a0a8d004cc
477 d3 4:777940761eba
477 d3 4:777940761eba
478 r1 0:a61bcde8c529
478 r1 0:a61bcde8c529
479 r2 7:00eebaf8d2e2
479 r2 7:00eebaf8d2e2
480
480
481 $ hg glog
481 $ hg glog
482 o 7:00eebaf8d2e2 split 3 r2
482 o 7:00eebaf8d2e2 split 3 r2
483 |
483 |
484 o 6:a09ad58faae3 split 2
484 o 6:a09ad58faae3 split 2
485 |
485 |
486 o 5:e704349bd21b split 1
486 o 5:e704349bd21b split 1
487 |
487 |
488 | * 4:777940761eba d3 d3
488 | * 4:777940761eba d3 d3
489 | |
489 | |
490 | @ 3:f4a0a8d004cc d2 d2
490 | @ 3:f4a0a8d004cc d2 d2
491 | |
491 | |
492 | * 2:b5c5ea414030 d1 d1
492 | * 2:b5c5ea414030 d1 d1
493 | |
493 | |
494 | x 1:1df0d5c5a3ab a2
494 | x 1:1df0d5c5a3ab a2
495 |/
495 |/
496 o 0:a61bcde8c529 a1 r1
496 o 0:a61bcde8c529 a1 r1
497
497
498 #endif
498 #endif
499
499
500 Split a non-head with obsoleted descendants
500 Split a non-head with obsoleted descendants
501
501
502 #if obsstore-on
502 #if obsstore-on
503 $ hg init $TESTTMP/e
503 $ hg init $TESTTMP/e
504 $ cd $TESTTMP/e
504 $ cd $TESTTMP/e
505 $ hg debugdrawdag <<'EOS'
505 $ hg debugdrawdag <<'EOS'
506 > H I J
506 > H I J
507 > | | |
507 > | | |
508 > F G1 G2 # amend: G1 -> G2
508 > F G1 G2 # amend: G1 -> G2
509 > | | / # prune: F
509 > | | / # prune: F
510 > C D E
510 > C D E
511 > \|/
511 > \|/
512 > B
512 > B
513 > |
513 > |
514 > A
514 > A
515 > EOS
515 > EOS
516 2 new orphan changesets
516 2 new orphan changesets
517 $ eval `hg tags -T '{tag}={node}\n'`
517 $ eval `hg tags -T '{tag}={node}\n'`
518 $ rm .hg/localtags
518 $ rm .hg/localtags
519 $ hg split $B --config experimental.evolution=createmarkers
519 $ hg split $B --config experimental.evolution=createmarkers
520 abort: cannot split changeset with children
520 abort: cannot split changeset with children
521 [10]
521 [10]
522 $ cat > $TESTTMP/messages <<EOF
522 $ cat > $TESTTMP/messages <<EOF
523 > Split B
523 > Split B
524 > EOF
524 > EOF
525 $ cat <<EOF | hg split $B
525 $ cat <<EOF | hg split $B
526 > y
526 > y
527 > y
527 > y
528 > EOF
528 > EOF
529 diff --git a/B b/B
529 diff --git a/B b/B
530 new file mode 100644
530 new file mode 100644
531 examine changes to 'B'?
531 examine changes to 'B'?
532 (enter ? for help) [Ynesfdaq?] y
532 (enter ? for help) [Ynesfdaq?] y
533
533
534 @@ -0,0 +1,1 @@
534 @@ -0,0 +1,1 @@
535 +B
535 +B
536 \ No newline at end of file
536 \ No newline at end of file
537 record this change to 'B'?
537 record this change to 'B'?
538 (enter ? for help) [Ynesfdaq?] y
538 (enter ? for help) [Ynesfdaq?] y
539
539
540 EDITOR: HG: Splitting 112478962961. Write commit message for the first split changeset.
540 EDITOR: HG: Splitting 112478962961. Write commit message for the first split changeset.
541 EDITOR: B
541 EDITOR: B
542 EDITOR:
542 EDITOR:
543 EDITOR:
543 EDITOR:
544 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
544 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
545 EDITOR: HG: Leave message empty to abort commit.
545 EDITOR: HG: Leave message empty to abort commit.
546 EDITOR: HG: --
546 EDITOR: HG: --
547 EDITOR: HG: user: test
547 EDITOR: HG: user: test
548 EDITOR: HG: branch 'default'
548 EDITOR: HG: branch 'default'
549 EDITOR: HG: added B
549 EDITOR: HG: added B
550 created new head
550 created new head
551 rebasing 2:26805aba1e60 "C"
551 rebasing 2:26805aba1e60 "C"
552 rebasing 3:be0ef73c17ad "D"
552 rebasing 3:be0ef73c17ad "D"
553 rebasing 4:49cb92066bfd "E"
553 rebasing 4:49cb92066bfd "E"
554 rebasing 7:97a6268cc7ef "G2"
554 rebasing 7:97a6268cc7ef "G2"
555 rebasing 10:e2f1e425c0db "J"
555 rebasing 10:e2f1e425c0db "J"
556 $ hg glog -r 'sort(all(), topo)'
556 $ hg glog -r 'sort(all(), topo)'
557 o 16:556c085f8b52 J
557 o 16:556c085f8b52 J
558 |
558 |
559 o 15:8761f6c9123f G2
559 o 15:8761f6c9123f G2
560 |
560 |
561 o 14:a7aeffe59b65 E
561 o 14:a7aeffe59b65 E
562 |
562 |
563 | o 13:e1e914ede9ab D
563 | o 13:e1e914ede9ab D
564 |/
564 |/
565 | o 12:01947e9b98aa C
565 | o 12:01947e9b98aa C
566 |/
566 |/
567 o 11:0947baa74d47 Split B
567 o 11:0947baa74d47 Split B
568 |
568 |
569 | * 9:88ede1d5ee13 I
569 | * 9:88ede1d5ee13 I
570 | |
570 | |
571 | x 6:af8cbf225b7b G1
571 | x 6:af8cbf225b7b G1
572 | |
572 | |
573 | x 3:be0ef73c17ad D
573 | x 3:be0ef73c17ad D
574 | |
574 | |
575 | | * 8:74863e5b5074 H
575 | | * 8:74863e5b5074 H
576 | | |
576 | | |
577 | | x 5:ee481a2a1e69 F
577 | | x 5:ee481a2a1e69 F
578 | | |
578 | | |
579 | | x 2:26805aba1e60 C
579 | | x 2:26805aba1e60 C
580 | |/
580 | |/
581 | x 1:112478962961 B
581 | x 1:112478962961 B
582 |/
582 |/
583 o 0:426bada5c675 A
583 o 0:426bada5c675 A
584
584
585 #endif
585 #endif
586
586
587 Preserve secret phase in split
587 Preserve secret phase in split
588
588
589 $ cp -R $TESTTMP/clean $TESTTMP/phases1
589 $ cp -R $TESTTMP/clean $TESTTMP/phases1
590 $ cd $TESTTMP/phases1
590 $ cd $TESTTMP/phases1
591 $ hg phase --secret -fr tip
591 $ hg phase --secret -fr tip
592 $ hg log -T '{short(node)} {phase}\n'
592 $ hg log -T '{short(node)} {phase}\n'
593 1df0d5c5a3ab secret
593 1df0d5c5a3ab secret
594 a61bcde8c529 draft
594 a61bcde8c529 draft
595 $ runsplit tip >/dev/null
595 $ runsplit tip >/dev/null
596 $ hg log -T '{short(node)} {phase}\n'
596 $ hg log -T '{short(node)} {phase}\n'
597 00eebaf8d2e2 secret
597 00eebaf8d2e2 secret
598 a09ad58faae3 secret
598 a09ad58faae3 secret
599 e704349bd21b secret
599 e704349bd21b secret
600 a61bcde8c529 draft
600 a61bcde8c529 draft
601
601
602 Do not move things to secret even if phases.new-commit=secret
602 Do not move things to secret even if phases.new-commit=secret
603
603
604 $ cp -R $TESTTMP/clean $TESTTMP/phases2
604 $ cp -R $TESTTMP/clean $TESTTMP/phases2
605 $ cd $TESTTMP/phases2
605 $ cd $TESTTMP/phases2
606 $ cat >> .hg/hgrc <<EOF
606 $ cat >> .hg/hgrc <<EOF
607 > [phases]
607 > [phases]
608 > new-commit=secret
608 > new-commit=secret
609 > EOF
609 > EOF
610 $ hg log -T '{short(node)} {phase}\n'
610 $ hg log -T '{short(node)} {phase}\n'
611 1df0d5c5a3ab draft
611 1df0d5c5a3ab draft
612 a61bcde8c529 draft
612 a61bcde8c529 draft
613 $ runsplit tip >/dev/null
613 $ runsplit tip >/dev/null
614 $ hg log -T '{short(node)} {phase}\n'
614 $ hg log -T '{short(node)} {phase}\n'
615 00eebaf8d2e2 draft
615 00eebaf8d2e2 draft
616 a09ad58faae3 draft
616 a09ad58faae3 draft
617 e704349bd21b draft
617 e704349bd21b draft
618 a61bcde8c529 draft
618 a61bcde8c529 draft
619
619
620 `hg split` with ignoreblanklines=1 does not infinite loop
620 `hg split` with ignoreblanklines=1 does not infinite loop
621
621
622 $ mkdir $TESTTMP/f
622 $ mkdir $TESTTMP/f
623 $ hg init $TESTTMP/f/a
623 $ hg init $TESTTMP/f/a
624 $ cd $TESTTMP/f/a
624 $ cd $TESTTMP/f/a
625 $ printf '1\n2\n3\n4\n5\n' > foo
625 $ printf '1\n2\n3\n4\n5\n' > foo
626 $ cp foo bar
626 $ cp foo bar
627 $ hg ci -qAm initial
627 $ hg ci -qAm initial
628 $ printf '1\n\n2\n3\ntest\n4\n5\n' > bar
628 $ printf '1\n\n2\n3\ntest\n4\n5\n' > bar
629 $ printf '1\n2\n3\ntest\n4\n5\n' > foo
629 $ printf '1\n2\n3\ntest\n4\n5\n' > foo
630 $ hg ci -qm splitme
630 $ hg ci -qm splitme
631 $ cat > $TESTTMP/messages <<EOF
631 $ cat > $TESTTMP/messages <<EOF
632 > split 1
632 > split 1
633 > --
633 > --
634 > split 2
634 > split 2
635 > EOF
635 > EOF
636 $ printf 'f\nn\nf\n' | hg --config extensions.split= --config diff.ignoreblanklines=1 split
636 $ printf 'f\nn\nf\n' | hg --config extensions.split= --config diff.ignoreblanklines=1 split
637 diff --git a/bar b/bar
637 diff --git a/bar b/bar
638 2 hunks, 2 lines changed
638 2 hunks, 2 lines changed
639 examine changes to 'bar'?
639 examine changes to 'bar'?
640 (enter ? for help) [Ynesfdaq?] f
640 (enter ? for help) [Ynesfdaq?] f
641
641
642 diff --git a/foo b/foo
642 diff --git a/foo b/foo
643 1 hunks, 1 lines changed
643 1 hunks, 1 lines changed
644 examine changes to 'foo'?
644 examine changes to 'foo'?
645 (enter ? for help) [Ynesfdaq?] n
645 (enter ? for help) [Ynesfdaq?] n
646
646
647 EDITOR: HG: Splitting dd3c45017cbf. Write commit message for the first split changeset.
647 EDITOR: HG: Splitting dd3c45017cbf. Write commit message for the first split changeset.
648 EDITOR: splitme
648 EDITOR: splitme
649 EDITOR:
649 EDITOR:
650 EDITOR:
650 EDITOR:
651 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
651 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
652 EDITOR: HG: Leave message empty to abort commit.
652 EDITOR: HG: Leave message empty to abort commit.
653 EDITOR: HG: --
653 EDITOR: HG: --
654 EDITOR: HG: user: test
654 EDITOR: HG: user: test
655 EDITOR: HG: branch 'default'
655 EDITOR: HG: branch 'default'
656 EDITOR: HG: changed bar
656 EDITOR: HG: changed bar
657 created new head
657 created new head
658 diff --git a/foo b/foo
658 diff --git a/foo b/foo
659 1 hunks, 1 lines changed
659 1 hunks, 1 lines changed
660 examine changes to 'foo'?
660 examine changes to 'foo'?
661 (enter ? for help) [Ynesfdaq?] f
661 (enter ? for help) [Ynesfdaq?] f
662
662
663 EDITOR: HG: Splitting dd3c45017cbf. So far it has been split into:
663 EDITOR: HG: Splitting dd3c45017cbf. So far it has been split into:
664 EDITOR: HG: - 2:f205aea1c624 tip "split 1"
664 EDITOR: HG: - 2:f205aea1c624 tip "split 1"
665 EDITOR: HG: Write commit message for the next split changeset.
665 EDITOR: HG: Write commit message for the next split changeset.
666 EDITOR: splitme
666 EDITOR: splitme
667 EDITOR:
667 EDITOR:
668 EDITOR:
668 EDITOR:
669 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
669 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
670 EDITOR: HG: Leave message empty to abort commit.
670 EDITOR: HG: Leave message empty to abort commit.
671 EDITOR: HG: --
671 EDITOR: HG: --
672 EDITOR: HG: user: test
672 EDITOR: HG: user: test
673 EDITOR: HG: branch 'default'
673 EDITOR: HG: branch 'default'
674 EDITOR: HG: changed foo
674 EDITOR: HG: changed foo
675 saved backup bundle to $TESTTMP/f/a/.hg/strip-backup/dd3c45017cbf-463441b5-split.hg (obsstore-off !)
675 saved backup bundle to $TESTTMP/f/a/.hg/strip-backup/dd3c45017cbf-463441b5-split.hg (obsstore-off !)
676
676
677 Let's try that again, with a slightly different set of patches, to ensure that
677 Let's try that again, with a slightly different set of patches, to ensure that
678 the ignoreblanklines thing isn't somehow position dependent.
678 the ignoreblanklines thing isn't somehow position dependent.
679
679
680 $ hg init $TESTTMP/f/b
680 $ hg init $TESTTMP/f/b
681 $ cd $TESTTMP/f/b
681 $ cd $TESTTMP/f/b
682 $ printf '1\n2\n3\n4\n5\n' > foo
682 $ printf '1\n2\n3\n4\n5\n' > foo
683 $ cp foo bar
683 $ cp foo bar
684 $ hg ci -qAm initial
684 $ hg ci -qAm initial
685 $ printf '1\n2\n3\ntest\n4\n5\n' > bar
685 $ printf '1\n2\n3\ntest\n4\n5\n' > bar
686 $ printf '1\n2\n3\ntest\n4\n\n5\n' > foo
686 $ printf '1\n2\n3\ntest\n4\n\n5\n' > foo
687 $ hg ci -qm splitme
687 $ hg ci -qm splitme
688 $ cat > $TESTTMP/messages <<EOF
688 $ cat > $TESTTMP/messages <<EOF
689 > split 1
689 > split 1
690 > --
690 > --
691 > split 2
691 > split 2
692 > EOF
692 > EOF
693 $ printf 'f\nn\nf\n' | hg --config extensions.split= --config diff.ignoreblanklines=1 split
693 $ printf 'f\nn\nf\n' | hg --config extensions.split= --config diff.ignoreblanklines=1 split
694 diff --git a/bar b/bar
694 diff --git a/bar b/bar
695 1 hunks, 1 lines changed
695 1 hunks, 1 lines changed
696 examine changes to 'bar'?
696 examine changes to 'bar'?
697 (enter ? for help) [Ynesfdaq?] f
697 (enter ? for help) [Ynesfdaq?] f
698
698
699 diff --git a/foo b/foo
699 diff --git a/foo b/foo
700 2 hunks, 2 lines changed
700 2 hunks, 2 lines changed
701 examine changes to 'foo'?
701 examine changes to 'foo'?
702 (enter ? for help) [Ynesfdaq?] n
702 (enter ? for help) [Ynesfdaq?] n
703
703
704 EDITOR: HG: Splitting 904c80b40a4a. Write commit message for the first split changeset.
704 EDITOR: HG: Splitting 904c80b40a4a. Write commit message for the first split changeset.
705 EDITOR: splitme
705 EDITOR: splitme
706 EDITOR:
706 EDITOR:
707 EDITOR:
707 EDITOR:
708 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
708 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
709 EDITOR: HG: Leave message empty to abort commit.
709 EDITOR: HG: Leave message empty to abort commit.
710 EDITOR: HG: --
710 EDITOR: HG: --
711 EDITOR: HG: user: test
711 EDITOR: HG: user: test
712 EDITOR: HG: branch 'default'
712 EDITOR: HG: branch 'default'
713 EDITOR: HG: changed bar
713 EDITOR: HG: changed bar
714 created new head
714 created new head
715 diff --git a/foo b/foo
715 diff --git a/foo b/foo
716 2 hunks, 2 lines changed
716 2 hunks, 2 lines changed
717 examine changes to 'foo'?
717 examine changes to 'foo'?
718 (enter ? for help) [Ynesfdaq?] f
718 (enter ? for help) [Ynesfdaq?] f
719
719
720 EDITOR: HG: Splitting 904c80b40a4a. So far it has been split into:
720 EDITOR: HG: Splitting 904c80b40a4a. So far it has been split into:
721 EDITOR: HG: - 2:ffecf40fa954 tip "split 1"
721 EDITOR: HG: - 2:ffecf40fa954 tip "split 1"
722 EDITOR: HG: Write commit message for the next split changeset.
722 EDITOR: HG: Write commit message for the next split changeset.
723 EDITOR: splitme
723 EDITOR: splitme
724 EDITOR:
724 EDITOR:
725 EDITOR:
725 EDITOR:
726 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
726 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
727 EDITOR: HG: Leave message empty to abort commit.
727 EDITOR: HG: Leave message empty to abort commit.
728 EDITOR: HG: --
728 EDITOR: HG: --
729 EDITOR: HG: user: test
729 EDITOR: HG: user: test
730 EDITOR: HG: branch 'default'
730 EDITOR: HG: branch 'default'
731 EDITOR: HG: changed foo
731 EDITOR: HG: changed foo
732 saved backup bundle to $TESTTMP/f/b/.hg/strip-backup/904c80b40a4a-47fb907f-split.hg (obsstore-off !)
732 saved backup bundle to $TESTTMP/f/b/.hg/strip-backup/904c80b40a4a-47fb907f-split.hg (obsstore-off !)
733
733
734
734
735 Testing the case in split when commiting flag-only file changes (issue5864)
735 Testing the case in split when commiting flag-only file changes (issue5864)
736 ---------------------------------------------------------------------------
736 ---------------------------------------------------------------------------
737 $ hg init $TESTTMP/issue5864
737 $ hg init $TESTTMP/issue5864
738 $ cd $TESTTMP/issue5864
738 $ cd $TESTTMP/issue5864
739 $ echo foo > foo
739 $ echo foo > foo
740 $ hg add foo
740 $ hg add foo
741 $ hg ci -m "initial"
741 $ hg ci -m "initial"
742 $ hg import -q --bypass -m "make executable" - <<EOF
742 $ hg import -q --bypass -m "make executable" - <<EOF
743 > diff --git a/foo b/foo
743 > diff --git a/foo b/foo
744 > old mode 100644
744 > old mode 100644
745 > new mode 100755
745 > new mode 100755
746 > EOF
746 > EOF
747 $ hg up -q
747 $ hg up -q
748
748
749 $ hg glog
749 $ hg glog
750 @ 1:3a2125f0f4cb make executable
750 @ 1:3a2125f0f4cb make executable
751 |
751 |
752 o 0:51f273a58d82 initial
752 o 0:51f273a58d82 initial
753
753
754
754
755 #if no-windows
755 #if no-windows
756 $ cat > $TESTTMP/messages <<EOF
756 $ cat > $TESTTMP/messages <<EOF
757 > split 1
757 > split 1
758 > EOF
758 > EOF
759 $ printf 'y\n' | hg split
759 $ printf 'y\n' | hg split
760 diff --git a/foo b/foo
760 diff --git a/foo b/foo
761 old mode 100644
761 old mode 100644
762 new mode 100755
762 new mode 100755
763 examine changes to 'foo'?
763 examine changes to 'foo'?
764 (enter ? for help) [Ynesfdaq?] y
764 (enter ? for help) [Ynesfdaq?] y
765
765
766 EDITOR: HG: Splitting 3a2125f0f4cb. Write commit message for the first split changeset.
766 EDITOR: HG: Splitting 3a2125f0f4cb. Write commit message for the first split changeset.
767 EDITOR: make executable
767 EDITOR: make executable
768 EDITOR:
768 EDITOR:
769 EDITOR:
769 EDITOR:
770 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
770 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
771 EDITOR: HG: Leave message empty to abort commit.
771 EDITOR: HG: Leave message empty to abort commit.
772 EDITOR: HG: --
772 EDITOR: HG: --
773 EDITOR: HG: user: test
773 EDITOR: HG: user: test
774 EDITOR: HG: branch 'default'
774 EDITOR: HG: branch 'default'
775 EDITOR: HG: changed foo
775 EDITOR: HG: changed foo
776 created new head
776 created new head
777 saved backup bundle to $TESTTMP/issue5864/.hg/strip-backup/3a2125f0f4cb-629e4432-split.hg (obsstore-off !)
777 saved backup bundle to $TESTTMP/issue5864/.hg/strip-backup/3a2125f0f4cb-629e4432-split.hg (obsstore-off !)
778
778
779 $ hg log -G -T "{node|short} {desc}\n"
779 $ hg log -G -T "{node|short} {desc}\n"
780 @ b154670c87da split 1
780 @ b154670c87da split 1
781 |
781 |
782 o 51f273a58d82 initial
782 o 51f273a58d82 initial
783
783
784 #else
784 #else
785
785
786 TODO: Fix this on Windows. See issue 2020 and 5883
786 TODO: Fix this on Windows. See issue 2020 and 5883
787
787
788 $ printf 'y\ny\ny\n' | hg split
788 $ printf 'y\ny\ny\n' | hg split
789 abort: cannot split an empty revision
789 abort: cannot split an empty revision
790 [255]
790 [10]
791 #endif
791 #endif
792
792
793 Test that splitting moves works properly (issue5723)
793 Test that splitting moves works properly (issue5723)
794 ----------------------------------------------------
794 ----------------------------------------------------
795
795
796 $ hg init $TESTTMP/issue5723-mv
796 $ hg init $TESTTMP/issue5723-mv
797 $ cd $TESTTMP/issue5723-mv
797 $ cd $TESTTMP/issue5723-mv
798 $ printf '1\n2\n' > file
798 $ printf '1\n2\n' > file
799 $ hg ci -qAm initial
799 $ hg ci -qAm initial
800 $ hg mv file file2
800 $ hg mv file file2
801 $ printf 'a\nb\n1\n2\n3\n4\n' > file2
801 $ printf 'a\nb\n1\n2\n3\n4\n' > file2
802 $ cat > $TESTTMP/messages <<EOF
802 $ cat > $TESTTMP/messages <<EOF
803 > split1, keeping only the numbered lines
803 > split1, keeping only the numbered lines
804 > --
804 > --
805 > split2, keeping the lettered lines
805 > split2, keeping the lettered lines
806 > EOF
806 > EOF
807 $ hg ci -m 'move and modify'
807 $ hg ci -m 'move and modify'
808 $ printf 'y\nn\na\na\n' | hg split
808 $ printf 'y\nn\na\na\n' | hg split
809 diff --git a/file b/file2
809 diff --git a/file b/file2
810 rename from file
810 rename from file
811 rename to file2
811 rename to file2
812 2 hunks, 4 lines changed
812 2 hunks, 4 lines changed
813 examine changes to 'file' and 'file2'?
813 examine changes to 'file' and 'file2'?
814 (enter ? for help) [Ynesfdaq?] y
814 (enter ? for help) [Ynesfdaq?] y
815
815
816 @@ -0,0 +1,2 @@
816 @@ -0,0 +1,2 @@
817 +a
817 +a
818 +b
818 +b
819 record change 1/2 to 'file2'?
819 record change 1/2 to 'file2'?
820 (enter ? for help) [Ynesfdaq?] n
820 (enter ? for help) [Ynesfdaq?] n
821
821
822 @@ -2,0 +5,2 @@ 2
822 @@ -2,0 +5,2 @@ 2
823 +3
823 +3
824 +4
824 +4
825 record change 2/2 to 'file2'?
825 record change 2/2 to 'file2'?
826 (enter ? for help) [Ynesfdaq?] a
826 (enter ? for help) [Ynesfdaq?] a
827
827
828 EDITOR: HG: Splitting 8c42fa635116. Write commit message for the first split changeset.
828 EDITOR: HG: Splitting 8c42fa635116. Write commit message for the first split changeset.
829 EDITOR: move and modify
829 EDITOR: move and modify
830 EDITOR:
830 EDITOR:
831 EDITOR:
831 EDITOR:
832 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
832 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
833 EDITOR: HG: Leave message empty to abort commit.
833 EDITOR: HG: Leave message empty to abort commit.
834 EDITOR: HG: --
834 EDITOR: HG: --
835 EDITOR: HG: user: test
835 EDITOR: HG: user: test
836 EDITOR: HG: branch 'default'
836 EDITOR: HG: branch 'default'
837 EDITOR: HG: added file2
837 EDITOR: HG: added file2
838 EDITOR: HG: removed file
838 EDITOR: HG: removed file
839 created new head
839 created new head
840 diff --git a/file2 b/file2
840 diff --git a/file2 b/file2
841 1 hunks, 2 lines changed
841 1 hunks, 2 lines changed
842 examine changes to 'file2'?
842 examine changes to 'file2'?
843 (enter ? for help) [Ynesfdaq?] a
843 (enter ? for help) [Ynesfdaq?] a
844
844
845 EDITOR: HG: Splitting 8c42fa635116. So far it has been split into:
845 EDITOR: HG: Splitting 8c42fa635116. So far it has been split into:
846 EDITOR: HG: - 2:478be2a70c27 tip "split1, keeping only the numbered lines"
846 EDITOR: HG: - 2:478be2a70c27 tip "split1, keeping only the numbered lines"
847 EDITOR: HG: Write commit message for the next split changeset.
847 EDITOR: HG: Write commit message for the next split changeset.
848 EDITOR: move and modify
848 EDITOR: move and modify
849 EDITOR:
849 EDITOR:
850 EDITOR:
850 EDITOR:
851 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
851 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
852 EDITOR: HG: Leave message empty to abort commit.
852 EDITOR: HG: Leave message empty to abort commit.
853 EDITOR: HG: --
853 EDITOR: HG: --
854 EDITOR: HG: user: test
854 EDITOR: HG: user: test
855 EDITOR: HG: branch 'default'
855 EDITOR: HG: branch 'default'
856 EDITOR: HG: changed file2
856 EDITOR: HG: changed file2
857 saved backup bundle to $TESTTMP/issue5723-mv/.hg/strip-backup/8c42fa635116-a38044d4-split.hg (obsstore-off !)
857 saved backup bundle to $TESTTMP/issue5723-mv/.hg/strip-backup/8c42fa635116-a38044d4-split.hg (obsstore-off !)
858 $ hg log -T '{desc}: {files%"{file} "}\n'
858 $ hg log -T '{desc}: {files%"{file} "}\n'
859 split2, keeping the lettered lines: file2
859 split2, keeping the lettered lines: file2
860 split1, keeping only the numbered lines: file file2
860 split1, keeping only the numbered lines: file file2
861 initial: file
861 initial: file
862 $ cat file2
862 $ cat file2
863 a
863 a
864 b
864 b
865 1
865 1
866 2
866 2
867 3
867 3
868 4
868 4
869 $ hg cat -r ".^" file2
869 $ hg cat -r ".^" file2
870 1
870 1
871 2
871 2
872 3
872 3
873 4
873 4
874 $ hg cat -r . file2
874 $ hg cat -r . file2
875 a
875 a
876 b
876 b
877 1
877 1
878 2
878 2
879 3
879 3
880 4
880 4
881
881
882
882
883 Test that splitting copies works properly (issue5723)
883 Test that splitting copies works properly (issue5723)
884 ----------------------------------------------------
884 ----------------------------------------------------
885
885
886 $ hg init $TESTTMP/issue5723-cp
886 $ hg init $TESTTMP/issue5723-cp
887 $ cd $TESTTMP/issue5723-cp
887 $ cd $TESTTMP/issue5723-cp
888 $ printf '1\n2\n' > file
888 $ printf '1\n2\n' > file
889 $ hg ci -qAm initial
889 $ hg ci -qAm initial
890 $ hg cp file file2
890 $ hg cp file file2
891 $ printf 'a\nb\n1\n2\n3\n4\n' > file2
891 $ printf 'a\nb\n1\n2\n3\n4\n' > file2
892 Also modify 'file' to prove that the changes aren't being pulled in
892 Also modify 'file' to prove that the changes aren't being pulled in
893 accidentally.
893 accidentally.
894 $ printf 'this is the new contents of "file"' > file
894 $ printf 'this is the new contents of "file"' > file
895 $ cat > $TESTTMP/messages <<EOF
895 $ cat > $TESTTMP/messages <<EOF
896 > split1, keeping "file" and only the numbered lines in file2
896 > split1, keeping "file" and only the numbered lines in file2
897 > --
897 > --
898 > split2, keeping the lettered lines in file2
898 > split2, keeping the lettered lines in file2
899 > EOF
899 > EOF
900 $ hg ci -m 'copy file->file2, modify both'
900 $ hg ci -m 'copy file->file2, modify both'
901 $ printf 'f\ny\nn\na\na\n' | hg split
901 $ printf 'f\ny\nn\na\na\n' | hg split
902 diff --git a/file b/file
902 diff --git a/file b/file
903 1 hunks, 2 lines changed
903 1 hunks, 2 lines changed
904 examine changes to 'file'?
904 examine changes to 'file'?
905 (enter ? for help) [Ynesfdaq?] f
905 (enter ? for help) [Ynesfdaq?] f
906
906
907 diff --git a/file b/file2
907 diff --git a/file b/file2
908 copy from file
908 copy from file
909 copy to file2
909 copy to file2
910 2 hunks, 4 lines changed
910 2 hunks, 4 lines changed
911 examine changes to 'file' and 'file2'?
911 examine changes to 'file' and 'file2'?
912 (enter ? for help) [Ynesfdaq?] y
912 (enter ? for help) [Ynesfdaq?] y
913
913
914 @@ -0,0 +1,2 @@
914 @@ -0,0 +1,2 @@
915 +a
915 +a
916 +b
916 +b
917 record change 2/3 to 'file2'?
917 record change 2/3 to 'file2'?
918 (enter ? for help) [Ynesfdaq?] n
918 (enter ? for help) [Ynesfdaq?] n
919
919
920 @@ -2,0 +5,2 @@ 2
920 @@ -2,0 +5,2 @@ 2
921 +3
921 +3
922 +4
922 +4
923 record change 3/3 to 'file2'?
923 record change 3/3 to 'file2'?
924 (enter ? for help) [Ynesfdaq?] a
924 (enter ? for help) [Ynesfdaq?] a
925
925
926 EDITOR: HG: Splitting 41c861dfa61e. Write commit message for the first split changeset.
926 EDITOR: HG: Splitting 41c861dfa61e. Write commit message for the first split changeset.
927 EDITOR: copy file->file2, modify both
927 EDITOR: copy file->file2, modify both
928 EDITOR:
928 EDITOR:
929 EDITOR:
929 EDITOR:
930 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
930 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
931 EDITOR: HG: Leave message empty to abort commit.
931 EDITOR: HG: Leave message empty to abort commit.
932 EDITOR: HG: --
932 EDITOR: HG: --
933 EDITOR: HG: user: test
933 EDITOR: HG: user: test
934 EDITOR: HG: branch 'default'
934 EDITOR: HG: branch 'default'
935 EDITOR: HG: added file2
935 EDITOR: HG: added file2
936 EDITOR: HG: changed file
936 EDITOR: HG: changed file
937 created new head
937 created new head
938 diff --git a/file2 b/file2
938 diff --git a/file2 b/file2
939 1 hunks, 2 lines changed
939 1 hunks, 2 lines changed
940 examine changes to 'file2'?
940 examine changes to 'file2'?
941 (enter ? for help) [Ynesfdaq?] a
941 (enter ? for help) [Ynesfdaq?] a
942
942
943 EDITOR: HG: Splitting 41c861dfa61e. So far it has been split into:
943 EDITOR: HG: Splitting 41c861dfa61e. So far it has been split into:
944 EDITOR: HG: - 2:4b19e06610eb tip "split1, keeping "file" and only the numbered lines in file2"
944 EDITOR: HG: - 2:4b19e06610eb tip "split1, keeping "file" and only the numbered lines in file2"
945 EDITOR: HG: Write commit message for the next split changeset.
945 EDITOR: HG: Write commit message for the next split changeset.
946 EDITOR: copy file->file2, modify both
946 EDITOR: copy file->file2, modify both
947 EDITOR:
947 EDITOR:
948 EDITOR:
948 EDITOR:
949 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
949 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
950 EDITOR: HG: Leave message empty to abort commit.
950 EDITOR: HG: Leave message empty to abort commit.
951 EDITOR: HG: --
951 EDITOR: HG: --
952 EDITOR: HG: user: test
952 EDITOR: HG: user: test
953 EDITOR: HG: branch 'default'
953 EDITOR: HG: branch 'default'
954 EDITOR: HG: changed file2
954 EDITOR: HG: changed file2
955 saved backup bundle to $TESTTMP/issue5723-cp/.hg/strip-backup/41c861dfa61e-467e8d3c-split.hg (obsstore-off !)
955 saved backup bundle to $TESTTMP/issue5723-cp/.hg/strip-backup/41c861dfa61e-467e8d3c-split.hg (obsstore-off !)
956 $ hg log -T '{desc}: {files%"{file} "}\n'
956 $ hg log -T '{desc}: {files%"{file} "}\n'
957 split2, keeping the lettered lines in file2: file2
957 split2, keeping the lettered lines in file2: file2
958 split1, keeping "file" and only the numbered lines in file2: file file2
958 split1, keeping "file" and only the numbered lines in file2: file file2
959 initial: file
959 initial: file
960 $ cat file2
960 $ cat file2
961 a
961 a
962 b
962 b
963 1
963 1
964 2
964 2
965 3
965 3
966 4
966 4
967 $ hg cat -r ".^" file2
967 $ hg cat -r ".^" file2
968 1
968 1
969 2
969 2
970 3
970 3
971 4
971 4
972 $ hg cat -r . file2
972 $ hg cat -r . file2
973 a
973 a
974 b
974 b
975 1
975 1
976 2
976 2
977 3
977 3
978 4
978 4
979
979
980 Test that color codes don't end up in the commit message template
980 Test that color codes don't end up in the commit message template
981 ----------------------------------------------------
981 ----------------------------------------------------
982
982
983 $ hg init $TESTTMP/colorless
983 $ hg init $TESTTMP/colorless
984 $ cd $TESTTMP/colorless
984 $ cd $TESTTMP/colorless
985 $ echo 1 > file1
985 $ echo 1 > file1
986 $ echo 1 > file2
986 $ echo 1 > file2
987 $ hg ci -qAm initial
987 $ hg ci -qAm initial
988 $ echo 2 > file1
988 $ echo 2 > file1
989 $ echo 2 > file2
989 $ echo 2 > file2
990 $ cat > $TESTTMP/messages <<EOF
990 $ cat > $TESTTMP/messages <<EOF
991 > split1, modifying file1
991 > split1, modifying file1
992 > --
992 > --
993 > split2, modifying file2
993 > split2, modifying file2
994 > EOF
994 > EOF
995 $ hg ci
995 $ hg ci
996 EDITOR:
996 EDITOR:
997 EDITOR:
997 EDITOR:
998 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
998 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
999 EDITOR: HG: Leave message empty to abort commit.
999 EDITOR: HG: Leave message empty to abort commit.
1000 EDITOR: HG: --
1000 EDITOR: HG: --
1001 EDITOR: HG: user: test
1001 EDITOR: HG: user: test
1002 EDITOR: HG: branch 'default'
1002 EDITOR: HG: branch 'default'
1003 EDITOR: HG: changed file1
1003 EDITOR: HG: changed file1
1004 EDITOR: HG: changed file2
1004 EDITOR: HG: changed file2
1005 $ printf 'f\nn\na\n' | hg split --color=debug \
1005 $ printf 'f\nn\na\n' | hg split --color=debug \
1006 > --config command-templates.oneline-summary='{label("rev", rev)} {desc}'
1006 > --config command-templates.oneline-summary='{label("rev", rev)} {desc}'
1007 [diff.diffline|diff --git a/file1 b/file1]
1007 [diff.diffline|diff --git a/file1 b/file1]
1008 1 hunks, 1 lines changed
1008 1 hunks, 1 lines changed
1009 [ ui.prompt|examine changes to 'file1'?
1009 [ ui.prompt|examine changes to 'file1'?
1010 (enter ? for help) [Ynesfdaq?]] [ ui.promptecho|f]
1010 (enter ? for help) [Ynesfdaq?]] [ ui.promptecho|f]
1011
1011
1012 [diff.diffline|diff --git a/file2 b/file2]
1012 [diff.diffline|diff --git a/file2 b/file2]
1013 1 hunks, 1 lines changed
1013 1 hunks, 1 lines changed
1014 [ ui.prompt|examine changes to 'file2'?
1014 [ ui.prompt|examine changes to 'file2'?
1015 (enter ? for help) [Ynesfdaq?]] [ ui.promptecho|n]
1015 (enter ? for help) [Ynesfdaq?]] [ ui.promptecho|n]
1016
1016
1017 EDITOR: HG: Splitting 6432c65c3078. Write commit message for the first split changeset.
1017 EDITOR: HG: Splitting 6432c65c3078. Write commit message for the first split changeset.
1018 EDITOR: split1, modifying file1
1018 EDITOR: split1, modifying file1
1019 EDITOR:
1019 EDITOR:
1020 EDITOR:
1020 EDITOR:
1021 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
1021 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
1022 EDITOR: HG: Leave message empty to abort commit.
1022 EDITOR: HG: Leave message empty to abort commit.
1023 EDITOR: HG: --
1023 EDITOR: HG: --
1024 EDITOR: HG: user: test
1024 EDITOR: HG: user: test
1025 EDITOR: HG: branch 'default'
1025 EDITOR: HG: branch 'default'
1026 EDITOR: HG: changed file1
1026 EDITOR: HG: changed file1
1027 [ ui.status|created new head]
1027 [ ui.status|created new head]
1028 [diff.diffline|diff --git a/file2 b/file2]
1028 [diff.diffline|diff --git a/file2 b/file2]
1029 1 hunks, 1 lines changed
1029 1 hunks, 1 lines changed
1030 [ ui.prompt|examine changes to 'file2'?
1030 [ ui.prompt|examine changes to 'file2'?
1031 (enter ? for help) [Ynesfdaq?]] [ ui.promptecho|a]
1031 (enter ? for help) [Ynesfdaq?]] [ ui.promptecho|a]
1032
1032
1033 EDITOR: HG: Splitting 6432c65c3078. So far it has been split into:
1033 EDITOR: HG: Splitting 6432c65c3078. So far it has been split into:
1034 EDITOR: HG: - 2 split2, modifying file2
1034 EDITOR: HG: - 2 split2, modifying file2
1035 EDITOR: HG: Write commit message for the next split changeset.
1035 EDITOR: HG: Write commit message for the next split changeset.
1036 EDITOR: split1, modifying file1
1036 EDITOR: split1, modifying file1
1037 EDITOR:
1037 EDITOR:
1038 EDITOR:
1038 EDITOR:
1039 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
1039 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed.
1040 EDITOR: HG: Leave message empty to abort commit.
1040 EDITOR: HG: Leave message empty to abort commit.
1041 EDITOR: HG: --
1041 EDITOR: HG: --
1042 EDITOR: HG: user: test
1042 EDITOR: HG: user: test
1043 EDITOR: HG: branch 'default'
1043 EDITOR: HG: branch 'default'
1044 EDITOR: HG: changed file2
1044 EDITOR: HG: changed file2
1045 [ ui.warning|transaction abort!]
1045 [ ui.warning|transaction abort!]
1046 [ ui.warning|rollback completed]
1046 [ ui.warning|rollback completed]
1047 [ ui.error|abort: empty commit message]
1047 [ ui.error|abort: empty commit message]
1048 [10]
1048 [10]
General Comments 0
You need to be logged in to leave comments. Login now