[PATCH 4 of 4] hgweb: add a link to followlines in descending direction

Denis Laxalde denis at laxalde.org
Mon Apr 17 04:39:40 EDT 2017


Gregory Szorc a écrit :
>> # HG changeset patch
>> # User Denis Laxalde <denis.laxalde at logilab.fr>
>> # Date 1491838600 -7200
>> #      Mon Apr 10 17:36:40 2017 +0200
>> # Node ID 4895e777df5cc64eccd038d71a9f9a5b969a5ea0
>> # Parent  a24bf350ea723273831d6531a1345ed458312126
>> # Available At http://hg.logilab.org/users/dlaxalde/hg
>> #              hg pull http://hg.logilab.org/users/dlaxalde/hg -r
>> 4895e777df5c
>> hgweb: add a link to followlines in descending direction
>>
>> We change the content of the followlines popup to display two links
>> inviting
>> to follow the history of selected lines in ascending (as before) and
>> descending directions. The popup now renders as:
>>
>>   follow history of lines <fromline>:<toline>:
>>   <a href=...>ascending</a> / <a href=...>descending</a>
>>
>
> How difficult would it be to not render the "descending" link when we're
> already looking at the latest changeset / file revision? As it is today,
> the "descending" link goes to a blank page.
>

Because we're on the client side, that would require a fair amount of
extra machinery I'd say. Namely, we'd need to query a dedicated server
endpoint with the information provided by the user (file, revision, line
range) before displaying the link. We may avoid displaying the link when
at the last revision of the filelog but that would also require
additional logic on the web command and that would not work when at a
revision from which the selected line range has not be touched.

Maybe we can display an informative message in the target page when
there's no revision to display? (Similar to what you get when a search
query yields no result.)



More information about the Mercurial-devel mailing list