Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 18 Nov 2015 23:23:03 -0800] rev 27028
revset: speed up '_matchfiles'
File matching is done by applying the matcher to all elements in the 'file'
field of all changesets in the repository. This requires to read/parse all
changesets in the repository and do a lot of matching. However about 1/3 of the
time of the function is used to create 'changectx' object and retrieve their
'file' field.
This is far too much overhead so we are skipping the changectx layer and
directly access the data from the changelog. This provide use significant speed
up:
repository: mozilla central 252524 revisions
command: hg perfrevset '_matchfiles("p:browser")'
Before: 15.899687s
After: 10.011705s
Slowdown is even more significant if you have a lot of namespace that slowdown
lookup.
The time is now spent with this approximate repartition:
Matcher: 20%
regexp matching: 10%
changelog.read: 80%
reading revision: 60%
checking hash: 15%
decompression: 15%
reading chunk: 30%
changelog parsing: 20%
decoding to local: 10%
The next easy win is probably to have more of the changelog stack implemented
using the CPython api.
Siddharth Agarwal <sid0@fb.com> [Wed, 18 Nov 2015 15:46:45 -0800] rev 27027
mergestate: handle additional record types specially
This works around a bug in older Mercurial versions' handling of the v2 merge
state.
We also add a bunch of tests that make sure that
(1) we correctly abort when the merge state has an unsupported record type
(2) aborting the merge, rebase or histedit continues to work and clears out the
merge state.
Siddharth Agarwal <sid0@fb.com> [Wed, 18 Nov 2015 23:42:32 -0800] rev 27026
test-resolve.t: remove completely unnecessary line
I have no idea what I was thinking when I wrote this.
Siddharth Agarwal <sid0@fb.com> [Wed, 18 Nov 2015 23:43:18 -0800] rev 27025
resolve: fix incorrect merge
The merge from stable into default was semantically incomplete -- a couple of
changes in preceding code had to be rewritten here.
This code only triggers for change/delete conflicts, so we can't test it yet.
We will soon be able to do it, though.
liscju <piotr.listkiewicz@gmail.com> [Wed, 18 Nov 2015 20:55:32 +0100] rev 27024
fileset: add missing() predicate (
issue4925)
Help of status cmd defines status file of 'missing', what is
called in fileset 'deleted'. To stay consistent this patch
introduces missing() predicate which in fact is alias to
'deleted'.
Anton Shestakov <av6@dwimlabs.net> [Tue, 10 Nov 2015 17:22:40 +0800] rev 27023
webutil: make _siblings into an object with __iter__ and __len__
_siblings is a helper that is used for displaying changeset parents and
children in hgweb. Before, when it was a simple generator, it couldn't tell its
length without being consumed, and that required a special case when preparing
data for changeset template (see
9e1f4c65f5f5).
Let's make it into a class (similar to templatekw._hybrid) that allows len(...)
without side-effects.
Siddharth Agarwal <sid0@fb.com> [Wed, 18 Nov 2015 16:39:30 -0800] rev 27022
mergestate: move binary format documentation into _readrecordsv2
This is too low-level to be the top-level documentation for mergestate. We're
restricting the top-level documentation to only be about what consumers of the
mergestate and anyone extending it need to care about.
Siddharth Agarwal <sid0@fb.com> [Wed, 18 Nov 2015 15:11:23 -0800] rev 27021
unshelve: add support for custom merge tools
For parity with merge --tool, rebase --tool etc.
rebase.rebase overwrites the tool in repo.ui, so we need to explicitly pass it
down there too.
Siddharth Agarwal <sid0@fb.com> [Wed, 18 Nov 2015 15:18:16 -0800] rev 27020
unshelve: shed spurious space
Siddharth Agarwal <sid0@fb.com> [Wed, 18 Nov 2015 15:04:03 -0800] rev 27019
unshelve: add -k as short form of --keep
For parity with strip -k, rebase -k, etc.
Yuya Nishihara <yuya@tcha.org> [Sun, 01 Nov 2015 13:55:21 +0900] rev 27018
import-checker: allow symbol imports from hgweb.common and .request
This seems the convention of hgweb.
Matt Mackall <mpm@selenic.com> [Thu, 19 Nov 2015 15:02:27 -0600] rev 27017
perf: un-bitrot perfstatus
Matt Mackall <mpm@selenic.com> [Thu, 19 Nov 2015 13:15:17 -0600] rev 27016
util: drop statmtimesec
We've globablly forced stat to return integer times which agrees with
our extension code, so this is no longer needed.
This speeds up status on mozilla-central substantially:
$ hg perfstatus
! wall 0.190179 comb 0.180000 user 0.120000 sys 0.060000 (best of 53)
$ hg perfstatus
! wall 0.275729 comb 0.270000 user 0.210000 sys 0.060000 (best of 36)
Matt Mackall <mpm@selenic.com> [Thu, 19 Nov 2015 13:21:24 -0600] rev 27015
util: disable floating point stat times (
issue4836)
Alternate fix for this issue which avoids putting extra function calls
and exception handling in the fast path.
For almost all purposes, integer timestamps are preferable to
Mercurial. It stores integer timestamps in the dirstate and would thus
like to avoid doing any float/int comparisons or conversions. We will
continue to have to deal with 1-second granularity on filesystems for
quite some time, so this won't significantly hinder our capabilities.
This has some impact on our file cache validation code in that it
lowers timestamp resolution. But as we still have to deal with
low-resolution filesystems, we're not relying on this anyway.
An alternate approach is to use stat[ST_MTIME], which is guaranteed to
be an integer. But since this support isn't already in our extension,
we can't depend on it being available without adding a hard Python->C
API dependency that's painful for people like yours truly who have
bisect regularly and people without compilers.
Laurent Charignon <lcharignon@fb.com> [Wed, 18 Nov 2015 15:58:06 -0800] rev 27014
rebase: refactoring to avoid repetition of expression
This patch removes the repetition of "(revignored, revprecursor, revpruned)"
and replaces its occurences with the more legible "revskipped".
Laurent Charignon <lcharignon@fb.com> [Wed, 18 Nov 2015 16:06:00 -0800] rev 27013
rebase: remove an unused todo
Since we handled skipping obsolete revs when it is relevant, this todo is no
longer useful. We replace the comment with two useful comments.