Wed, 11 Jul 2018 13:48:44 +0200 debugdeltachain: protect against 0 readsize
Boris Feld <boris.feld@octobus.net> [Wed, 11 Jul 2018 13:48:44 +0200] rev 38647
debugdeltachain: protect against 0 readsize If you don't read any data, read density should be 1.
Thu, 21 Jun 2018 18:19:57 +0200 debugdeltachain: avoid division by zero when a chain is empty
Paul Morelle <paul.morelle@octobus.net> [Thu, 21 Jun 2018 18:19:57 +0200] rev 38646
debugdeltachain: avoid division by zero when a chain is empty The two ratios chainratio and extraratio are computed using dividers that may be zero when the file is empty. As the denominators are integers, the limit of the ratio "just before zero" is the numerator value itself. If the numerator itself is zero, the ratio value is still meaningful: in both cases, a "good" value is a low ratio, and a size of zero is the optimal case.
Mon, 09 Jul 2018 15:33:49 -0700 tests: prevent conflict markers in test case from triggering warnings
Danny Hooper <hooper@google.com> [Mon, 09 Jul 2018 15:33:49 -0700] rev 38645
tests: prevent conflict markers in test case from triggering warnings Broadly, having lines that begin with several '<' tends to trigger tools that try to warn you about unresolved conflicts. It will save some headaches to tweak this string literal to avoid that. Differential Revision: https://phab.mercurial-scm.org/D3897
Tue, 10 Jul 2018 12:20:57 +0200 revlog: enforce chunk slicing down to a certain size
Boris Feld <boris.feld@octobus.net> [Tue, 10 Jul 2018 12:20:57 +0200] rev 38644
revlog: enforce chunk slicing down to a certain size Limit maximum chunk size to 4x final size when reading a revision from a revlog. We only apply this logic when the target size is known from the revlog. Ideally, revlog's delta chain would be written in a way that does not trigger this extra slicing often. However, having this second guarantee that we won't read unexpectedly large amounts of memory in all cases is important for the future. Future delta chain building algorithms might have good reason to create delta chain with such characteristics. Including this code in core as soon as possible will make Mercurial 4.7 forward-compatible with such improvement.
Tue, 10 Jul 2018 11:57:33 +0200 revlog: postprocess chunk to slice them down to a certain size
Boris Feld <boris.feld@octobus.net> [Tue, 10 Jul 2018 11:57:33 +0200] rev 38643
revlog: postprocess chunk to slice them down to a certain size After the density slicing is done, we enforce a maximum chunk size to avoid memory consumption issue.
Wed, 11 Jul 2018 00:35:01 -0700 revlog: add function to slice chunk down to a given size
Boris Feld <boris.feld@octobus.net> [Wed, 11 Jul 2018 00:35:01 -0700] rev 38642
revlog: add function to slice chunk down to a given size It is possible to encounter situations where the slicing based on density did not achieve chunk smaller than the 4*textlength limit. To avoid extra memory consumption in those cases, we need to be able to break down chunk to a given size. Actual caller comes in the next changesets.
Tue, 10 Jul 2018 11:53:36 +0200 revlog: extract density based slicing into its own function
Boris Feld <boris.feld@octobus.net> [Tue, 10 Jul 2018 11:53:36 +0200] rev 38641
revlog: extract density based slicing into its own function We are going to introduce another slicing step. We start by extracting the existing one into its own function.
Tue, 10 Jul 2018 10:34:33 +0200 revlog: document and test _slicechunk
Boris Feld <boris.feld@octobus.net> [Tue, 10 Jul 2018 10:34:33 +0200] rev 38640
revlog: document and test _slicechunk
Tue, 10 Jul 2018 10:18:46 +0200 revlog: add a doctest for _segmentspan
Boris Feld <boris.feld@octobus.net> [Tue, 10 Jul 2018 10:18:46 +0200] rev 38639
revlog: add a doctest for _segmentspan
Tue, 10 Jul 2018 10:04:44 +0200 revlog: add a doctest to _trimchunk
Boris Feld <boris.feld@octobus.net> [Tue, 10 Jul 2018 10:04:44 +0200] rev 38638
revlog: add a doctest to _trimchunk
Tue, 10 Jul 2018 10:04:31 +0200 revlog: introduce a tiny mock of a revlog class
Boris Feld <boris.feld@octobus.net> [Tue, 10 Jul 2018 10:04:31 +0200] rev 38637
revlog: introduce a tiny mock of a revlog class This will be used in various function doctest added in the next changesets. The class seems small enough to live in the module directly.
Thu, 17 May 2018 15:10:36 +0200 revlog: _segmentspan computes the byte span of a segment
Paul Morelle <paul.morelle@octobus.net> [Thu, 17 May 2018 15:10:36 +0200] rev 38636
revlog: _segmentspan computes the byte span of a segment Refactor out this code to be used somewhere else in a next changeset
Tue, 10 Jul 2018 15:17:05 -0700 revlog: early return in _slicechunk when span is already small enough
Boris Feld <boris.feld@octobus.net> [Tue, 10 Jul 2018 15:17:05 -0700] rev 38635
revlog: early return in _slicechunk when span is already small enough If the full span is smaller than the minimum gap size we'll consider, we know we won't do any slicing and we can return earlier.
Tue, 19 Jun 2018 15:03:58 +0200 revlog: early return in _slicechunk when density is already good
Paul Morelle <paul.morelle@octobus.net> [Tue, 19 Jun 2018 15:03:58 +0200] rev 38634
revlog: early return in _slicechunk when density is already good We don't need to do anything if we know we won't enter the second while loop. Save the overhead of the first loop by returning earlier.
Tue, 10 Jul 2018 02:33:43 +0200 sparse-read: discard gap below 65K only
Boris Feld <boris.feld@octobus.net> [Tue, 10 Jul 2018 02:33:43 +0200] rev 38633
sparse-read: discard gap below 65K only Testing on actual data shows that 65K is more efficient in both time and memory than 256K.
Fri, 22 Jun 2018 17:12:24 +0200 sparse-read: target density of 50% instead of 25%
Paul Morelle <paul.morelle@octobus.net> [Fri, 22 Jun 2018 17:12:24 +0200] rev 38632
sparse-read: target density of 50% instead of 25% The target density value is wrong. The default target chain span is 4*text-length. However, the target max chain payload is 2*text-length. So default target density should be 50% (2/4) not 25% (1/4).
Fri, 06 Jul 2018 00:39:21 +0530 grep: change default behaviour to search working directory files (BC)
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com> [Fri, 06 Jul 2018 00:39:21 +0530] rev 38631
grep: change default behaviour to search working directory files (BC) With this patch, grep searches on the working directory by default and looks for all files tracked by the working directory and greps on them. ### OLD BEHAVIOUR $ hg init a $ cd a $ echo "some text">>file1 $ hg add file1 $ hg commit -m "adds file1" $ hg mv file1 file2 $ hg grep "some" `file2:1:some text` `file1:0:some text` This behaviour is undesirable since file1 is not in the current history and was renamed as file2, so the second result was redundant and confusing. ### NEW BEHAVIOUR $ hg init a $ cd a $ echo "some text">>file1 $ hg add file1 $ hg commit -m "adds file1" $ hg mv file1 file2 $ hg grep "some" `file2:2147483647:some text` Differential Revision: https://phab.mercurial-scm.org/D3826
Tue, 10 Jul 2018 13:18:34 +0200 patch: don't separate \r and \n when colorizing diff output
Sune Foldager <cryo@cyanite.org> [Tue, 10 Jul 2018 13:18:34 +0200] rev 38630
patch: don't separate \r and \n when colorizing diff output When displaying diffs, \r at the end of a line is treated as trailing whitespace. This causes an ANSI escape code to be inserted between \r and \n. Some programs, such as less since version 530 (maybe earlier, but at least not version 487) displays ^M when it encounters a lone \r. This causes a lot of noise in diff output on Windows, where \r\n is used to terminate lines. We avoid that by treating both \n and \r\n as end of line when considering trailing whitespace.
Sat, 07 Jul 2018 23:38:06 -0400 hook: add support for disabling the shell to native command translation
Matt Harbison <matt_harbison@yahoo.com> [Sat, 07 Jul 2018 23:38:06 -0400] rev 38629
hook: add support for disabling the shell to native command translation I think having it on by default is the right thing to do, but this is an escape hatch if someone has a command that shouldn't be mangled. The inspiration is the priority prefix. The translation does nothing on non Windows platforms, so the default value is selected to avoid printing a useless note by default.
Sat, 07 Jul 2018 23:47:49 -0400 hook: narrow the 'priority' prefix check to align with the documentation
Matt Harbison <matt_harbison@yahoo.com> [Sat, 07 Jul 2018 23:47:49 -0400] rev 38628
hook: narrow the 'priority' prefix check to align with the documentation A prefix like 'priorityfoo' is meaningless, but `hg help config.hooks` calls out the dot.
Sat, 07 Jul 2018 22:13:56 -0400 windows: don't consider '$$' to be an escaped '$' when translating to cmd.exe
Matt Harbison <matt_harbison@yahoo.com> [Sat, 07 Jul 2018 22:13:56 -0400] rev 38627
windows: don't consider '$$' to be an escaped '$' when translating to cmd.exe This functionality was inherited from `os.path.expandvars()`. But the point of adding this translating code is to be able to write a portable hook, and bash wouldn't replace '$$' with '$'. Escaping with '\' works, and is portable.
Wed, 20 Jun 2018 17:07:46 -0700 contrib: add heads(commonancestors(_)) to all-revsets
Sean Farley <sean@farley.io> [Wed, 20 Jun 2018 17:07:46 -0700] rev 38626
contrib: add heads(commonancestors(_)) to all-revsets This is mainly to check that we don't regress our optimization path.
Tue, 26 Jun 2018 15:26:21 -0700 revset: add optimization for heads(commonancestors())
Sean Farley <sean@farley.io> [Tue, 26 Jun 2018 15:26:21 -0700] rev 38625
revset: add optimization for heads(commonancestors()) Previously, the only way to get these commits were (tested on mozilla-central): hg perfrevset 'heads(::a7cf55 and ::d8b15)' ! wall 4.988366 comb 4.960000 user 4.780000 sys 0.180000 (best of 3) After this patch: (python) hg perfrevset 'heads(commonancestors(a7cf55 + d8b15))' ! wall 0.002155 comb 0.000000 user 0.000000 sys 0.000000 (best of 1107) (C) hg perfrevset 'heads(commonancestors(a7cf55 + d8b15))' ! wall 0.000568 comb 0.000000 user 0.000000 sys 0.000000 (best of 4646)
Mon, 18 Jun 2018 19:41:54 -0700 revsets: add commonancestors revset
Sean Farley <sean@farley.io> [Mon, 18 Jun 2018 19:41:54 -0700] rev 38624
revsets: add commonancestors revset This is a method to reproduce "::x and ::y" such that a set can be sent in. For instance, it'd be convenient to have "::heads()" work like this but that already means "::x + ::y + ..." for each element in the "heads()" set. Therefore, we add the "commonancestors" method to mean "::x and ::y ..." for each head in the given set.
Mon, 09 Jul 2018 10:07:20 -0400 tweakdefaults: enable word-diff by default
Augie Fackler <augie@google.com> [Mon, 09 Jul 2018 10:07:20 -0400] rev 38623
tweakdefaults: enable word-diff by default It's another creature comfort in diff output, we may as well include it alongside git-diffs and showfunc.
Tue, 10 Jul 2018 08:31:33 +0200 run-tests: fix a too long line
Boris Feld <boris.feld@octobus.net> [Tue, 10 Jul 2018 08:31:33 +0200] rev 38622
run-tests: fix a too long line Differential Revision: https://phab.mercurial-scm.org/D3900
Tue, 10 Jul 2018 08:25:04 +0200 run-tests: add missing life-cycle methods on the example custom test result
Boris Feld <boris.feld@octobus.net> [Tue, 10 Jul 2018 08:25:04 +0200] rev 38621
run-tests: add missing life-cycle methods on the example custom test result A previous commit introduced `onStart` and `onEnd` methods on test result but the one used in tests lacked those two methods. Fix it and add some output to be sure they are called. Differential Revision: https://phab.mercurial-scm.org/D3899
Tue, 10 Jul 2018 08:23:46 +0200 run-tests: fix test result verbosity
Boris Feld <boris.feld@octobus.net> [Tue, 10 Jul 2018 08:23:46 +0200] rev 38620
run-tests: fix test result verbosity A previous refactoring created the test result with a verbosity of 0 hiding some of the outputs in the normal case. Differential Revision: https://phab.mercurial-scm.org/D3898
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -28 +28 +50 +100 +300 +1000 +3000 +10000 tip