- Jul 13, 2018
-
-
Gregory Szorc authored
The old docstring was incorrect in that it said that subsequent calls perform a stat() and refresh the object if things change. This is not how things work: __get__ populates obj.__dict__[self.sname] with the result of the decorated function and returns this value without validation on subsequent calls, if available. The correct usage of this type is kinda wonky. It would probably benefit from a refactor. But I don't have time to do that right now. But we can change the docstring so others aren't entrapped by its lies (like I was when using repofilecache in a Mozilla extension). Differential Revision: https://phab.mercurial-scm.org/D3943
-
- Jul 12, 2018
-
-
Sushil Khanchi authored
Differential Revision: https://phab.mercurial-scm.org/D3939
-
Sushil Khanchi authored
return _dorebase() to make sure it returns 'return code'. Differential Revision: https://phab.mercurial-scm.org/D3938
-
- Jul 11, 2018
-
-
Martin von Zweigbergk authored
There is no need to convert extinct revisions to nodeids. Differential Revision: https://phab.mercurial-scm.org/D3942
-
Martin von Zweigbergk authored
In the case where the node has successors, but none of them is an ancestor of the destination, we would iterate over the successor nodes twice, check if they're in the repo and convert them to revnums. I doubt it's a measureable cost, but it gets simpler this way too. Differential Revision: https://phab.mercurial-scm.org/D3941
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D3940
-
- Jul 12, 2018
-
-
Martin von Zweigbergk authored
This makes the direction much clearer, IMO. Differential Revision: https://phab.mercurial-scm.org/D3936
-
Martin von Zweigbergk authored
Unnecessary since 879cbdde63df (revlog: do inclusive descendant testing (API), 2018-06-21). Differential Revision: https://phab.mercurial-scm.org/D3935
-
Martin von Zweigbergk authored
As agreed on by Boris, Yuya, and me on D3929. Differential Revision: https://phab.mercurial-scm.org/D3934
-
- Jun 30, 2018
-
-
Sushil Khanchi authored
This feature adds a functionality in rebase to confirm before applying changes. When there is no conflict and user confirm to apply actions, we just finish the unfinished rebase. But when there is a conflict and user confirm to apply actions then we can't just finish rebasing using rbsrt._finishrebase() because in-memory merge doesn't support conflicts, so we have to abort and run on-disk merge in this case. And if user doesn't confirm to apply actions then simply abort the rebase. Differential Revision: https://phab.mercurial-scm.org/D3870
-
- Jul 11, 2018
-
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D3931
-
Martin von Zweigbergk authored
This check was taken from rebase.py. It seems to make sense to move it here, but I haven't done any measurements. Differential Revision: https://phab.mercurial-scm.org/D3930
-
Martin von Zweigbergk authored
The "is" is to match "isancestor" and to make it clear that it doesn't return a descendant. The "rev" is to make it clear that it's not about nodeids (unlike e.g. isancestor()). The argument order change is just seems more natural (and makes isancestor() less confusing). Differential Revision: https://phab.mercurial-scm.org/D3929
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D3928
-
Kyle Lippincott authored
Differential Revision: https://phab.mercurial-scm.org/D3927
-
Martijn Pieters authored
With time, fncache can become very large. The mozilla-central repo for example, has a 31M and growing fncache file. Loading this file takes time (280ms for the mozilla-central repository). In many scenarios, we don't need to load fncache at all. For example, when committing changes to existing files, or pushing such commits to another clone. This patch detects when a name is added via store.vfs(), and only loads the cache if a) the data metadata file doesn't already exist, or b) when opening for appending, the data or metadata file exists but has size (a transaction rollback leaves behind such files). Benchmarks (run on Macos 10.13 on a 2017-model Macbook Pro with Core i7 2.9GHz and flash drive), each test without and with patch run 5 times: * committing to an existing file, against the mozilla-central repository. Baseline real time average 2.3736, with patch 1.9884. * unbundling a large changeset consisting *only* of existing-file modifications (159 revisions, 1050 modifications, mozilla-central 4a250a0e4f29:beea9ac7d823), into a clone limited to the ancestor revision of that revset). Baseline real time average 1.5048, with patch 1.3108.
-
Sune Foldager authored
-
Augie Fackler authored
This fixes test-bookmarks.t on Python 3 (which had regressed.) Differential Revision: https://phab.mercurial-scm.org/D3926
-
Augie Fackler authored
# skip-blame just a b prefix Differential Revision: https://phab.mercurial-scm.org/D3925
-
Augie Fackler authored
The forwarding trick was failing test-check-interfaces on Python 3. Duplicating a line of code is easy enough I'm doing that rather than try and figure out what's going on in any kind of detail. Differential Revision: https://phab.mercurial-scm.org/D3924
-
Augie Fackler authored
Somehow this was only detected in Python 3. Differential Revision: https://phab.mercurial-scm.org/D3923
-
Augie Fackler authored
The range() builtin returns a special object rather than a list, but we really wanted a list in these examples. Differential Revision: https://phab.mercurial-scm.org/D3922
-
Augie Fackler authored
Differential Revision: https://phab.mercurial-scm.org/D3921
-
- Jul 10, 2018
-
-
Yuya Nishihara authored
I believe nobody would want to see the "2147483647:" prefix while grepping working directory files. The wdir revision is still visible if "-r wdir()" is specified since a revset may point to more than one revisions, and it seems confusing to change the visibility dynamically by the number of the matched revisions. Differential Revision: https://phab.mercurial-scm.org/D3920
-
- Jul 11, 2018
-
-
Yuya Nishihara authored
Unfortunately, python-hglib relies on the original grep behavior and is documented as such. Even though we agreed to introduce the BC, we shouldn't break existing libraries. So this patch flips the default again and move the new default to ui.tweakdefaults. We could instead use HGPLAIN to turn this flag off, but that would be rather confusing as the old/new behaviors are quite different. Differential Revision: https://phab.mercurial-scm.org/D3919
-
Yuya Nishihara authored
This allows us to conditionally enable the new behavior to unbreak python-hglib. See the next patch. The config option is undocumented since the --all-files is still experimental and isn't fully implemented. It can be moved to [experimental] if that's preferred. Differential Revision: https://phab.mercurial-scm.org/D3918
-
Yuya Nishihara authored
The default was -rtip:0 before, but "--all-files -rtip:0" would be the most useless combination, and it isn't supported yet. Let's change the default to something useful. This isn't flagged as BC since --all-files isn't released. Differential Revision: https://phab.mercurial-scm.org/D3917
-
Yuya Nishihara authored
This combination doesn't make any sense since --diff is the flag to search change history, whereas --all-files is to include unmodified contents. Differential Revision: https://phab.mercurial-scm.org/D3916
-
Yuya Nishihara authored
This matches the config name to be added. Note that we don't have to keep the old flag since it isn't released yet. Differential Revision: https://phab.mercurial-scm.org/D3915
-
Boris Feld authored
If you don't read any data, read density should be 1.
-
- Jun 21, 2018
-
-
Paul Morelle authored
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.
-
- Jul 09, 2018
-
-
Danny Hooper authored
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
-
- Jul 10, 2018
-
-
Boris Feld authored
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.
-
Boris Feld authored
After the density slicing is done, we enforce a maximum chunk size to avoid memory consumption issue.
-
- Jul 11, 2018
-
-
Boris Feld authored
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.
-
- Jul 10, 2018
-
-
Boris Feld authored
We are going to introduce another slicing step. We start by extracting the existing one into its own function.
-
Boris Feld authored
-
Boris Feld authored
-
Boris Feld authored
-
Boris Feld authored
This will be used in various function doctest added in the next changesets. The class seems small enough to live in the module directly.
-