Siddharth Agarwal <sid0@fb.com> [Fri, 20 Nov 2015 16:18:51 -0800] rev 27077
mergestate: add a function to return the number of unresolved files
Note that unlike the other functions, this is based on the persistent
mergestate.
Siddharth Agarwal <sid0@fb.com> [Fri, 20 Nov 2015 16:17:54 -0800] rev 27076
mergestate: add a method to return updated/merged/removed counts
This will not only allow us to remove a bunch of duplicate code in applyupdates
in an upcoming patch, it will also allow the resolve interface to be a lot
simpler: it doesn't need to return the dirstate action to applyupdates.
Siddharth Agarwal <sid0@fb.com> [Fri, 20 Nov 2015 16:32:47 -0800] rev 27075
mergestate._resolve: don't return the action any more
This is a partial backout of an earlier diff -- now that we're storing the
results in a dict, we don't actually need this any more.
Siddharth Agarwal <sid0@fb.com> [Fri, 20 Nov 2015 16:08:22 -0800] rev 27074
mergestate._resolve: store return code and action for each file
We're going to need this to compute (a) updated/merged/unresolved counts, and
(b) actions to perform on the dirstate.
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 21 Nov 2015 15:43:04 -0800] rev 27073
revsetbenchmarks: support benchmarking changectx loading
Many revset consumers construct changectx instances for each returned
result. Add support for benchmarking this to our revset benchmark
script.
In the future, we might want to have some kind of special syntax in
the parsed revset files to engage this mode automatically. This would
enable us to load changectxs for revsets that do that in the code and
would more accurately benchmark what's actually happening. For now,
running all revsets with or without changectxs is sufficient.
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 21 Nov 2015 15:39:18 -0800] rev 27072
perf: support obtaining contexts from perfrevset
Previously, perfrevset called repo.revs(), which only returns integer
revisions. Many revset consumers call repo.set(), which returns
changectx instances. Or they obtain a context manually later.
Since obtaining changectx instances when evaluating revsets is common,
this patch adds support for benchmarking this use case.
While we added an if conditional for every benchmark loop, it
doesn't appear to matter since revset evaluation dwarfs the cost
of a single if.
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 21 Nov 2015 11:07:30 -0800] rev 27071
localrepo: improve docstring for revset methods
revs() doesn't return a list. Also document what its arguments do.
Also clarify that set() is just a convenience wrapper around revs().
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 22 Nov 2015 16:23:20 -0800] rev 27070
revlog: improve documentation
There are a lot of functions and variables doing similar things.
Document the role and functionality of each to make it easier to
grok.
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 21 Nov 2015 22:28:01 -0800] rev 27069
demandimport: don't enable when running under PyPy
On demand importing doesn't work with PyPy for some reason. Don't honor
requests to enable demand importing when running under PyPy.
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 14 Nov 2015 17:14:14 -0800] rev 27068
ui.write: don't clear progress bar when writing to a buffer
ui.write() has 2 modes: buffered and unbuffered. In buffered mode, we
capture output before writing it. This is how changeset printing works,
for example.
Previously, we were potentially clearing the progress bar for every
call to ui.write(). In buffered mode, this clearing was useless because
the clearing function would be called again before actually writing
the buffered data.
This patch stops the useless calling of _progclear() unless we are
actually writing data. During changeset printing with the default
template, this removes ~6 function calls per changeset, making
changeset printing slightly faster.
before: 23.76s
after: 23.35s
delta: -0.41s (98.3% of original)