- Jun 09, 2018
-
-
Yuya Nishihara authored
It's exactly the same as matchctx.
-
Yuya Nishihara authored
-
Yuya Nishihara authored
They are no longer needed since any files are included as long as they are passed in to the matcher.
-
Yuya Nishihara authored
This makes fileset expression open to any input, so that we can just say "hg status 'set: not binary()'" to select text files including unknowns. With this and removal of subset computation, 'set:**' becomes as fast as 'glob:**'. Further optimization will probably be possible by narrowing the file tree to compute status for example. This also fixes 'subrepo()' to not ignore the current mctx.subset. .. bc:: The fileset expression may include untracked files by default. Use ``tracked()`` to explicitly filter out files not existing at the context revision.
-
- Jul 10, 2018
-
-
Yuya Nishihara authored
Prepares for the upcoming API change. We'll no longer have to call the fileset function directly since the cost of the matcher-based fileset will become O(number of tests) from O(number of files in subset).
-
- Jun 10, 2018
-
-
Yuya Nishihara authored
This change is necessary to pass in a size expression to predicatematcher. See the next patch.
-
Yuya Nishihara authored
I'm going to rewrite filesets to be match predicates, which means basic patterns such as '*' will no longer be "closed" to the subset constructed from the ctx. Good thing is that 'hg status "set:not binary()"' can include unknown files out of the box, and fileset computation will likely to be faster as we won't have to walk dirstate twice, for example. Bad thing is that we can't select files at a certain revision by 'set:revs(REV, **)' since '**' is "open" to any paths. So, this patch introduces "tracked()" as a replacement for the '**' in the example above.
-
- Jun 09, 2018
-
-
Yuya Nishihara authored
New code is less efficient than the original, but it helps porting andset() to matcher composition. This will be cleaned up later. This effectively disables the fullmatchctx magic since mctx will never be demoted to the matchctx. The fullmatchctx class will be removed later.
-
- Jun 10, 2018
-
-
Yuya Nishihara authored
These functions will be used to compose a tree of matchers from a fileset expression.
-
- Jul 14, 2018
-
-
Yuya Nishihara authored
-
Yuya Nishihara authored
This function is intended to compute 'heads(::heads - roots::)', but it failed because 'heads + parents(roots)' missed sibling branches of the roots. That's why the public heads slipped down from D to B in the example added by 2a227782e754 "tests: add test demonstrating phase loss when cloning": > E draft > |\Z draft > | Y draft > D | public > | X draft > C/ public > B public > A public where heads = {E, Z}, roots = {X}
-
- Jul 15, 2018
-
-
Sushil Khanchi authored
Differential Revision: https://phab.mercurial-scm.org/D3947
-
- Jul 14, 2018
-
-
Sushil Khanchi authored
Removed unnecessary 'if confirm:' block as that thing is now handled at 'finally'. Differential Revision: https://phab.mercurial-scm.org/D3945
-
Sushil Khanchi authored
Before this patch, it was prompting the user in both cases 1) when there is no conflict 2) when there is at least one conflict. But for simplicity we can just abort if we hit a conflict and no need to prompt in that case. Differential Revision: https://phab.mercurial-scm.org/D3944
-
- Jul 12, 2018
-
-
Jörg Sonnenberger authored
Differential Revision: https://phab.mercurial-scm.org/D3933
-
- Jul 11, 2018
-
-
Gregory Szorc authored
The added tests demonstrate that phases exchange when using the listkeys based phases exchange fails to preserve public phase in a certain scenario when a merge is a phase root. Both non-bundle2 and bundle2 prior to the binary phase data part are buggy. Differential Revision: https://phab.mercurial-scm.org/D3932
-
- 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
-