Fri, 02 Sep 2016 15:20:59 +0100 annotate: pre-calculate the "needed" dictionary (issue5360) stable
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.
Mon, 22 Aug 2016 19:47:34 -0700 help: document wire protocol transport protocols
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.
Mon, 22 Aug 2016 19:46:39 -0700 help: internals topic for wire protocol
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.
Thu, 18 Aug 2016 15:13:56 +0900 grep: add formatter support
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".
Thu, 18 Aug 2016 14:52:06 +0900 grep: build list of all columns regardless of display options
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.
Thu, 18 Aug 2016 14:23:29 +0900 grep: build list of columns without "grep." label prefix
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.".
Thu, 18 Aug 2016 14:09:49 +0900 grep: factor out function that prints matched line with labels
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.
Thu, 18 Aug 2016 14:03:25 +0900 grep: refactor loop that yields matched text with label
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.
Thu, 01 Sep 2016 14:01:43 -0500 Added signature for changeset ccd436f7db6d stable
Kevin Bullock <kbullock@ringworld.org> [Thu, 01 Sep 2016 14:01:43 -0500] rev 29853
Added signature for changeset ccd436f7db6d
Thu, 01 Sep 2016 14:01:37 -0500 Added tag 3.9.1 for changeset ccd436f7db6d stable
Kevin Bullock <kbullock@ringworld.org> [Thu, 01 Sep 2016 14:01:37 -0500] rev 29852
Added tag 3.9.1 for changeset ccd436f7db6d
(0) -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 +10000 tip