##// END OF EJS Templates
tests: reproduce the nullrev bug in an end-to-end test
Arseniy Alekseyev -
r51877:2dcb6a6c stable
parent child Browse files
Show More
@@ -1,420 +1,429 b''
1 #require rhg
1 #require rhg
2
2
3 $ NO_FALLBACK="env RHG_ON_UNSUPPORTED=abort"
3 $ NO_FALLBACK="env RHG_ON_UNSUPPORTED=abort"
4
4
5 Unimplemented command
5 Unimplemented command
6 $ $NO_FALLBACK rhg unimplemented-command
6 $ $NO_FALLBACK rhg unimplemented-command
7 unsupported feature: error: The subcommand 'unimplemented-command' wasn't recognized
7 unsupported feature: error: The subcommand 'unimplemented-command' wasn't recognized
8
8
9 Usage: rhg [OPTIONS] <COMMAND>
9 Usage: rhg [OPTIONS] <COMMAND>
10
10
11 For more information try '--help'
11 For more information try '--help'
12
12
13 [252]
13 [252]
14 $ rhg unimplemented-command --config rhg.on-unsupported=abort-silent
14 $ rhg unimplemented-command --config rhg.on-unsupported=abort-silent
15 [252]
15 [252]
16
16
17 Finding root
17 Finding root
18 $ $NO_FALLBACK rhg root
18 $ $NO_FALLBACK rhg root
19 abort: no repository found in '$TESTTMP' (.hg not found)!
19 abort: no repository found in '$TESTTMP' (.hg not found)!
20 [255]
20 [255]
21
21
22 $ hg init repository
22 $ hg init repository
23 $ cd repository
23 $ cd repository
24 $ $NO_FALLBACK rhg root
24 $ $NO_FALLBACK rhg root
25 $TESTTMP/repository
25 $TESTTMP/repository
26
26
27 Reading and setting configuration
27 Reading and setting configuration
28 $ echo "[ui]" >> $HGRCPATH
28 $ echo "[ui]" >> $HGRCPATH
29 $ echo "username = user1" >> $HGRCPATH
29 $ echo "username = user1" >> $HGRCPATH
30 $ echo "[extensions]" >> $HGRCPATH
31 $ echo "sparse =" >> $HGRCPATH
30 $ $NO_FALLBACK rhg config ui.username
32 $ $NO_FALLBACK rhg config ui.username
31 user1
33 user1
32 $ echo "[ui]" >> .hg/hgrc
34 $ echo "[ui]" >> .hg/hgrc
33 $ echo "username = user2" >> .hg/hgrc
35 $ echo "username = user2" >> .hg/hgrc
34 $ $NO_FALLBACK rhg config ui.username
36 $ $NO_FALLBACK rhg config ui.username
35 user2
37 user2
36 $ $NO_FALLBACK rhg --config ui.username=user3 config ui.username
38 $ $NO_FALLBACK rhg --config ui.username=user3 config ui.username
37 user3
39 user3
38
40
39 Unwritable file descriptor
41 Unwritable file descriptor
40 $ $NO_FALLBACK rhg root > /dev/full
42 $ $NO_FALLBACK rhg root > /dev/full
41 abort: No space left on device (os error 28)
43 abort: No space left on device (os error 28)
42 [255]
44 [255]
43
45
44 Deleted repository
46 Deleted repository
45 $ rm -rf `pwd`
47 $ rm -rf `pwd`
46 $ $NO_FALLBACK rhg root
48 $ $NO_FALLBACK rhg root
47 abort: error getting current working directory: $ENOENT$
49 abort: error getting current working directory: $ENOENT$
48 [255]
50 [255]
49
51
50 Listing tracked files
52 Listing tracked files
51 $ cd $TESTTMP
53 $ cd $TESTTMP
52 $ hg init repository
54 $ hg init repository
53 $ cd repository
55 $ cd repository
54 $ for i in 1 2 3; do
56 $ for i in 1 2 3; do
55 > echo $i >> file$i
57 > echo $i >> file$i
56 > hg add file$i
58 > hg add file$i
57 > done
59 > done
58 > hg commit -m "commit $i" -q
60 > hg commit -m "commit $i" -q
59
61
60 Listing tracked files from root
62 Listing tracked files from root
61 $ $NO_FALLBACK rhg files
63 $ $NO_FALLBACK rhg files
62 file1
64 file1
63 file2
65 file2
64 file3
66 file3
65
67
66 Listing tracked files from subdirectory
68 Listing tracked files from subdirectory
67 $ mkdir -p path/to/directory
69 $ mkdir -p path/to/directory
68 $ cd path/to/directory
70 $ cd path/to/directory
69 $ $NO_FALLBACK rhg files
71 $ $NO_FALLBACK rhg files
70 ../../../file1
72 ../../../file1
71 ../../../file2
73 ../../../file2
72 ../../../file3
74 ../../../file3
73
75
74 $ $NO_FALLBACK rhg files --config ui.relative-paths=legacy
76 $ $NO_FALLBACK rhg files --config ui.relative-paths=legacy
75 ../../../file1
77 ../../../file1
76 ../../../file2
78 ../../../file2
77 ../../../file3
79 ../../../file3
78
80
79 $ $NO_FALLBACK rhg files --config ui.relative-paths=false
81 $ $NO_FALLBACK rhg files --config ui.relative-paths=false
80 file1
82 file1
81 file2
83 file2
82 file3
84 file3
83
85
84 $ $NO_FALLBACK rhg files --config ui.relative-paths=true
86 $ $NO_FALLBACK rhg files --config ui.relative-paths=true
85 ../../../file1
87 ../../../file1
86 ../../../file2
88 ../../../file2
87 ../../../file3
89 ../../../file3
88
90
89 Listing tracked files through broken pipe
91 Listing tracked files through broken pipe
90 $ $NO_FALLBACK rhg files | head -n 1
92 $ $NO_FALLBACK rhg files | head -n 1
91 ../../../file1
93 ../../../file1
92
94
93 Debuging data in inline index
95 Debuging data in inline index
94 $ cd $TESTTMP
96 $ cd $TESTTMP
95 $ rm -rf repository
97 $ rm -rf repository
96 $ hg init repository
98 $ hg init repository
97 $ cd repository
99 $ cd repository
98 $ for i in 1 2 3 4 5 6; do
100 $ for i in 1 2 3 4 5 6; do
99 > echo $i >> file-$i
101 > echo $i >> file-$i
100 > hg add file-$i
102 > hg add file-$i
101 > hg commit -m "Commit $i" -q
103 > hg commit -m "Commit $i" -q
102 > done
104 > done
103 $ $NO_FALLBACK rhg debugdata -c 2
105 $ $NO_FALLBACK rhg debugdata -c 2
104 8d0267cb034247ebfa5ee58ce59e22e57a492297
106 8d0267cb034247ebfa5ee58ce59e22e57a492297
105 test
107 test
106 0 0
108 0 0
107 file-3
109 file-3
108
110
109 Commit 3 (no-eol)
111 Commit 3 (no-eol)
110 $ $NO_FALLBACK rhg debugdata -m 2
112 $ $NO_FALLBACK rhg debugdata -m 2
111 file-1\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc)
113 file-1\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc)
112 file-2\x005d9299349fc01ddd25d0070d149b124d8f10411e (esc)
114 file-2\x005d9299349fc01ddd25d0070d149b124d8f10411e (esc)
113 file-3\x002661d26c649684b482d10f91960cc3db683c38b4 (esc)
115 file-3\x002661d26c649684b482d10f91960cc3db683c38b4 (esc)
114
116
115 Debuging with full node id
117 Debuging with full node id
116 $ $NO_FALLBACK rhg debugdata -c `hg log -r 0 -T '{node}'`
118 $ $NO_FALLBACK rhg debugdata -c `hg log -r 0 -T '{node}'`
117 d1d1c679d3053e8926061b6f45ca52009f011e3f
119 d1d1c679d3053e8926061b6f45ca52009f011e3f
118 test
120 test
119 0 0
121 0 0
120 file-1
122 file-1
121
123
122 Commit 1 (no-eol)
124 Commit 1 (no-eol)
123
125
124 Specifying revisions by changeset ID
126 Specifying revisions by changeset ID
125 $ hg log -T '{node}\n'
127 $ hg log -T '{node}\n'
126 c6ad58c44207b6ff8a4fbbca7045a5edaa7e908b
128 c6ad58c44207b6ff8a4fbbca7045a5edaa7e908b
127 d654274993d0149eecc3cc03214f598320211900
129 d654274993d0149eecc3cc03214f598320211900
128 f646af7e96481d3a5470b695cf30ad8e3ab6c575
130 f646af7e96481d3a5470b695cf30ad8e3ab6c575
129 cf8b83f14ead62b374b6e91a0e9303b85dfd9ed7
131 cf8b83f14ead62b374b6e91a0e9303b85dfd9ed7
130 91c6f6e73e39318534dc415ea4e8a09c99cd74d6
132 91c6f6e73e39318534dc415ea4e8a09c99cd74d6
131 6ae9681c6d30389694d8701faf24b583cf3ccafe
133 6ae9681c6d30389694d8701faf24b583cf3ccafe
132 $ $NO_FALLBACK rhg files -r cf8b83
134 $ $NO_FALLBACK rhg files -r cf8b83
133 file-1
135 file-1
134 file-2
136 file-2
135 file-3
137 file-3
136 $ $NO_FALLBACK rhg cat -r cf8b83 file-2
138 $ $NO_FALLBACK rhg cat -r cf8b83 file-2
137 2
139 2
138 $ $NO_FALLBACK rhg cat --rev cf8b83 file-2
140 $ $NO_FALLBACK rhg cat --rev cf8b83 file-2
139 2
141 2
140 $ $NO_FALLBACK rhg cat -r c file-2
142 $ $NO_FALLBACK rhg cat -r c file-2
141 abort: ambiguous revision identifier: c
143 abort: ambiguous revision identifier: c
142 [255]
144 [255]
143 $ $NO_FALLBACK rhg cat -r d file-2
145 $ $NO_FALLBACK rhg cat -r d file-2
144 2
146 2
145 $ $NO_FALLBACK rhg cat -r 0000 file-2
147 $ $NO_FALLBACK rhg cat -r 0000 file-2
146 file-2: no such file in rev 000000000000
148 file-2: no such file in rev 000000000000
147 [1]
149 [1]
148
150
149 Cat files
151 Cat files
150 $ cd $TESTTMP
152 $ cd $TESTTMP
151 $ rm -rf repository
153 $ rm -rf repository
152 $ hg init repository
154 $ hg init repository
153 $ cd repository
155 $ cd repository
154 $ echo "original content" > original
156 $ echo "original content" > original
155 $ hg add original
157 $ hg add original
156 $ hg commit -m "add original" original
158 $ hg commit -m "add original" original
157 Without `--rev`
159 Without `--rev`
158 $ $NO_FALLBACK rhg cat original
160 $ $NO_FALLBACK rhg cat original
159 original content
161 original content
160 With `--rev`
162 With `--rev`
161 $ $NO_FALLBACK rhg cat -r 0 original
163 $ $NO_FALLBACK rhg cat -r 0 original
162 original content
164 original content
163 Cat copied file should not display copy metadata
165 Cat copied file should not display copy metadata
164 $ hg copy original copy_of_original
166 $ hg copy original copy_of_original
165 $ hg commit -m "add copy of original"
167 $ hg commit -m "add copy of original"
166 $ $NO_FALLBACK rhg cat original
168 $ $NO_FALLBACK rhg cat original
167 original content
169 original content
168 $ $NO_FALLBACK rhg cat -r 1 copy_of_original
170 $ $NO_FALLBACK rhg cat -r 1 copy_of_original
169 original content
171 original content
170
172
171
173
172 Fallback to Python
174 Fallback to Python
173 $ $NO_FALLBACK rhg cat original --exclude="*.rs"
175 $ $NO_FALLBACK rhg cat original --exclude="*.rs"
174 unsupported feature: error: Found argument '--exclude' which wasn't expected, or isn't valid in this context
176 unsupported feature: error: Found argument '--exclude' which wasn't expected, or isn't valid in this context
175
177
176 If you tried to supply '--exclude' as a value rather than a flag, use '-- --exclude'
178 If you tried to supply '--exclude' as a value rather than a flag, use '-- --exclude'
177
179
178 Usage: rhg cat <FILE>...
180 Usage: rhg cat <FILE>...
179
181
180 For more information try '--help'
182 For more information try '--help'
181
183
182 [252]
184 [252]
183 $ rhg cat original --exclude="*.rs"
185 $ rhg cat original --exclude="*.rs"
184 original content
186 original content
185
187
186 Check that `fallback-immediately` overrides `$NO_FALLBACK`
188 Check that `fallback-immediately` overrides `$NO_FALLBACK`
187 $ $NO_FALLBACK rhg cat original --exclude="*.rs" --config rhg.fallback-immediately=1
189 $ $NO_FALLBACK rhg cat original --exclude="*.rs" --config rhg.fallback-immediately=1
188 original content
190 original content
189
191
190 $ (unset RHG_FALLBACK_EXECUTABLE; rhg cat original --exclude="*.rs")
192 $ (unset RHG_FALLBACK_EXECUTABLE; rhg cat original --exclude="*.rs")
191 abort: 'rhg.on-unsupported=fallback' without 'rhg.fallback-executable' set.
193 abort: 'rhg.on-unsupported=fallback' without 'rhg.fallback-executable' set.
192 [255]
194 [255]
193
195
194 $ (unset RHG_FALLBACK_EXECUTABLE; rhg cat original)
196 $ (unset RHG_FALLBACK_EXECUTABLE; rhg cat original)
195 original content
197 original content
196
198
197 $ rhg cat original --exclude="*.rs" --config rhg.fallback-executable=false
199 $ rhg cat original --exclude="*.rs" --config rhg.fallback-executable=false
198 [1]
200 [1]
199
201
200 $ rhg cat original --exclude="*.rs" --config rhg.fallback-executable=hg-non-existent
202 $ rhg cat original --exclude="*.rs" --config rhg.fallback-executable=hg-non-existent
201 abort: invalid fallback 'hg-non-existent': cannot find binary path
203 abort: invalid fallback 'hg-non-existent': cannot find binary path
202 [253]
204 [253]
203
205
204 $ rhg cat original --exclude="*.rs" --config rhg.fallback-executable=rhg
206 $ rhg cat original --exclude="*.rs" --config rhg.fallback-executable=rhg
205 Blocking recursive fallback. The 'rhg.fallback-executable = rhg' config points to `rhg` itself.
207 Blocking recursive fallback. The 'rhg.fallback-executable = rhg' config points to `rhg` itself.
206 unsupported feature: error: Found argument '--exclude' which wasn't expected, or isn't valid in this context
208 unsupported feature: error: Found argument '--exclude' which wasn't expected, or isn't valid in this context
207
209
208 If you tried to supply '--exclude' as a value rather than a flag, use '-- --exclude'
210 If you tried to supply '--exclude' as a value rather than a flag, use '-- --exclude'
209
211
210 Usage: rhg cat <FILE>...
212 Usage: rhg cat <FILE>...
211
213
212 For more information try '--help'
214 For more information try '--help'
213
215
214 [252]
216 [252]
215
217
216 Fallback with shell path segments
218 Fallback with shell path segments
217 $ $NO_FALLBACK rhg cat .
219 $ $NO_FALLBACK rhg cat .
218 unsupported feature: `..` or `.` path segment
220 unsupported feature: `..` or `.` path segment
219 [252]
221 [252]
220 $ $NO_FALLBACK rhg cat ..
222 $ $NO_FALLBACK rhg cat ..
221 unsupported feature: `..` or `.` path segment
223 unsupported feature: `..` or `.` path segment
222 [252]
224 [252]
223 $ $NO_FALLBACK rhg cat ../..
225 $ $NO_FALLBACK rhg cat ../..
224 unsupported feature: `..` or `.` path segment
226 unsupported feature: `..` or `.` path segment
225 [252]
227 [252]
226
228
227 Fallback with filesets
229 Fallback with filesets
228 $ $NO_FALLBACK rhg cat "set:c or b"
230 $ $NO_FALLBACK rhg cat "set:c or b"
229 unsupported feature: fileset
231 unsupported feature: fileset
230 [252]
232 [252]
231
233
232 Fallback with generic hooks
234 Fallback with generic hooks
233 $ $NO_FALLBACK rhg cat original --config hooks.pre-cat=something
235 $ $NO_FALLBACK rhg cat original --config hooks.pre-cat=something
234 unsupported feature: pre-cat hook defined
236 unsupported feature: pre-cat hook defined
235 [252]
237 [252]
236
238
237 $ $NO_FALLBACK rhg cat original --config hooks.post-cat=something
239 $ $NO_FALLBACK rhg cat original --config hooks.post-cat=something
238 unsupported feature: post-cat hook defined
240 unsupported feature: post-cat hook defined
239 [252]
241 [252]
240
242
241 $ $NO_FALLBACK rhg cat original --config hooks.fail-cat=something
243 $ $NO_FALLBACK rhg cat original --config hooks.fail-cat=something
242 unsupported feature: fail-cat hook defined
244 unsupported feature: fail-cat hook defined
243 [252]
245 [252]
244
246
245 Fallback with [defaults]
247 Fallback with [defaults]
246 $ $NO_FALLBACK rhg cat original --config "defaults.cat=-r null"
248 $ $NO_FALLBACK rhg cat original --config "defaults.cat=-r null"
247 unsupported feature: `defaults` config set
249 unsupported feature: `defaults` config set
248 [252]
250 [252]
249
251
250
252
251 Requirements
253 Requirements
252 $ $NO_FALLBACK rhg debugrequirements
254 $ $NO_FALLBACK rhg debugrequirements
253 dotencode
255 dotencode
254 fncache
256 fncache
255 generaldelta
257 generaldelta
256 persistent-nodemap
258 persistent-nodemap
257 revlog-compression-zstd (zstd !)
259 revlog-compression-zstd (zstd !)
258 revlogv1
260 revlogv1
259 share-safe
261 share-safe
260 sparserevlog
262 sparserevlog
261 store
263 store
262
264
263 $ echo indoor-pool >> .hg/requires
265 $ echo indoor-pool >> .hg/requires
264 $ $NO_FALLBACK rhg files
266 $ $NO_FALLBACK rhg files
265 unsupported feature: repository requires feature unknown to this Mercurial: indoor-pool
267 unsupported feature: repository requires feature unknown to this Mercurial: indoor-pool
266 [252]
268 [252]
267
269
268 $ $NO_FALLBACK rhg cat -r 1 copy_of_original
270 $ $NO_FALLBACK rhg cat -r 1 copy_of_original
269 unsupported feature: repository requires feature unknown to this Mercurial: indoor-pool
271 unsupported feature: repository requires feature unknown to this Mercurial: indoor-pool
270 [252]
272 [252]
271
273
272 $ $NO_FALLBACK rhg debugrequirements
274 $ $NO_FALLBACK rhg debugrequirements
273 unsupported feature: repository requires feature unknown to this Mercurial: indoor-pool
275 unsupported feature: repository requires feature unknown to this Mercurial: indoor-pool
274 [252]
276 [252]
275
277
276 $ echo -e '\xFF' >> .hg/requires
278 $ echo -e '\xFF' >> .hg/requires
277 $ $NO_FALLBACK rhg debugrequirements
279 $ $NO_FALLBACK rhg debugrequirements
278 abort: parse error in 'requires' file
280 abort: parse error in 'requires' file
279 [255]
281 [255]
280
282
281 Persistent nodemap
283 Persistent nodemap
282 $ cd $TESTTMP
284 $ cd $TESTTMP
283 $ rm -rf repository
285 $ rm -rf repository
284 $ hg --config format.use-persistent-nodemap=no init repository
286 $ hg --config format.use-persistent-nodemap=no init repository
285 $ cd repository
287 $ cd repository
286 $ $NO_FALLBACK rhg debugrequirements | grep nodemap
288 $ $NO_FALLBACK rhg debugrequirements | grep nodemap
287 [1]
289 [1]
288 $ hg debugbuilddag .+5000 --overwritten-file --config "storage.revlog.nodemap.mode=warn"
290 $ hg debugbuilddag .+5000 --overwritten-file --config "storage.revlog.nodemap.mode=warn"
289 $ hg id -r tip
291 $ hg id -r tip
290 c3ae8dec9fad tip
292 c3ae8dec9fad tip
291 $ ls .hg/store/00changelog*
293 $ ls .hg/store/00changelog*
292 .hg/store/00changelog.d
294 .hg/store/00changelog.d
293 .hg/store/00changelog.i
295 .hg/store/00changelog.i
294 $ $NO_FALLBACK rhg files -r c3ae8dec9fad
296 $ $NO_FALLBACK rhg files -r c3ae8dec9fad
295 of
297 of
296
298
297 $ cd $TESTTMP
299 $ cd $TESTTMP
298 $ rm -rf repository
300 $ rm -rf repository
299 $ hg --config format.use-persistent-nodemap=True init repository
301 $ hg --config format.use-persistent-nodemap=True init repository
300 $ cd repository
302 $ cd repository
301 $ $NO_FALLBACK rhg debugrequirements | grep nodemap
303 $ $NO_FALLBACK rhg debugrequirements | grep nodemap
302 persistent-nodemap
304 persistent-nodemap
303 $ hg debugbuilddag .+5000 --overwritten-file --config "storage.revlog.nodemap.mode=warn"
305 $ hg debugbuilddag .+5000 --overwritten-file --config "storage.revlog.nodemap.mode=warn"
304 $ hg id -r tip
306 $ hg id -r tip
305 c3ae8dec9fad tip
307 c3ae8dec9fad tip
306 $ ls .hg/store/00changelog*
308 $ ls .hg/store/00changelog*
307 .hg/store/00changelog-*.nd (glob)
309 .hg/store/00changelog-*.nd (glob)
308 .hg/store/00changelog.d
310 .hg/store/00changelog.d
309 .hg/store/00changelog.i
311 .hg/store/00changelog.i
310 .hg/store/00changelog.n
312 .hg/store/00changelog.n
311
313
314 Rhg status on a sparse repo with nodemap (this specific combination used to crash in 6.5.2)
315
316 $ hg debugsparse -X excluded-dir
317 $ $NO_FALLBACK rhg status
318 abort: dirstate points to non-existent parent node
319 [255]
320
312 Specifying revisions by changeset ID
321 Specifying revisions by changeset ID
313 $ $NO_FALLBACK rhg files -r c3ae8dec9fad
322 $ $NO_FALLBACK rhg files -r c3ae8dec9fad
314 of
323 of
315 $ $NO_FALLBACK rhg cat -r c3ae8dec9fad of
324 $ $NO_FALLBACK rhg cat -r c3ae8dec9fad of
316 r5000
325 r5000
317
326
318 Crate a shared repository
327 Crate a shared repository
319
328
320 $ echo "[extensions]" >> $HGRCPATH
329 $ echo "[extensions]" >> $HGRCPATH
321 $ echo "share = " >> $HGRCPATH
330 $ echo "share = " >> $HGRCPATH
322
331
323 $ cd $TESTTMP
332 $ cd $TESTTMP
324 $ hg init repo1
333 $ hg init repo1
325 $ echo a > repo1/a
334 $ echo a > repo1/a
326 $ hg -R repo1 commit -A -m'init'
335 $ hg -R repo1 commit -A -m'init'
327 adding a
336 adding a
328
337
329 $ hg share repo1 repo2
338 $ hg share repo1 repo2
330 updating working directory
339 updating working directory
331 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
340 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
332
341
333 And check that basic rhg commands work with sharing
342 And check that basic rhg commands work with sharing
334
343
335 $ $NO_FALLBACK rhg files -R repo2
344 $ $NO_FALLBACK rhg files -R repo2
336 repo2/a
345 repo2/a
337 $ $NO_FALLBACK rhg -R repo2 cat -r 0 repo2/a
346 $ $NO_FALLBACK rhg -R repo2 cat -r 0 repo2/a
338 a
347 a
339
348
340 Same with relative sharing
349 Same with relative sharing
341
350
342 $ hg share repo2 repo3 --relative
351 $ hg share repo2 repo3 --relative
343 updating working directory
352 updating working directory
344 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
353 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
345
354
346 $ $NO_FALLBACK rhg files -R repo3
355 $ $NO_FALLBACK rhg files -R repo3
347 repo3/a
356 repo3/a
348 $ $NO_FALLBACK rhg -R repo3 cat -r 0 repo3/a
357 $ $NO_FALLBACK rhg -R repo3 cat -r 0 repo3/a
349 a
358 a
350
359
351 Same with share-safe
360 Same with share-safe
352
361
353 $ echo "[format]" >> $HGRCPATH
362 $ echo "[format]" >> $HGRCPATH
354 $ echo "use-share-safe = True" >> $HGRCPATH
363 $ echo "use-share-safe = True" >> $HGRCPATH
355
364
356 $ cd $TESTTMP
365 $ cd $TESTTMP
357 $ hg init repo4
366 $ hg init repo4
358 $ cd repo4
367 $ cd repo4
359 $ echo a > a
368 $ echo a > a
360 $ hg commit -A -m'init'
369 $ hg commit -A -m'init'
361 adding a
370 adding a
362
371
363 $ cd ..
372 $ cd ..
364 $ hg share repo4 repo5
373 $ hg share repo4 repo5
365 updating working directory
374 updating working directory
366 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
375 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
367
376
368 And check that basic rhg commands work with sharing
377 And check that basic rhg commands work with sharing
369
378
370 $ cd repo5
379 $ cd repo5
371 $ $NO_FALLBACK rhg files
380 $ $NO_FALLBACK rhg files
372 a
381 a
373 $ $NO_FALLBACK rhg cat -r 0 a
382 $ $NO_FALLBACK rhg cat -r 0 a
374 a
383 a
375
384
376 The blackbox extension is supported
385 The blackbox extension is supported
377
386
378 $ echo "[extensions]" >> $HGRCPATH
387 $ echo "[extensions]" >> $HGRCPATH
379 $ echo "blackbox =" >> $HGRCPATH
388 $ echo "blackbox =" >> $HGRCPATH
380 $ echo "[blackbox]" >> $HGRCPATH
389 $ echo "[blackbox]" >> $HGRCPATH
381 $ echo "maxsize = 1" >> $HGRCPATH
390 $ echo "maxsize = 1" >> $HGRCPATH
382 $ $NO_FALLBACK rhg files > /dev/null
391 $ $NO_FALLBACK rhg files > /dev/null
383 $ cat .hg/blackbox.log
392 $ cat .hg/blackbox.log
384 ????-??-?? ??:??:??.??? * @d3873e73d99ef67873dac33fbcc66268d5d2b6f4 (*)> (rust) files exited 0 after * seconds (glob)
393 ????-??-?? ??:??:??.??? * @d3873e73d99ef67873dac33fbcc66268d5d2b6f4 (*)> (rust) files exited 0 after * seconds (glob)
385 $ cat .hg/blackbox.log.1
394 $ cat .hg/blackbox.log.1
386 ????-??-?? ??:??:??.??? * @d3873e73d99ef67873dac33fbcc66268d5d2b6f4 (*)> (rust) files (glob)
395 ????-??-?? ??:??:??.??? * @d3873e73d99ef67873dac33fbcc66268d5d2b6f4 (*)> (rust) files (glob)
387
396
388 Subrepos are not supported
397 Subrepos are not supported
389
398
390 $ touch .hgsub
399 $ touch .hgsub
391 $ $NO_FALLBACK rhg files
400 $ $NO_FALLBACK rhg files
392 unsupported feature: subrepos (.hgsub is present)
401 unsupported feature: subrepos (.hgsub is present)
393 [252]
402 [252]
394 $ rhg files
403 $ rhg files
395 a
404 a
396 $ rm .hgsub
405 $ rm .hgsub
397
406
398 The `:required` extension suboptions are correctly ignored
407 The `:required` extension suboptions are correctly ignored
399
408
400 $ echo "[extensions]" >> $HGRCPATH
409 $ echo "[extensions]" >> $HGRCPATH
401 $ echo "blackbox:required = yes" >> $HGRCPATH
410 $ echo "blackbox:required = yes" >> $HGRCPATH
402 $ rhg files
411 $ rhg files
403 a
412 a
404 $ echo "*:required = yes" >> $HGRCPATH
413 $ echo "*:required = yes" >> $HGRCPATH
405 $ rhg files
414 $ rhg files
406 a
415 a
407
416
408 We can ignore all extensions at once
417 We can ignore all extensions at once
409
418
410 $ echo "[extensions]" >> $HGRCPATH
419 $ echo "[extensions]" >> $HGRCPATH
411 $ echo "thisextensionbetternotexist=" >> $HGRCPATH
420 $ echo "thisextensionbetternotexist=" >> $HGRCPATH
412 $ echo "thisextensionbetternotexisteither=" >> $HGRCPATH
421 $ echo "thisextensionbetternotexisteither=" >> $HGRCPATH
413 $ $NO_FALLBACK rhg files
422 $ $NO_FALLBACK rhg files
414 unsupported feature: extensions: thisextensionbetternotexist, thisextensionbetternotexisteither (consider adding them to 'rhg.ignored-extensions' config)
423 unsupported feature: extensions: thisextensionbetternotexist, thisextensionbetternotexisteither (consider adding them to 'rhg.ignored-extensions' config)
415 [252]
424 [252]
416
425
417 $ echo "[rhg]" >> $HGRCPATH
426 $ echo "[rhg]" >> $HGRCPATH
418 $ echo "ignored-extensions=*" >> $HGRCPATH
427 $ echo "ignored-extensions=*" >> $HGRCPATH
419 $ $NO_FALLBACK rhg files
428 $ $NO_FALLBACK rhg files
420 a
429 a
General Comments 0
You need to be logged in to leave comments. Login now