Mon, 13 Mar 2017 12:40:14 -0700 py3: add __bool__ to every class defining __nonzero__
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 13 Mar 2017 12:40:14 -0700] rev 31476
py3: add __bool__ to every class defining __nonzero__ __nonzero__ was renamed to __bool__ in Python 3. This patch simply aliases __bool__ to __nonzero__ for every class implementing __nonzero__.
Mon, 13 Mar 2017 21:58:43 -0700 merge: also allow 'e' action with experimental.updatecheck=noconflict
Martin von Zweigbergk <martinvonz@google.com> [Mon, 13 Mar 2017 21:58:43 -0700] rev 31475
merge: also allow 'e' action with experimental.updatecheck=noconflict With experimental.updatecheck=noconflict set, if one checks out f3398f1f70a0 (tests: add execute bit and fix shbang line, 2015-12-22) and then try to check out its parent, hg will complain about conflicting changes, even though the working directory is clean. We need to also allow the 'e' action in merge.py. The 'e' action is used when moving to a commit where the only change to the file is to its executable flag, so it's just an optimized 'g' action. Doesn't seem to be worth writing a test for, since the existing setup in test-update-branches.t does not set any flags.
Thu, 16 Mar 2017 12:33:15 -0700 exchange: use v2 bundles for modern compression engines (issue5506) stable
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 16 Mar 2017 12:33:15 -0700] rev 31474
exchange: use v2 bundles for modern compression engines (issue5506) Previously, `hg bundle zstd` on a non-generaldelta repo would attempt to use a v1 bundle. This would fail because zstd is not supported on v1 bundles. This patch changes the behavior to automatically use a v2 bundle when the user explicitly requests a bundlespec that is a compression engine not supported on v1. If the bundlespec is <engine>-v1, it is still explicitly rejected because that request cannot be fulfilled.
Thu, 16 Mar 2017 12:23:56 -0700 exchange: reject new compression engines for v1 bundles (issue5506) stable
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 16 Mar 2017 12:23:56 -0700] rev 31473
exchange: reject new compression engines for v1 bundles (issue5506) Version 1 bundles only support a fixed set of compression engines. Before this change, we would accept any compression engine for v1 bundles, even those that may not work on v1. This could lead to an error. We define a fixed set of compression engines known to work with v1 bundles and we add checking to ensure a newer engine (like zstd) won't work with v1 bundles. I also took the liberty of adding test coverage for unknown compression names because I noticed we didn't have coverage of it before.
Sun, 12 Mar 2017 11:43:31 -0700 config: honour the trusted flag in ui.configbytes
Martijn Pieters <mjpieters@fb.com> [Sun, 12 Mar 2017 11:43:31 -0700] rev 31472
config: honour the trusted flag in ui.configbytes
Wed, 15 Mar 2017 20:43:12 -0700 osutil: fix potential wrong fd close
Jun Wu <quark@fb.com> [Wed, 15 Mar 2017 20:43:12 -0700] rev 31471
osutil: fix potential wrong fd close According to POSIX closedir [1]: If a file descriptor is used to implement type DIR, that file descriptor shall be closed. According to POSIX fdopendir [2]: Upon calling closedir() the file descriptor shall be closed. So we should avoid "close(dfd)" after "closedir(dir)". With threads, there could be a race where an innocent fd gets closed. But Python GIL seems to help hiding the issue well. [1]: http://pubs.opengroup.org/onlinepubs/009695399/functions/closedir.html [2]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/fdopendir.html
Thu, 09 Mar 2017 12:09:31 -0800 parsers: use Python memory allocator for indexObject->offsets
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 09 Mar 2017 12:09:31 -0800] rev 31470
parsers: use Python memory allocator for indexObject->offsets
Thu, 09 Mar 2017 12:02:59 -0800 parsers: use Python memory allocator in commonancestorsheads()
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 09 Mar 2017 12:02:59 -0800] rev 31469
parsers: use Python memory allocator in commonancestorsheads()
Thu, 09 Mar 2017 11:56:47 -0800 osutil: use Python memory allocator in _listdir
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 09 Mar 2017 11:56:47 -0800] rev 31468
osutil: use Python memory allocator in _listdir The Python memory allocator has performance advantages for small allocations.
Thu, 09 Mar 2017 11:54:25 -0800 bdiff: use Python memory allocator in fixws
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 09 Mar 2017 11:54:25 -0800] rev 31467
bdiff: use Python memory allocator in fixws Python has its own memory allocation APIs. For allocations <= 512 bytes, it allocates memory from arenas. This means that average small allocations don't call the system allocator, which makes them faster. Also, arena allocations cut down on memory fragmentation, which can matter for performance in long-running processes. Another advantage of using the Python memory allocator is that allocations are tracked by Python. This is a bigger deal in Python 3, as modern versions of Python have some decent built-in tools for examining memory usage, leaks, etc. This patch converts a trivial malloc() + free() in the bdiff code to use the Python allocator APIs. Since the object being operated on is a line, chances are it will use an arena. So, this could have a net positive impact on performance (although I didn't measure it).
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 +10000 tip