Mercurial > hg
diff mercurial/templates/gitweb/map @ 36233:7ec5925c971e
hgweb: show dates recorded in obsolescence markers
Dates of operations that obsolete commits are also important enough to be
shown, but maybe not as important as original commit dates, that and also for
brevity is why they are wrapped in a <span> with only "age" class. Provided
that JS is enabled, such elements only show age (e.g. "3 months ago"), and the
exact date is visible in a tooltip. Commits dates, on the other hand, show both
date and age (the latter in parenthesis).
Example result for f1a0933ce59e from hg-committed:
obsolete: pruned by Yuya Nishihara <yuya@tcha.org> 13 days ago
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Thu, 15 Feb 2018 21:14:57 +0800 |
parents | 513d268eddfe |
children | f3fd4fe0506f |
line wrap: on
line diff
--- a/mercurial/templates/gitweb/map Thu Feb 15 21:05:31 2018 +0800 +++ b/mercurial/templates/gitweb/map Thu Feb 15 21:14:57 2018 +0800 @@ -276,7 +276,8 @@ obsfateverb = '{obsfateverb(successors, markers)}' obsfateoperations = '{if(obsfateoperations(markers), ' using {join(obsfateoperations(markers), ', ')}')}' obsfateusers = '{if(obsfateusers(markers), ' by {join(obsfateusers(markers)%'{user|obfuscate}', ', ')}')}' -obsfateentry = '{obsfateverb}{obsfateoperations}{obsfatesuccessors}{obsfateusers}' +obsfatedate = '{if(obsfatedate(markers), ' {ifeq(min(obsfatedate(markers)), max(obsfatedate(markers)), '<span class="age">{min(obsfatedate(markers))|rfc822date}</span>', 'between <span class="age">{min(obsfatedate(markers))|rfc822date}</span> and <span class="age">{max(obsfatedate(markers))|rfc822date}</span>')}')}' +obsfateentry = '{obsfateverb}{obsfateoperations}{obsfatesuccessors}{obsfateusers}{obsfatedate}' shortlogentry = ' <tr class="parity{parity}"> <td class="age"><i class="age">{date|rfc822date}</i></td>