<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Apr 11, 2017 at 6:09 AM, Denis Laxalde <span dir="ltr"><<a href="mailto:denis@laxalde.org" target="_blank">denis@laxalde.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Denis Laxalde <<a href="mailto:denis.laxalde@logilab.fr">denis.laxalde@logilab.fr</a>><br>
# Date 1491838600 -7200<br>
#      Mon Apr 10 17:36:40 2017 +0200<br>
# Node ID 4895e777df5cc64eccd038d71a9f9a<wbr>5b969a5ea0<br>
# Parent  a24bf350ea723273831d6531a1345e<wbr>d458312126<br>
# Available At <a href="http://hg.logilab.org/users/dlaxalde/hg" rel="noreferrer" target="_blank">http://hg.logilab.org/users/<wbr>dlaxalde/hg</a><br>
#              hg pull <a href="http://hg.logilab.org/users/dlaxalde/hg" rel="noreferrer" target="_blank">http://hg.logilab.org/users/<wbr>dlaxalde/hg</a> -r 4895e777df5c<br>
hgweb: add a link to followlines in descending direction<br>
<br>
We change the content of the followlines popup to display two links inviting<br>
to follow the history of selected lines in ascending (as before) and<br>
descending directions. The popup now renders as:<br>
<br>
  follow history of lines <fromline>:<toline>:<br>
  <a href=...>ascending</a> / <a href=...>descending</a><br></blockquote><div><br></div><div>Cool feature!</div><div><br></div><div>I do wonder if "ascending" and "descending" are the best terms to expose to end-users in the HTML interface. For the revset it makes sense since it is operating on the DAG and various revsets need you to know the concept of a DAG. But for the web interface, I wonder if something like "older" and "newer" would be better. And perhaps the links could contain verbs. e.g. "show older" and "show newer."</div><div><br></div><div>Anyone else have any thoughts?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
diff --git a/mercurial/templates/static/<wbr>followlines.js b/mercurial/templates/static/<wbr>followlines.js<br>
--- a/mercurial/templates/static/<wbr>followlines.js<br>
+++ b/mercurial/templates/static/<wbr>followlines.js<br>
@@ -204,13 +204,23 @@ document.addEventListener('<wbr>DOMContentLoa<br>
         //   <div class="followlines-link"><br>
         var aDiv = document.createElement('div');<br>
         aDiv.classList.add('<wbr>followlines-link');<br>
-<br>
-        //     <a href="/log/<rev>/<file>?patch=<wbr>&linerange=..."><br>
-        var a = document.createElement('a');<br>
+        aDiv.textContent = 'follow history of lines ' + fromline + ':' + toline + ':';<br>
+        var linesep = document.createElement('br');<br>
+        aDiv.appendChild(linesep);<br>
+        //     link to "ascending" followlines<br>
+        var aAsc = document.createElement('a');<br>
         var url = targetUri + '?patch=&linerange=' + fromline + ':' + toline;<br>
-        a.setAttribute('href', url);<br>
-        a.textContent = 'follow lines ' + fromline + ':' + toline;<br>
-        aDiv.appendChild(a);<br>
+        aAsc.setAttribute('href', url);<br>
+        aAsc.textContent = 'ascending';<br>
+        aDiv.appendChild(aAsc);<br>
+        var sep = document.createTextNode(' / ');<br>
+        aDiv.appendChild(sep);<br>
+        //     link to "descending" followlines<br>
+        var aDesc = document.createElement('a');<br>
+        aDesc.setAttribute('href', url + '&descend=');<br>
+        aDesc.textContent = 'descending';<br>
+        aDiv.appendChild(aDesc);<br>
+<br>
         div.appendChild(aDiv);<br>
<br>
         return [div, button];<br>
______________________________<wbr>_________________<br>
Mercurial-devel mailing list<br>
<a href="mailto:Mercurial-devel@mercurial-scm.org">Mercurial-devel@mercurial-scm.<wbr>org</a><br>
<a href="https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel" rel="noreferrer" target="_blank">https://www.mercurial-scm.org/<wbr>mailman/listinfo/mercurial-<wbr>devel</a><br>
</blockquote></div><br></div></div>