Mercurial > hg
diff tests/test-obsolete.t @ 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 | ef7b48e6388d |
line wrap: on
line diff
--- a/tests/test-obsolete.t Thu Feb 15 21:05:31 2018 +0800 +++ b/tests/test-obsolete.t Thu Feb 15 21:14:57 2018 +0800 @@ -1050,19 +1050,19 @@ <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="obsoletetag" title="obsolete">obsolete</span> </span> $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=spartan' | grep 'class="obsolete"' <th class="obsolete">obsolete:</th> - <td class="obsolete">pruned by test</td> + <td class="obsolete">pruned by test <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></td> check an obsolete changeset that has been rewritten $ get-with-headers.py localhost:$HGPORT 'rev/cda648ca50f5?style=paper' | grep rewritten - <td>rewritten as <a href="/rev/3de5eca88c00?style=paper">3de5eca88c00</a> by test <test@example.net></td> + <td>rewritten as <a href="/rev/3de5eca88c00?style=paper">3de5eca88c00</a> by test <test@example.net> <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></td> $ get-with-headers.py localhost:$HGPORT 'rev/cda648ca50f5?style=coal' | grep rewritten - <td>rewritten as <a href="/rev/3de5eca88c00?style=coal">3de5eca88c00</a> by test <test@example.net></td> + <td>rewritten as <a href="/rev/3de5eca88c00?style=coal">3de5eca88c00</a> by test <test@example.net> <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></td> $ get-with-headers.py localhost:$HGPORT 'rev/cda648ca50f5?style=gitweb' | grep rewritten - <tr><td>obsolete</td><td>rewritten as <a class="list" href="/rev/3de5eca88c00?style=gitweb">3de5eca88c00</a> by test <test@example.net></td></tr> + <tr><td>obsolete</td><td>rewritten as <a class="list" href="/rev/3de5eca88c00?style=gitweb">3de5eca88c00</a> by test <test@example.net> <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></td></tr> $ get-with-headers.py localhost:$HGPORT 'rev/cda648ca50f5?style=monoblue' | grep rewritten - <dt>obsolete</dt><dd>rewritten as <a href="/rev/3de5eca88c00?style=monoblue">3de5eca88c00</a> by test <test@example.net></dd> + <dt>obsolete</dt><dd>rewritten as <a href="/rev/3de5eca88c00?style=monoblue">3de5eca88c00</a> by test <test@example.net> <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></dd> $ get-with-headers.py localhost:$HGPORT 'rev/cda648ca50f5?style=spartan' | grep rewritten - <td class="obsolete">rewritten as <a href="/rev/3de5eca88c00?style=spartan">3de5eca88c00</a> by test <test@example.net></td> + <td class="obsolete">rewritten as <a href="/rev/3de5eca88c00?style=spartan">3de5eca88c00</a> by test <test@example.net> <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></td> check changeset with instabilities