Mercurial > hg
annotate hgext/narrow/TODO.rst @ 45095:8e04607023e5
procutil: ensure that procutil.std{out,err}.write() writes all bytes
Python 3 offers different kind of streams and it’s not guaranteed for all of
them that calling write() writes all bytes.
When Python is started in unbuffered mode, sys.std{out,err}.buffer are
instances of io.FileIO, whose write() can write less bytes for
platform-specific reasons (e.g. Linux has a 0x7ffff000 bytes maximum and could
write less if interrupted by a signal; when writing to Windows consoles, it’s
limited to 32767 bytes to avoid the "not enough space" error). This can lead to
silent loss of data, both when using sys.std{out,err}.buffer (which may in fact
not be a buffered stream) and when using the text streams sys.std{out,err}
(I’ve created a CPython bug report for that:
https://bugs.python.org/issue41221).
Python may fix the problem at some point. For now, we implement our own wrapper
for procutil.std{out,err} that calls the raw stream’s write() method until all
bytes have been written. We don’t use sys.std{out,err} for larger writes, so I
think it’s not worth the effort to patch them.
author | Manuel Jacob <me@manueljacob.de> |
---|---|
date | Fri, 10 Jul 2020 12:27:58 +0200 |
parents | ce0bc2952e2a |
children |
rev | line source |
---|---|
39771
a063786c89fb
narrow: remove narrowrevlog
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39544
diff
changeset
|
1 Address commentary in manifest.excludedmanifestrevlog.add - |
36104 | 2 specifically we should improve the collaboration with core so that |
3 add() never gets called on an excluded directory and we can improve | |
4 the stand-in to raise a ProgrammingError. | |
5 | |
6 Reason more completely about rename-filtering logic in | |
7 narrowfilelog. There could be some surprises lurking there. | |
8 | |
40080
56d4f88530fc
narrow: update TODO.rst now that we share format with sparse
Martin von Zweigbergk <martinvonz@google.com>
parents:
40079
diff
changeset
|
9 Formally document the narrowspec format. For bonus points, unify with the |
56d4f88530fc
narrow: update TODO.rst now that we share format with sparse
Martin von Zweigbergk <martinvonz@google.com>
parents:
40079
diff
changeset
|
10 server-specified narrowspec format. |
36104 | 11 |
12 narrowrepo.setnarrowpats() or narrowspec.save() need to make sure | |
13 they're holding the wlock. | |
40087
1d09ba0d2ed3
narrow: move remaining narrow-limited dirstate walks to core
Martin von Zweigbergk <martinvonz@google.com>
parents:
40080
diff
changeset
|
14 |
1d09ba0d2ed3
narrow: move remaining narrow-limited dirstate walks to core
Martin von Zweigbergk <martinvonz@google.com>
parents:
40080
diff
changeset
|
15 The follinwg places do an unrestricted dirstate walk (including files outside the |
1d09ba0d2ed3
narrow: move remaining narrow-limited dirstate walks to core
Martin von Zweigbergk <martinvonz@google.com>
parents:
40080
diff
changeset
|
16 narrowspec). Some of them should perhaps not do that. |
1d09ba0d2ed3
narrow: move remaining narrow-limited dirstate walks to core
Martin von Zweigbergk <martinvonz@google.com>
parents:
40080
diff
changeset
|
17 |
1d09ba0d2ed3
narrow: move remaining narrow-limited dirstate walks to core
Martin von Zweigbergk <martinvonz@google.com>
parents:
40080
diff
changeset
|
18 * debugfileset |
1d09ba0d2ed3
narrow: move remaining narrow-limited dirstate walks to core
Martin von Zweigbergk <martinvonz@google.com>
parents:
40080
diff
changeset
|
19 * perfwalk |
1d09ba0d2ed3
narrow: move remaining narrow-limited dirstate walks to core
Martin von Zweigbergk <martinvonz@google.com>
parents:
40080
diff
changeset
|
20 * sparse (but restricted to sparse config) |
1d09ba0d2ed3
narrow: move remaining narrow-limited dirstate walks to core
Martin von Zweigbergk <martinvonz@google.com>
parents:
40080
diff
changeset
|
21 * largefiles |