diff tests/test-largefiles-small-disk.t @ 31207:1ef37b16b8e8

dirstate: try to use hardlink to backup dirstate This should be more efficient once util.copyfile has real hardlink support.
author Jun Wu <quark@fb.com>
date Wed, 01 Mar 2017 17:59:21 -0800
parents 7356e6b1f5b8
children 991134261057
line wrap: on
line diff
--- a/tests/test-largefiles-small-disk.t	Sun Mar 05 16:20:07 2017 -0800
+++ b/tests/test-largefiles-small-disk.t	Wed Mar 01 17:59:21 2017 -0800
@@ -5,7 +5,11 @@
   > from mercurial import util
   > #
   > # this makes the original largefiles code abort:
+  > _origcopyfileobj = shutil.copyfileobj
   > def copyfileobj(fsrc, fdst, length=16*1024):
+  >     # allow journal files (used by transaction) to be written
+  >     if 'journal.' in fdst.name:
+  >         return _origcopyfileobj(fsrc, fdst, length)
   >     fdst.write(fsrc.read(4))
   >     raise IOError(errno.ENOSPC, os.strerror(errno.ENOSPC))
   > shutil.copyfileobj = copyfileobj