tests/test-largefiles-misc.t
changeset 21424 d13b4ecdb680
child 21881 6f332778f904
equal deleted inserted replaced
21423:7d408720453d 21424:d13b4ecdb680
       
     1 This file contains testcases that tend to be related to special cases or less
       
     2 common commands affecting largefile.
       
     3 
       
     4 Each sections should be independent of each others.
       
     5 
       
     6   $ USERCACHE="$TESTTMP/cache"; export USERCACHE
       
     7   $ mkdir "${USERCACHE}"
       
     8   $ cat >> $HGRCPATH <<EOF
       
     9   > [extensions]
       
    10   > largefiles=
       
    11   > purge=
       
    12   > rebase=
       
    13   > transplant=
       
    14   > [phases]
       
    15   > publish=False
       
    16   > [largefiles]
       
    17   > minsize=2
       
    18   > patterns=glob:**.dat
       
    19   > usercache=${USERCACHE}
       
    20   > [hooks]
       
    21   > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status"
       
    22   > EOF
       
    23 
       
    24 
       
    25 
       
    26 Test copies and moves from a directory other than root (issue3516)
       
    27 =========================================================================
       
    28 
       
    29   $ hg init lf_cpmv
       
    30   $ cd lf_cpmv
       
    31   $ mkdir dira
       
    32   $ mkdir dira/dirb
       
    33   $ touch dira/dirb/largefile
       
    34   $ hg add --large dira/dirb/largefile
       
    35   $ hg commit -m "added"
       
    36   Invoking status precommit hook
       
    37   A dira/dirb/largefile
       
    38   $ cd dira
       
    39   $ hg cp dirb/largefile foo/largefile
       
    40   $ hg ci -m "deep copy"
       
    41   Invoking status precommit hook
       
    42   A dira/foo/largefile
       
    43   $ find . | sort
       
    44   .
       
    45   ./dirb
       
    46   ./dirb/largefile
       
    47   ./foo
       
    48   ./foo/largefile
       
    49   $ hg mv foo/largefile baz/largefile
       
    50   $ hg ci -m "moved"
       
    51   Invoking status precommit hook
       
    52   A dira/baz/largefile
       
    53   R dira/foo/largefile
       
    54   $ find . | sort
       
    55   .
       
    56   ./baz
       
    57   ./baz/largefile
       
    58   ./dirb
       
    59   ./dirb/largefile
       
    60   $ cd ..
       
    61   $ hg mv dira dirc
       
    62   moving .hglf/dira/baz/largefile to .hglf/dirc/baz/largefile (glob)
       
    63   moving .hglf/dira/dirb/largefile to .hglf/dirc/dirb/largefile (glob)
       
    64   $ find * | sort
       
    65   dirc
       
    66   dirc/baz
       
    67   dirc/baz/largefile
       
    68   dirc/dirb
       
    69   dirc/dirb/largefile
       
    70   $ hg up -qC
       
    71   $ cd ..
       
    72 
       
    73 Clone a local repository owned by another user
       
    74 ===================================================
       
    75 
       
    76 #if unix-permissions
       
    77 
       
    78 We have to simulate that here by setting $HOME and removing write permissions
       
    79   $ ORIGHOME="$HOME"
       
    80   $ mkdir alice
       
    81   $ HOME="`pwd`/alice"
       
    82   $ cd alice
       
    83   $ hg init pubrepo
       
    84   $ cd pubrepo
       
    85   $ dd if=/dev/zero bs=1k count=11k > a-large-file 2> /dev/null
       
    86   $ hg add --large a-large-file
       
    87   $ hg commit -m "Add a large file"
       
    88   Invoking status precommit hook
       
    89   A a-large-file
       
    90   $ cd ..
       
    91   $ chmod -R a-w pubrepo
       
    92   $ cd ..
       
    93   $ mkdir bob
       
    94   $ HOME="`pwd`/bob"
       
    95   $ cd bob
       
    96   $ hg clone --pull ../alice/pubrepo pubrepo
       
    97   requesting all changes
       
    98   adding changesets
       
    99   adding manifests
       
   100   adding file changes
       
   101   added 1 changesets with 1 changes to 1 files
       
   102   updating to branch default
       
   103   getting changed largefiles
       
   104   1 largefiles updated, 0 removed
       
   105   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
   106   $ cd ..
       
   107   $ chmod -R u+w alice/pubrepo
       
   108   $ HOME="$ORIGHOME"
       
   109 
       
   110 #endif
       
   111 
       
   112 
       
   113 Symlink to a large largefile should behave the same as a symlink to a normal file
       
   114 =====================================================================================
       
   115 
       
   116 #if symlink
       
   117 
       
   118   $ hg init largesymlink
       
   119   $ cd largesymlink
       
   120   $ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null
       
   121   $ hg add --large largefile
       
   122   $ hg commit -m "commit a large file"
       
   123   Invoking status precommit hook
       
   124   A largefile
       
   125   $ ln -s largefile largelink
       
   126   $ hg add largelink
       
   127   $ hg commit -m "commit a large symlink"
       
   128   Invoking status precommit hook
       
   129   A largelink
       
   130   $ rm -f largelink
       
   131   $ hg up >/dev/null
       
   132   $ test -f largelink
       
   133   [1]
       
   134   $ test -L largelink
       
   135   [1]
       
   136   $ rm -f largelink # make next part of the test independent of the previous
       
   137   $ hg up -C >/dev/null
       
   138   $ test -f largelink
       
   139   $ test -L largelink
       
   140   $ cd ..
       
   141 
       
   142 #endif
       
   143 
       
   144 
       
   145 test for pattern matching on 'hg status':
       
   146 ==============================================
       
   147 
       
   148 
       
   149 to boost performance, largefiles checks whether specified patterns are
       
   150 related to largefiles in working directory (NOT to STANDIN) or not.
       
   151 
       
   152   $ hg init statusmatch
       
   153   $ cd statusmatch
       
   154 
       
   155   $ mkdir -p a/b/c/d
       
   156   $ echo normal > a/b/c/d/e.normal.txt
       
   157   $ hg add a/b/c/d/e.normal.txt
       
   158   $ echo large > a/b/c/d/e.large.txt
       
   159   $ hg add --large a/b/c/d/e.large.txt
       
   160   $ mkdir -p a/b/c/x
       
   161   $ echo normal > a/b/c/x/y.normal.txt
       
   162   $ hg add a/b/c/x/y.normal.txt
       
   163   $ hg commit -m 'add files'
       
   164   Invoking status precommit hook
       
   165   A a/b/c/d/e.large.txt
       
   166   A a/b/c/d/e.normal.txt
       
   167   A a/b/c/x/y.normal.txt
       
   168 
       
   169 (1) no pattern: no performance boost
       
   170   $ hg status -A
       
   171   C a/b/c/d/e.large.txt
       
   172   C a/b/c/d/e.normal.txt
       
   173   C a/b/c/x/y.normal.txt
       
   174 
       
   175 (2) pattern not related to largefiles: performance boost
       
   176   $ hg status -A a/b/c/x
       
   177   C a/b/c/x/y.normal.txt
       
   178 
       
   179 (3) pattern related to largefiles: no performance boost
       
   180   $ hg status -A a/b/c/d
       
   181   C a/b/c/d/e.large.txt
       
   182   C a/b/c/d/e.normal.txt
       
   183 
       
   184 (4) pattern related to STANDIN (not to largefiles): performance boost
       
   185   $ hg status -A .hglf/a
       
   186   C .hglf/a/b/c/d/e.large.txt
       
   187 
       
   188 (5) mixed case: no performance boost
       
   189   $ hg status -A a/b/c/x a/b/c/d
       
   190   C a/b/c/d/e.large.txt
       
   191   C a/b/c/d/e.normal.txt
       
   192   C a/b/c/x/y.normal.txt
       
   193 
       
   194 verify that largefiles doesn't break filesets
       
   195 
       
   196   $ hg log --rev . --exclude "set:binary()"
       
   197   changeset:   0:41bd42f10efa
       
   198   tag:         tip
       
   199   user:        test
       
   200   date:        Thu Jan 01 00:00:00 1970 +0000
       
   201   summary:     add files
       
   202   
       
   203 verify that large files in subrepos handled properly
       
   204   $ hg init subrepo
       
   205   $ echo "subrepo = subrepo" > .hgsub
       
   206   $ hg add .hgsub
       
   207   $ hg ci -m "add subrepo"
       
   208   Invoking status precommit hook
       
   209   A .hgsub
       
   210   ? .hgsubstate
       
   211   $ echo "rev 1" > subrepo/large.txt
       
   212   $ hg -R subrepo add --large subrepo/large.txt
       
   213   $ hg sum
       
   214   parent: 1:8ee150ea2e9c tip
       
   215    add subrepo
       
   216   branch: default
       
   217   commit: 1 subrepos
       
   218   update: (current)
       
   219   $ hg st
       
   220   $ hg st -S
       
   221   A subrepo/large.txt
       
   222   $ hg ci -S -m "commit top repo"
       
   223   committing subrepository subrepo
       
   224   Invoking status precommit hook
       
   225   A large.txt
       
   226   Invoking status precommit hook
       
   227   M .hgsubstate
       
   228 # No differences
       
   229   $ hg st -S
       
   230   $ hg sum
       
   231   parent: 2:ce4cd0c527a6 tip
       
   232    commit top repo
       
   233   branch: default
       
   234   commit: (clean)
       
   235   update: (current)
       
   236   $ echo "rev 2" > subrepo/large.txt
       
   237   $ hg st -S
       
   238   M subrepo/large.txt
       
   239   $ hg sum
       
   240   parent: 2:ce4cd0c527a6 tip
       
   241    commit top repo
       
   242   branch: default
       
   243   commit: 1 subrepos
       
   244   update: (current)
       
   245   $ hg ci -m "this commit should fail without -S"
       
   246   abort: uncommitted changes in subrepo subrepo
       
   247   (use --subrepos for recursive commit)
       
   248   [255]
       
   249 
       
   250 Add a normal file to the subrepo, then test archiving
       
   251 
       
   252   $ echo 'normal file' > subrepo/normal.txt
       
   253   $ hg -R subrepo add subrepo/normal.txt
       
   254 
       
   255 Lock in subrepo, otherwise the change isn't archived
       
   256 
       
   257   $ hg ci -S -m "add normal file to top level"
       
   258   committing subrepository subrepo
       
   259   Invoking status precommit hook
       
   260   M large.txt
       
   261   A normal.txt
       
   262   Invoking status precommit hook
       
   263   M .hgsubstate
       
   264   $ hg archive -S ../lf_subrepo_archive
       
   265   $ find ../lf_subrepo_archive | sort
       
   266   ../lf_subrepo_archive
       
   267   ../lf_subrepo_archive/.hg_archival.txt
       
   268   ../lf_subrepo_archive/.hgsub
       
   269   ../lf_subrepo_archive/.hgsubstate
       
   270   ../lf_subrepo_archive/a
       
   271   ../lf_subrepo_archive/a/b
       
   272   ../lf_subrepo_archive/a/b/c
       
   273   ../lf_subrepo_archive/a/b/c/d
       
   274   ../lf_subrepo_archive/a/b/c/d/e.large.txt
       
   275   ../lf_subrepo_archive/a/b/c/d/e.normal.txt
       
   276   ../lf_subrepo_archive/a/b/c/x
       
   277   ../lf_subrepo_archive/a/b/c/x/y.normal.txt
       
   278   ../lf_subrepo_archive/subrepo
       
   279   ../lf_subrepo_archive/subrepo/large.txt
       
   280   ../lf_subrepo_archive/subrepo/normal.txt
       
   281 
       
   282 Test update with subrepos.
       
   283 
       
   284   $ hg update 0
       
   285   getting changed largefiles
       
   286   0 largefiles updated, 1 removed
       
   287   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
       
   288   $ hg status -S
       
   289   $ hg update tip
       
   290   getting changed largefiles
       
   291   1 largefiles updated, 0 removed
       
   292   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
   293   $ hg status -S
       
   294 # modify a large file
       
   295   $ echo "modified" > subrepo/large.txt
       
   296   $ hg st -S
       
   297   M subrepo/large.txt
       
   298 # update -C should revert the change.
       
   299   $ hg update -C
       
   300   getting changed largefiles
       
   301   1 largefiles updated, 0 removed
       
   302   getting changed largefiles
       
   303   0 largefiles updated, 0 removed
       
   304   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
   305   $ hg status -S
       
   306 
       
   307 Test archiving a revision that references a subrepo that is not yet
       
   308 cloned (see test-subrepo-recursion.t):
       
   309 
       
   310   $ hg clone -U . ../empty
       
   311   $ cd ../empty
       
   312   $ hg archive --subrepos -r tip ../archive.tar.gz
       
   313   cloning subrepo subrepo from $TESTTMP/statusmatch/subrepo
       
   314   $ cd ..
       
   315 
       
   316 
       
   317 
       
   318 
       
   319 
       
   320 
       
   321 Test addremove, forget and others
       
   322 ==============================================
       
   323 
       
   324 Test that addremove picks up largefiles prior to the initial commit (issue3541)
       
   325 
       
   326   $ hg init addrm2
       
   327   $ cd addrm2
       
   328   $ touch large.dat
       
   329   $ touch large2.dat
       
   330   $ touch normal
       
   331   $ hg add --large large.dat
       
   332   $ hg addremove -v
       
   333   adding large2.dat as a largefile
       
   334   adding normal
       
   335 
       
   336 Test that forgetting all largefiles reverts to islfilesrepo() == False
       
   337 (addremove will add *.dat as normal files now)
       
   338   $ hg forget large.dat
       
   339   $ hg forget large2.dat
       
   340   $ hg addremove -v
       
   341   adding large.dat
       
   342   adding large2.dat
       
   343 
       
   344 Test commit's addremove option prior to the first commit
       
   345   $ hg forget large.dat
       
   346   $ hg forget large2.dat
       
   347   $ hg add --large large.dat
       
   348   $ hg ci -Am "commit"
       
   349   adding large2.dat as a largefile
       
   350   Invoking status precommit hook
       
   351   A large.dat
       
   352   A large2.dat
       
   353   A normal
       
   354   $ find .hglf | sort
       
   355   .hglf
       
   356   .hglf/large.dat
       
   357   .hglf/large2.dat
       
   358 
       
   359 Test actions on largefiles using relative paths from subdir
       
   360 
       
   361   $ mkdir sub
       
   362   $ cd sub
       
   363   $ echo anotherlarge > anotherlarge
       
   364   $ hg add --large anotherlarge
       
   365   $ hg st
       
   366   A sub/anotherlarge
       
   367   $ hg st anotherlarge
       
   368   A anotherlarge
       
   369   $ hg commit -m anotherlarge anotherlarge
       
   370   Invoking status precommit hook
       
   371   A sub/anotherlarge
       
   372   $ hg log anotherlarge
       
   373   changeset:   1:9627a577c5e9
       
   374   tag:         tip
       
   375   user:        test
       
   376   date:        Thu Jan 01 00:00:00 1970 +0000
       
   377   summary:     anotherlarge
       
   378   
       
   379   $ hg log -G anotherlarge
       
   380   @  changeset:   1:9627a577c5e9
       
   381   |  tag:         tip
       
   382   |  user:        test
       
   383   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   384   |  summary:     anotherlarge
       
   385   |
       
   386   $ echo more >> anotherlarge
       
   387   $ hg st .
       
   388   M anotherlarge
       
   389   $ hg cat anotherlarge
       
   390   anotherlarge
       
   391   $ hg revert anotherlarge
       
   392   $ hg st
       
   393   ? sub/anotherlarge.orig
       
   394   $ cd ..
       
   395 
       
   396   $ cd ..
       
   397 
       
   398 Check error message while exchange
       
   399 =========================================================
       
   400 
       
   401 issue3651: summary/outgoing with largefiles shows "no remote repo"
       
   402 unexpectedly
       
   403 
       
   404   $ mkdir issue3651
       
   405   $ cd issue3651
       
   406 
       
   407   $ hg init src
       
   408   $ echo a > src/a
       
   409   $ hg -R src add --large src/a
       
   410   $ hg -R src commit -m '#0'
       
   411   Invoking status precommit hook
       
   412   A a
       
   413 
       
   414 check messages when no remote repository is specified:
       
   415 "no remote repo" route for "hg outgoing --large" is not tested here,
       
   416 because it can't be reproduced easily.
       
   417 
       
   418   $ hg init clone1
       
   419   $ hg -R clone1 -q pull src
       
   420   $ hg -R clone1 -q update
       
   421   $ hg -R clone1 paths | grep default
       
   422   [1]
       
   423 
       
   424   $ hg -R clone1 summary --large
       
   425   parent: 0:fc0bd45326d3 tip
       
   426    #0
       
   427   branch: default
       
   428   commit: (clean)
       
   429   update: (current)
       
   430   largefiles: (no remote repo)
       
   431 
       
   432 check messages when there is no files to upload:
       
   433 
       
   434   $ hg -q clone src clone2
       
   435   $ hg -R clone2 paths | grep default
       
   436   default = $TESTTMP/issue3651/src (glob)
       
   437 
       
   438   $ hg -R clone2 summary --large
       
   439   parent: 0:fc0bd45326d3 tip
       
   440    #0
       
   441   branch: default
       
   442   commit: (clean)
       
   443   update: (current)
       
   444   largefiles: (no files to upload)
       
   445   $ hg -R clone2 outgoing --large
       
   446   comparing with $TESTTMP/issue3651/src (glob)
       
   447   searching for changes
       
   448   no changes found
       
   449   largefiles: no files to upload
       
   450   [1]
       
   451 
       
   452   $ hg -R clone2 outgoing --large --graph --template "{rev}"
       
   453   comparing with $TESTTMP/issue3651/src (glob)
       
   454   searching for changes
       
   455   no changes found
       
   456   largefiles: no files to upload
       
   457 
       
   458 check messages when there are files to upload:
       
   459 
       
   460   $ echo b > clone2/b
       
   461   $ hg -R clone2 add --large clone2/b
       
   462   $ hg -R clone2 commit -m '#1'
       
   463   Invoking status precommit hook
       
   464   A b
       
   465   $ hg -R clone2 summary --large
       
   466   parent: 1:1acbe71ce432 tip
       
   467    #1
       
   468   branch: default
       
   469   commit: (clean)
       
   470   update: (current)
       
   471   largefiles: 1 to upload
       
   472   $ hg -R clone2 outgoing --large
       
   473   comparing with $TESTTMP/issue3651/src (glob)
       
   474   searching for changes
       
   475   changeset:   1:1acbe71ce432
       
   476   tag:         tip
       
   477   user:        test
       
   478   date:        Thu Jan 01 00:00:00 1970 +0000
       
   479   summary:     #1
       
   480   
       
   481   largefiles to upload:
       
   482   b
       
   483   
       
   484   $ hg -R clone2 outgoing --large --graph --template "{rev}"
       
   485   comparing with $TESTTMP/issue3651/src
       
   486   searching for changes
       
   487   @  1
       
   488   
       
   489   largefiles to upload:
       
   490   b
       
   491   
       
   492 
       
   493   $ cd ..
       
   494 
       
   495 merge action 'd' for 'local renamed directory to d2/g' which has no filename
       
   496 ==================================================================================
       
   497 
       
   498   $ hg init merge-action
       
   499   $ cd merge-action
       
   500   $ touch l
       
   501   $ hg add --large l
       
   502   $ mkdir d1
       
   503   $ touch d1/f
       
   504   $ hg ci -Aqm0
       
   505   Invoking status precommit hook
       
   506   A d1/f
       
   507   A l
       
   508   $ echo > d1/f
       
   509   $ touch d1/g
       
   510   $ hg ci -Aqm1
       
   511   Invoking status precommit hook
       
   512   M d1/f
       
   513   A d1/g
       
   514   $ hg up -qr0
       
   515   $ hg mv d1 d2
       
   516   moving d1/f to d2/f (glob)
       
   517   $ hg ci -qm2
       
   518   Invoking status precommit hook
       
   519   A d2/f
       
   520   R d1/f
       
   521   $ hg merge
       
   522   merging d2/f and d1/f to d2/f
       
   523   1 files updated, 1 files merged, 0 files removed, 0 files unresolved
       
   524   (branch merge, don't forget to commit)
       
   525   getting changed largefiles
       
   526   0 largefiles updated, 0 removed
       
   527   $ cd ..
       
   528 
       
   529 
       
   530 Merge conflicts:
       
   531 =====================
       
   532 
       
   533   $ hg init merge
       
   534   $ cd merge
       
   535   $ echo 0 > f-different
       
   536   $ echo 0 > f-same
       
   537   $ echo 0 > f-unchanged-1
       
   538   $ echo 0 > f-unchanged-2
       
   539   $ hg add --large *
       
   540   $ hg ci -m0
       
   541   Invoking status precommit hook
       
   542   A f-different
       
   543   A f-same
       
   544   A f-unchanged-1
       
   545   A f-unchanged-2
       
   546   $ echo tmp1 > f-unchanged-1
       
   547   $ echo tmp1 > f-unchanged-2
       
   548   $ echo tmp1 > f-same
       
   549   $ hg ci -m1
       
   550   Invoking status precommit hook
       
   551   M f-same
       
   552   M f-unchanged-1
       
   553   M f-unchanged-2
       
   554   $ echo 2 > f-different
       
   555   $ echo 0 > f-unchanged-1
       
   556   $ echo 1 > f-unchanged-2
       
   557   $ echo 1 > f-same
       
   558   $ hg ci -m2
       
   559   Invoking status precommit hook
       
   560   M f-different
       
   561   M f-same
       
   562   M f-unchanged-1
       
   563   M f-unchanged-2
       
   564   $ hg up -qr0
       
   565   $ echo tmp2 > f-unchanged-1
       
   566   $ echo tmp2 > f-unchanged-2
       
   567   $ echo tmp2 > f-same
       
   568   $ hg ci -m3
       
   569   Invoking status precommit hook
       
   570   M f-same
       
   571   M f-unchanged-1
       
   572   M f-unchanged-2
       
   573   created new head
       
   574   $ echo 1 > f-different
       
   575   $ echo 1 > f-unchanged-1
       
   576   $ echo 0 > f-unchanged-2
       
   577   $ echo 1 > f-same
       
   578   $ hg ci -m4
       
   579   Invoking status precommit hook
       
   580   M f-different
       
   581   M f-same
       
   582   M f-unchanged-1
       
   583   M f-unchanged-2
       
   584   $ hg merge
       
   585   largefile f-different has a merge conflict
       
   586   ancestor was 09d2af8dd22201dd8d48e5dcfcaed281ff9422c7
       
   587   keep (l)ocal e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e or
       
   588   take (o)ther 7448d8798a4380162d4b56f9b452e2f6f9e24e7a? l
       
   589   0 files updated, 4 files merged, 0 files removed, 0 files unresolved
       
   590   (branch merge, don't forget to commit)
       
   591   getting changed largefiles
       
   592   1 largefiles updated, 0 removed
       
   593   $ cat f-different
       
   594   1
       
   595   $ cat f-same
       
   596   1
       
   597   $ cat f-unchanged-1
       
   598   1
       
   599   $ cat f-unchanged-2
       
   600   1
       
   601   $ cd ..
       
   602 
       
   603 Test largefile insulation (do not enabled a side effect
       
   604 ========================================================
       
   605 
       
   606 Check whether "largefiles" feature is supported only in repositories
       
   607 enabling largefiles extension.
       
   608 
       
   609   $ mkdir individualenabling
       
   610   $ cd individualenabling
       
   611 
       
   612   $ hg init enabledlocally
       
   613   $ echo large > enabledlocally/large
       
   614   $ hg -R enabledlocally add --large enabledlocally/large
       
   615   $ hg -R enabledlocally commit -m '#0'
       
   616   Invoking status precommit hook
       
   617   A large
       
   618 
       
   619   $ hg init notenabledlocally
       
   620   $ echo large > notenabledlocally/large
       
   621   $ hg -R notenabledlocally add --large notenabledlocally/large
       
   622   $ hg -R notenabledlocally commit -m '#0'
       
   623   Invoking status precommit hook
       
   624   A large
       
   625 
       
   626   $ cat >> $HGRCPATH <<EOF
       
   627   > [extensions]
       
   628   > # disable globally
       
   629   > largefiles=!
       
   630   > EOF
       
   631   $ cat >> enabledlocally/.hg/hgrc <<EOF
       
   632   > [extensions]
       
   633   > # enable locally
       
   634   > largefiles=
       
   635   > EOF
       
   636   $ hg -R enabledlocally root
       
   637   $TESTTMP/individualenabling/enabledlocally (glob)
       
   638   $ hg -R notenabledlocally root
       
   639   abort: repository requires features unknown to this Mercurial: largefiles!
       
   640   (see http://mercurial.selenic.com/wiki/MissingRequirement for more information)
       
   641   [255]
       
   642 
       
   643   $ hg init push-dst
       
   644   $ hg -R enabledlocally push push-dst
       
   645   pushing to push-dst
       
   646   abort: required features are not supported in the destination: largefiles
       
   647   [255]
       
   648 
       
   649   $ hg init pull-src
       
   650   $ hg -R pull-src pull enabledlocally
       
   651   pulling from enabledlocally
       
   652   abort: required features are not supported in the destination: largefiles
       
   653   [255]
       
   654 
       
   655   $ hg clone enabledlocally clone-dst
       
   656   abort: repository requires features unknown to this Mercurial: largefiles!
       
   657   (see http://mercurial.selenic.com/wiki/MissingRequirement for more information)
       
   658   [255]
       
   659   $ test -d clone-dst
       
   660   [1]
       
   661   $ hg clone --pull enabledlocally clone-pull-dst
       
   662   abort: required features are not supported in the destination: largefiles
       
   663   [255]
       
   664   $ test -d clone-pull-dst
       
   665   [1]
       
   666 
       
   667 #if serve
       
   668 
       
   669 Test largefiles specific peer setup, when largefiles is enabled
       
   670 locally (issue4109)
       
   671 
       
   672   $ hg showconfig extensions | grep largefiles
       
   673   extensions.largefiles=!
       
   674   $ mkdir -p $TESTTMP/individualenabling/usercache
       
   675 
       
   676   $ hg serve -R enabledlocally -d -p $HGPORT --pid-file hg.pid
       
   677   $ cat hg.pid >> $DAEMON_PIDS
       
   678 
       
   679   $ hg init pull-dst
       
   680   $ cat > pull-dst/.hg/hgrc <<EOF
       
   681   > [extensions]
       
   682   > # enable locally
       
   683   > largefiles=
       
   684   > [largefiles]
       
   685   > # ignore system cache to force largefiles specific wire proto access
       
   686   > usercache=$TESTTMP/individualenabling/usercache
       
   687   > EOF
       
   688   $ hg -R pull-dst -q pull -u http://localhost:$HGPORT
       
   689 
       
   690   $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
       
   691 #endif
       
   692 
       
   693   $ cd ..
       
   694 
       
   695 
       
   696