branchmap: do not specify changelog as an argument
Since (unfiltered)repo.changelog lookup gets as fast as __dict__ lookup,
there's no point to pass in changelog instance.
$ hg perfbranchmap --clear-revbranch -R mozilla-central
! base
(orig) wall 20.593091 comb 20.600000 user 20.520000 sys 0.080000 (best of 3)
(this) wall 20.129126 comb 20.130000 user 20.020000 sys 0.110000 (best of 3)
This backs out most of the changes in
76d4272bd57b and
47c03042cd1d.
filecache: unimplement __set__() and __delete__() (API)
Implementing __set__() implies that the descriptor can't be overridden by
obj.__dict__, which means any property access involves slow function call.
"Data descriptors with __set__() and __get__() defined always override
a redefinition in an instance dictionary. In contrast, non-data descriptors
can be overridden by instances."
https://docs.python.org/2.7/reference/datamodel.html#invoking-descriptors
This patch basically backs out
236bb604dc39, "scmutil: update cached copy
when filecached attribute is assigned (
issue3263)." The problem described
in
issue3263 (which is #3264 in Bugzilla) should no longer happen since
repo._bookmarkcurrent has been moved to repo._bookmarks.active. We still
have a risk of introducing similar bugs, but I think that's the cost we
have to pay.
$ hg perfrevset 'branch(tip)' -R mercurial
(orig) wall 0.139511 comb 0.140000 user 0.140000 sys 0.000000 (best of 66)
(prev) wall 0.114195 comb 0.110000 user 0.110000 sys 0.000000 (best of 81)
(this) wall 0.099038 comb 0.110000 user 0.100000 sys 0.010000 (best of 93)
filecache: use try-except for faster __dict__ lookup
Python function call is slow, and the cost could be significant here.
$ hg perfrevset 'branch(tip)' -R mercurial
(orig) wall 0.139511 comb 0.140000 user 0.140000 sys 0.000000 (best of 66)
(this) wall 0.114195 comb 0.110000 user 0.110000 sys 0.000000 (best of 81)
crecord: make nextsametype() check that parent item exists (
issue6009)
Items that represent files in curses interface don't have parents.
help: describe what ui.tweakdefaults changes, concretely
Currently, one has to look at the code.
A couple things are suboptimal:
- probably not translatable
- lines don't get wrapped (a couple are a bit too long)
but it seems to better this way than without help at all.
Differential Revision: https://phab.mercurial-scm.org/D5187
logexchange: convert paths to unix when detecting the active path
This fixes the problem in the tests[1] where Windows was showing the whole path
as the remotename for local repositories.
Somebody with a better understanding of this extension should probably take a
deeper look. There may be other cases that need to be converted- specifically
the `elif not instance` and the missing `else` cases in activepath(). I also
noticed when adding debug prints that the absolute path is stored in the file,
probably not normalized. (It's wrapped up in $TESTTMP.)
[1] https://buildbot.mercurial-scm.org/builders/Win7%20x86_64%20hg%20tests/builds/1042/steps/run-tests.py%20%28python%202.7.13%29/logs/stdio
help: update the default value specified for `profiling.time-track`
I tried conditionalizing this in a `.. container::` block, but that seemed to
add an extra blank line between the main text and the parenthetical.