revset: narrow the subset using smartset operation in roots()
We were manually creating a base with explicit subset testing. We should let
smartset magic happen and optimise that logic if needed.
benchmark show some massive speedup when "parents set" is huge and "subset" is
small.
revset: 42:68 and roots(42:tip)
0) wall 0.011322 comb 0.010000 user 0.010000 sys 0.000000 (best of 161)
1) wall 0.002282 comb 0.010000 user 0.010000 sys 0.000000 (best of 1082)
Minor speedup in simple case (were fullreposet helps)
revset: roots(0::tip)
0) wall 0.095688 comb 0.100000 user 0.100000 sys 0.000000 (best of 85)
1) wall 0.084448 comb 0.080000 user 0.080000 sys 0.000000 (best of 95)
revset: roots((0:tip)::)
0) wall 0.146752 comb 0.140000 user 0.140000 sys 0.000000 (best of 58)
1) wall 0.143538 comb 0.140000 user 0.140000 sys 0.000000 (best of 59)
And small overhead then the "parents set" is fairly complicated (transforming it
into a revset once and for all appears to be faster).
revset: roots((tip~100::) - (tip~100::tip))
0) wall 0.004652 comb 0.010000 user 0.010000 sys 0.000000 (best of 544)
1) wall 0.004878 comb 0.010000 user 0.010000 sys 0.000000 (best of 479)
revset: roots((0::) - (0::tip))
0) wall 0.146587 comb 0.150000 user 0.150000 sys 0.000000 (best of 53)
1) wall 0.157192 comb 0.160000 user 0.160000 sys 0.000000 (best of 53)
revset: first(roots((0::) - (0::tip)))
0) wall 0.152924 comb 0.150000 user 0.150000 sys 0.000000 (best of 57)
1) wall 0.153192 comb 0.160000 user 0.160000 sys 0.000000 (best of 55)
context: make warning message for hidden revision extensible
Extensions might want to create new filternames and change what revisions
are considered hidden or shown. This is the case for inhibit that enables
direct access to hidden hashes with the visible-directaccess-nowarn filtername.
By using startswith instead of a direct comparison with 'visible' we
allow extensions to do that and not work directly on the 'visible' filtername
used by core.
bundlerepo: remove unused 'repo' parameter
Revision
7c231754a621 (filelog: add file function to open other
filelogs, 2011-05-10) added a _file() method to revlog, which also
required a 'repo' parameter to be added to bundlefilelog's
constructor. The _file() method was then removed in
b95a5bb58653
(filelog: remove unused _file method, 2015-01-22), which made the
constructor parameter unused, so let's remove that too.
histedit: fix --edit-plan
--edit-plan was completely broken from the command line because it used an old
api that was not updated (it would crash with a stack trace). Let's update it
and add tests to catch this.
localrepo: eliminate local requirements var in init
Localrepo's __init__ function creates a local requirements set to add to before
it replaces the instance's set with it. This is unnecessary, so let's just
use the instance's set directly.
localrepo: rename requirements parameter in stream_in()
To avoid confusion from overloading of the variable name "requirements", the
requirements is renamed to remotereqs for localrepo's stream_in() function.
localrepo: have stream_in() not modify its argument
Localrepo's stream_in function modified its requirements argument. This is not
good practice because it may be unexpected behavior to the caller.