Yuya Nishihara <yuya@tcha.org> [Sun, 02 Apr 2017 22:43:18 +0900] rev 31805
formatter: reorder code that builds template mapping
This makes the future patch slightly simpler.
Jun Wu <quark@fb.com> [Sun, 02 Apr 2017 18:40:13 -0700] rev 31804
revlog: avoid applying delta chain on cache hit
Previously, revlog.revision(raw=False) may try to apply the delta chain
on _cache hit. That happens if flags are non-empty. This patch makes rawtext
reused so delta chain application is avoided.
"_cache" and "rev" are moved a bit to avoid unnecessary assignments.
Jun Wu <quark@fb.com> [Sun, 02 Apr 2017 18:29:24 -0700] rev 31803
revlog: indent block to make review easier
Jun Wu <quark@fb.com> [Sun, 02 Apr 2017 18:25:12 -0700] rev 31802
revlog: avoid calculating "flags" twice in revision()
This is more consistent with other code in "revision()" - prefer performance
to code length.
Jun Wu <quark@fb.com> [Sun, 02 Apr 2017 18:57:03 -0700] rev 31801
revlog: use raw revision for rawsize
When writing the revlog-ng index, the third field is len(rawtext). See
revlog._addrevision:
textlen = len(rawtext)
....
e = (offset_type(offset, flags), l, textlen,
base, link, p1r, p2r, node)
self.index.insert(-1, e)
Therefore, revlog.index[rev][2] returned by revlog.rawsize should be
len(rawtext), where "rawtext" is revlog.revision(raw=True).
Unfortunately it's hard to add a test for this code path because "if l >= 0"
catches most cases.
Yuya Nishihara <yuya@tcha.org> [Sat, 14 May 2016 20:51:57 +0900] rev 31800
revsetlang: enable optimization of 'x + y' expression
It's been disabled since 4d1e56b29a91, but it can be enabled now as the
ordering requirement is resolved at analyze().