Details
Details
- Reviewers
pulkit - Group Reviewers
hg-reviewers - Commits
- rHGa42817fede27: py3: use b'' in inline extension
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
pulkit |
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | tests/test-largefiles-small-disk.t (2 lines) |
Status | Author | Revision | |
---|---|---|---|
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Needs Revision | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg |
Test how largefiles abort in case the disk runs full | Test how largefiles abort in case the disk runs full | ||||
$ cat > criple.py <<EOF | $ cat > criple.py <<EOF | ||||
> from __future__ import absolute_import | > from __future__ import absolute_import | ||||
> import errno | > import errno | ||||
> import os | > import os | ||||
> import shutil | > import shutil | ||||
> from mercurial import util | > from mercurial import util | ||||
> # | > # | ||||
> # this makes the original largefiles code abort: | > # this makes the original largefiles code abort: | ||||
> _origcopyfileobj = shutil.copyfileobj | > _origcopyfileobj = shutil.copyfileobj | ||||
> def copyfileobj(fsrc, fdst, length=16*1024): | > def copyfileobj(fsrc, fdst, length=16*1024): | ||||
> # allow journal files (used by transaction) to be written | > # allow journal files (used by transaction) to be written | ||||
> if 'journal.' in fdst.name: | > if b'journal.' in fdst.name: | ||||
> return _origcopyfileobj(fsrc, fdst, length) | > return _origcopyfileobj(fsrc, fdst, length) | ||||
> fdst.write(fsrc.read(4)) | > fdst.write(fsrc.read(4)) | ||||
> raise IOError(errno.ENOSPC, os.strerror(errno.ENOSPC)) | > raise IOError(errno.ENOSPC, os.strerror(errno.ENOSPC)) | ||||
> shutil.copyfileobj = copyfileobj | > shutil.copyfileobj = copyfileobj | ||||
> # | > # | ||||
> # this makes the rewritten code abort: | > # this makes the rewritten code abort: | ||||
> def filechunkiter(f, size=131072, limit=None): | > def filechunkiter(f, size=131072, limit=None): | ||||
> yield f.read(4) | > yield f.read(4) |