tests/test-largefiles-small-disk.t
branchstable
changeset 15572 926bc23d0b6a
parent 15571 809788118aa2
child 15794 0d91211dd12f
equal deleted inserted replaced
15571:809788118aa2 15572:926bc23d0b6a
    13   > # this makes the rewritten code abort:
    13   > # this makes the rewritten code abort:
    14   > def filechunkiter(f, size=65536, limit=None):
    14   > def filechunkiter(f, size=65536, limit=None):
    15   >     yield f.read(4)
    15   >     yield f.read(4)
    16   >     raise IOError(errno.ENOSPC, os.strerror(errno.ENOSPC))
    16   >     raise IOError(errno.ENOSPC, os.strerror(errno.ENOSPC))
    17   > util.filechunkiter = filechunkiter
    17   > util.filechunkiter = filechunkiter
       
    18   > #
       
    19   > def oslink(src, dest):
       
    20   >     raise OSError("no hardlinks, try copying instead")
       
    21   > util.oslink = oslink
    18   > EOF
    22   > EOF
    19 
    23 
    20   $ echo "[extensions]" >> $HGRCPATH
    24   $ echo "[extensions]" >> $HGRCPATH
    21   $ echo "largefiles =" >> $HGRCPATH
    25   $ echo "largefiles =" >> $HGRCPATH
    22 
    26 
    35 
    39 
    36 The user cache is not even created:
    40 The user cache is not even created:
    37 
    41 
    38   >>> import os; os.path.exists("$HOME/.cache/largefiles/")
    42   >>> import os; os.path.exists("$HOME/.cache/largefiles/")
    39   False
    43   False
       
    44 
       
    45 Make the commit with space on the device:
       
    46 
       
    47   $ hg commit -m big
       
    48 
       
    49 Now make a clone with a full disk, and make sure lfutil.link function
       
    50 makes copies instead of hardlinks:
       
    51 
       
    52   $ cd ..
       
    53   $ hg --config extensions.criple=$TESTTMP/criple.py clone --pull alice bob
       
    54   requesting all changes
       
    55   adding changesets
       
    56   adding manifests
       
    57   adding file changes
       
    58   added 1 changesets with 1 changes to 1 files
       
    59   updating to branch default
       
    60   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
    61   getting changed largefiles
       
    62   abort: No space left on device
       
    63   [255]
       
    64 
       
    65 The largefile is not created in .hg/largefiles:
       
    66 
       
    67   $ ls bob/.hg/largefiles
       
    68   dirstate