Jun Wu <quark@fb.com> [Fri, 02 Sep 2016 15:20:59 +0100] rev 29861
annotate: pre-calculate the "needed" dictionary (
issue5360)
The "needed" dict is used as a reference counter to free items in the giant
"hist" dict. However, currently it is not very accurate and can lead to
dropping "hist" items unnecessarily, for example, with the following DAG,
-3-
/ \
0--1--2--4--
The current algorithm will visit and calculate rev 1 twice, undesired. And
it tries to be smart by clearing rev 1's parents: "pcache[1] = []" at the
time hist[1] being accessed (note: hist[1] needs to be used twice, by rev 2
and rev 3). It can result in incorrect results if p1 of rev 4 deletes chunks
belonging to rev 0.
However, simply removing "needed" is not okay, because it will consume 10x
memory:
# without any change
% HGRCPATH= lrun ./hg annotate mercurial/commands.py -r d130a38 3>&2 [1]
MEMORY
49074176
CPUTIME 9.213
REALTIME 9.270
# with "needed" removed
MEMORY
637673472
CPUTIME 8.164
REALTIME 8.249
This patch moves "needed" (and "pcache") calculation to a separate DFS to
address the issue. It improves perf and fixes
issue5360 by correctly reusing
hist, while maintaining low memory usage. Some additional attempt has been
made to further reduce memory usage, like changing "pcache[f] = []" to "del
pcache[f]". Therefore the result can be both faster and lower memory usage:
# with this patch applied
MEMORY
47575040
CPUTIME 7.870
REALTIME 7.926
[1]: lrun is a lightweight sandbox built on Linux cgroup and namespace. It's
used to measure CPU and memory usage here. Source code is available at
github.com/quark-zju/lrun.
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 22 Aug 2016 19:47:34 -0700] rev 29860
help: document wire protocol transport protocols
The HTTP and SSH transport protocols are documented. This
includes how commands and arguments are serialized as well as
response types.
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 22 Aug 2016 19:46:39 -0700] rev 29859
help: internals topic for wire protocol
The Mercurial wire protocol is under-documented. This includes a lack
of source docstrings and comments as well as pages on the official
wiki.
This patch adds the beginnings of "internals" documentation on the
wire protocol.
The documentation should have nearly complete coverage on the
lower-level parts of the protocol, such as the different transport
mechanims, how commands and arguments are sent, capabilities, and,
of course, the commands themselves.
As part of writing this documentation, I discovered a number of
deficiencies in the protocol and bugs in the implementation. I've
started sending patches for some of the issues. I hope to send a lot
more.
This patch starts with the scaffolding for a new internals page.
Yuya Nishihara <yuya@tcha.org> [Thu, 18 Aug 2016 15:13:56 +0900] rev 29858
grep: add formatter support
Several fields are renamed to be consistent with the annotate command, which
doesn't mean the last call for the name unification [1]. Actually, I'd rather
rename line_number to linenumber, linenum, lineno or line, but I want to
port the grep command to formatter first.
[1]: https://www.mercurial-scm.org/wiki/GenericTemplatingPlan#Dictionary
I don't have any better name for the list of matched/unmatched texts, so
they are just called as "texts".
Yuya Nishihara <yuya@tcha.org> [Thu, 18 Aug 2016 14:52:06 +0900] rev 29857
grep: build list of all columns regardless of display options
These columns should always be available in JSON or template outputs. The
"change" column is excluded because it has no useful data unless --all is
specified.
Yuya Nishihara <yuya@tcha.org> [Thu, 18 Aug 2016 14:23:29 +0900] rev 29856
grep: build list of columns without "grep." label prefix
Prepares for formatter support. We need field names without "grep.".
Yuya Nishihara <yuya@tcha.org> [Thu, 18 Aug 2016 14:09:49 +0900] rev 29855
grep: factor out function that prints matched line with labels
Prepares for formatter support.
Yuya Nishihara <yuya@tcha.org> [Thu, 18 Aug 2016 14:03:25 +0900] rev 29854
grep: refactor loop that yields matched text with label
As preparation for formatter support, this and the next patch split
linestate.__iter__() into two functions, line scanner and displayer.
New code uses regexp.search(str, pos) in place of regexp.search(substr),
which appears to fix a bug of highlighting.
Kevin Bullock <kbullock@ringworld.org> [Thu, 01 Sep 2016 14:01:43 -0500] rev 29853
Added signature for changeset
ccd436f7db6d
Kevin Bullock <kbullock@ringworld.org> [Thu, 01 Sep 2016 14:01:37 -0500] rev 29852
Added tag 3.9.1 for changeset
ccd436f7db6d
Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp> [Thu, 01 Sep 2016 13:16:55 -0500] rev 29851
bundle2: localize handleoutput remote prompts
Code archaeology suggests that there was no good reason for this not to
be localized. 'remote: ' is already localized elsewhere.
Wagner Bruna <wbruna@softwareexpress.com.br> [Wed, 31 Aug 2016 13:58:33 -0300] rev 29850
i18n-pt_BR: synchronized with
a12d13eac513
liscju <piotr.listkiewicz@gmail.com> [Tue, 05 Jul 2016 09:37:07 +0200] rev 29849
files: change documentation to match its behaviour (
issue5276)
Documentation gave the usage pattern as '[OPTION]... [PATTERN]...'
when the command match given files as relpaths by default.
Matt Mackall <mpm@selenic.com> [Wed, 24 Aug 2016 17:43:45 -0700] rev 29848
templater: add template path to __base__ search
This does a fall-back check for style files or directories that are
in Mercurial's template path for user convenience.
We intentionally don't use this for the built-in coal style because we don't
want the style to mysteriously break if the working directory just
happens to have a file named "paper".