Jun Wu <quark@fb.com> [Wed, 29 Mar 2017 14:49:14 -0700] rev 31765
verify: fix length check
According to the document added above, we should check L1 == L2, and the
only way to get L1 in all cases is to call "rawsize()", and the only way to
get L2 is to call "revision(raw=True)". Therefore the fix.
Meanwhile there are still a lot of things about flagprocessor broken in
revlog.py. Tests will be added after revlog.py gets fixed.
Jun Wu <quark@fb.com> [Wed, 29 Mar 2017 14:45:01 -0700] rev 31764
verify: document corner cases
It seems a good idea to list all kinds of "surprises" and expected behavior
to make the upcoming changes easier to understand.
Note: the comment added does not reflect the actual behavior of the current
code.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 29 Mar 2017 22:26:16 +0200] rev 31763
hgweb: expose a followlines UI in filerevision view
In filerevision view (/file/<rev>/<fname>) we add some event listeners on
mouse clicks of <span> elements in the <pre class="sourcelines"> block.
Those listeners will capture a range of lines selected between two mouse
clicks and a box inviting to follow the history of selected lines will then
show up. Selected lines (i.e. the block of lines) get a CSS class which make
them highlighted. Selection can be cancelled (and restarted) by either
clicking on the cancel ("x") button in the invite box or clicking on any other
source line. Also clicking twice on the same line will abort the selection and
reset event listeners to restart the process.
As a first step, this action is only advertised by the "cursor: cell" CSS rule
on source lines elements as any other mechanisms would make the code
significantly more complicated. This might be improved later.
All JavaScript code lives in a new "linerangelog.js" file, sourced in
filerevision template (only in "paper" style for now).
Kostia Balytskyi <ikostia@fb.com> [Wed, 29 Mar 2017 05:31:31 -0700] rev 31762
shelve: move ui.quiet manipulations to configoverride
Jun Wu <quark@fb.com> [Thu, 30 Mar 2017 21:21:15 -0700] rev 31761
revlog: add a fast path for revision(raw=False)
If cache hit and flags are empty, no flag processor runs and "text" equals
to "rawtext". So we check flags, and return rawtext.
This resolves performance issue introduced by a previous patch.
Jun Wu <quark@fb.com> [Thu, 30 Mar 2017 18:38:03 -0700] rev 31760
revlog: make _addrevision only accept rawtext
All 3 users of _addrevision use raw:
- addrevision: passing rawtext to _addrevision
- addgroup: passing rawtext and raw=True to _addrevision
- clone: passing rawtext to _addrevision
There is no real user using _addrevision(raw=False). On the other hand,
_addrevision is low-level code dealing with raw revlog deltas and rawtexts.
It should not transform rawtext to non-raw text.
This patch removes the "raw" parameter from "_addrevision", and does some
rename and doc change to make it clear that "_addrevision" expects rawtext.
Archeology shows 2df983125d37 added "raw" flag to "_addrevision", follow-ups
e12c0fa1f65b and c1b7b2285522 seem to make the flag unnecessary.
test-revlog-raw.py no longer complains.