Patchwork [STABLE] monoblue: show relative age of bookmarks

login
register
mail settings
Submitter Anton Shestakov
Date July 24, 2015, 7:19 a.m.
Message ID <7f78c41324cf6efeef7a.1437722399@neuro>
Download mbox | patch
Permalink /patch/10057/
State Accepted
Headers show

Comments

Anton Shestakov - July 24, 2015, 7:19 a.m.
# HG changeset patch
# User Anton Shestakov <av6@dwimlabs.net>
# Date 1436764397 -28800
#      Mon Jul 13 13:13:17 2015 +0800
# Branch stable
# Node ID 7f78c41324cf6efeef7a4a86178d72e96a804f3c
# Parent  a74e9806d17d777595f02bef912da25b876cb56f
monoblue: show relative age of bookmarks

In b24e5a708fad, age calculation was made dynamic (i.e. in javascript), but for
some reason bookmarkentry template in monoblue/map got a wrong class. It
resulted in /summary and /bookmarks pages always showing exact dates for
bookmarks, no age calculation was performed. Let's fix this by using "age"
class that is already used in branchentry and tagentry templates in the same
map file.

As usual, the exact date for such elements is still available in title
attribute, so it shows in a tooltip on hover.
Matt Mackall - July 24, 2015, 3:37 p.m.
On Fri, 2015-07-24 at 15:19 +0800, Anton Shestakov wrote:
> # HG changeset patch
> # User Anton Shestakov <av6@dwimlabs.net>
> # Date 1436764397 -28800
> #      Mon Jul 13 13:13:17 2015 +0800
> # Branch stable
> # Node ID 7f78c41324cf6efeef7a4a86178d72e96a804f3c
> # Parent  a74e9806d17d777595f02bef912da25b876cb56f
> monoblue: show relative age of bookmarks

Queued for stable, thanks.

Patch

diff --git a/mercurial/templates/monoblue/map b/mercurial/templates/monoblue/map
--- a/mercurial/templates/monoblue/map
+++ b/mercurial/templates/monoblue/map
@@ -181,7 +181,7 @@  tagentry = '
 bookmarks = bookmarks.tmpl
 bookmarkentry = '
   <tr class="parity{parity}">
-    <td class="nowrap date">{date|rfc822date}</td>
+    <td class="nowrap age">{date|rfc822date}</td>
     <td><a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{bookmark|escape}</a></td>
     <td class="nowrap">
       <a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">changeset</a> |