1 This file contains testcases that tend to be related to special cases or less |
1 This file contains testcases that tend to be related to special cases or less |
2 common commands affecting largefile. |
2 common commands affecting largefile. |
|
3 |
|
4 $ hg init requirements |
|
5 $ cd requirements |
|
6 |
|
7 # largefiles not loaded by default. |
|
8 |
|
9 $ hg config extensions |
|
10 [1] |
|
11 |
|
12 # Adding largefiles to requires file will auto-load largefiles extension. |
|
13 |
|
14 $ echo largefiles >> .hg/requires |
|
15 $ hg config extensions |
|
16 extensions.largefiles= |
|
17 |
|
18 # But only if there is no config entry for the extension already. |
|
19 |
|
20 $ cat > .hg/hgrc << EOF |
|
21 > [extensions] |
|
22 > largefiles=! |
|
23 > EOF |
|
24 |
|
25 $ hg config extensions |
|
26 abort: repository requires features unknown to this Mercurial: largefiles! |
|
27 (see https://mercurial-scm.org/wiki/MissingRequirement for more information) |
|
28 [255] |
|
29 |
|
30 $ cat > .hg/hgrc << EOF |
|
31 > [extensions] |
|
32 > largefiles= |
|
33 > EOF |
|
34 |
|
35 $ hg config extensions |
|
36 extensions.largefiles= |
|
37 |
|
38 $ cat > .hg/hgrc << EOF |
|
39 > [extensions] |
|
40 > largefiles = missing.py |
|
41 > EOF |
|
42 |
|
43 $ hg config extensions |
|
44 *** failed to import extension largefiles from missing.py: [Errno 2] $ENOENT$: 'missing.py' |
|
45 abort: repository requires features unknown to this Mercurial: largefiles! |
|
46 (see https://mercurial-scm.org/wiki/MissingRequirement for more information) |
|
47 [255] |
|
48 |
|
49 $ cd .. |
3 |
50 |
4 Each sections should be independent of each others. |
51 Each sections should be independent of each others. |
5 |
52 |
6 $ USERCACHE="$TESTTMP/cache"; export USERCACHE |
53 $ USERCACHE="$TESTTMP/cache"; export USERCACHE |
7 $ mkdir "${USERCACHE}" |
54 $ mkdir "${USERCACHE}" |
218 $ hg share --config extensions.share= . ../shared_lfrepo |
265 $ hg share --config extensions.share= . ../shared_lfrepo |
219 updating working directory |
266 updating working directory |
220 getting changed largefiles |
267 getting changed largefiles |
221 1 largefiles updated, 0 removed |
268 1 largefiles updated, 0 removed |
222 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
269 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
223 $ cat ../shared_lfrepo/.hg/hgrc |
270 $ grep largefiles ../shared_lfrepo/.hg/requires |
224 |
271 largefiles |
225 [extensions] |
|
226 largefiles= |
|
227 |
272 |
228 verify that large files in subrepos handled properly |
273 verify that large files in subrepos handled properly |
229 $ hg init subrepo |
274 $ hg init subrepo |
230 $ echo "subrepo = subrepo" > .hgsub |
275 $ echo "subrepo = subrepo" > .hgsub |
231 $ hg add .hgsub |
276 $ hg add .hgsub |