Mercurial > hg
diff mercurial/templates/spartan/map @ 23740:9e1f4c65f5f5
hgweb: allow viewing diffs against p1 or p2 for merge commits (issue3904)
This adds UI portion of the feature that has resided in mercurial since 2012.
Back then the interface was added together with the code, but was shortly
backed out because it was deemed "not ready". Code, however, stayed.
For the original feature and its implementation, see issue2810 and
d605a82cf189.
In short, the backed-out interface had two outstanding issues:
1. it was introducing an entirely new term (baseline) and
2. it was present on every changeset's page, even for changesets with 1 parent
(or no parents), which didn't make sense
This patch implements a hopefully better interface because:
1. it uses the usual terms (diff) and
2. it only shows up when there actually are 2 parents.
author | Anton Shestakov <engored@ya.ru> |
---|---|
date | Sat, 03 Jan 2015 17:50:21 +0800 |
parents | 9409aeaafdc1 |
children | 1cac419ab831 |
line wrap: on
line diff
--- a/mercurial/templates/spartan/map Sun Dec 21 14:34:07 2014 -0800 +++ b/mercurial/templates/spartan/map Sat Jan 03 17:50:21 2015 +0800 @@ -68,18 +68,25 @@ difflineminus = '<span class="minusline"><a class="lineno" href="#{lineid}" id="{lineid}">{linenumber}</a>{line|escape}</span>' difflineat = '<span class="atline"><a class="lineno" href="#{lineid}" id="{lineid}">{linenumber}</a>{line|escape}</span>' diffline = '<a class="lineno" href="#{lineid}" id="{lineid}">{linenumber}</a>{line|escape}' +changesetlink = '<a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a>' changelogparent = ' <tr> <th class="parent">parent {rev}:</th> <td class="parent"> - <a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a> + {changesetlink} </td> </tr>' changesetparent = ' <tr> <th class="parent">parent {rev}:</th> - <td class="parent"><a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td> + <td class="parent">{changesetlink}</td> </tr>' +changesetparentdiff = ' + <tr> + <th class="parent">parent {rev}:</th> + <td class="parent">{changesetlink} {ifeq(node, basenode, '(current diff)', '({difffrom})')}</td> + </tr>' +difffrom = '<a href="{url|urlescape}rev/{node|short}:{originalnode|short}{sessionvars%urlparameter}">diff</a>' filerevparent = ' <tr> <td class="metatag">parent:</td>