tests/test-largefiles-small-disk.t
changeset 31217 1ef37b16b8e8
parent 30181 7356e6b1f5b8
child 33980 991134261057
equal deleted inserted replaced
31216:49e5491ed9bd 31217:1ef37b16b8e8
     3   $ cat > criple.py <<EOF
     3   $ cat > criple.py <<EOF
     4   > import os, errno, shutil
     4   > import os, errno, shutil
     5   > from mercurial import util
     5   > from mercurial import util
     6   > #
     6   > #
     7   > # this makes the original largefiles code abort:
     7   > # this makes the original largefiles code abort:
       
     8   > _origcopyfileobj = shutil.copyfileobj
     8   > def copyfileobj(fsrc, fdst, length=16*1024):
     9   > def copyfileobj(fsrc, fdst, length=16*1024):
       
    10   >     # allow journal files (used by transaction) to be written
       
    11   >     if 'journal.' in fdst.name:
       
    12   >         return _origcopyfileobj(fsrc, fdst, length)
     9   >     fdst.write(fsrc.read(4))
    13   >     fdst.write(fsrc.read(4))
    10   >     raise IOError(errno.ENOSPC, os.strerror(errno.ENOSPC))
    14   >     raise IOError(errno.ENOSPC, os.strerror(errno.ENOSPC))
    11   > shutil.copyfileobj = copyfileobj
    15   > shutil.copyfileobj = copyfileobj
    12   > #
    16   > #
    13   > # this makes the rewritten code abort:
    17   > # this makes the rewritten code abort: