Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.6, 0.7, and 0.7.1

hggtk: display commit dates in local time

Changeset 7335932c6d07

Parent b1473f46bd61

by halim

Changes to 5 files · Browse files at 7335932c6d07 Showing diff from parent b1473f46bd61 Diff from another changeset...

 
21
22
23
 
24
25
26
 
513
514
515
516
 
517
518
519
 
21
22
23
24
25
26
27
 
514
515
516
 
517
518
519
520
@@ -21,6 +21,7 @@
 import tempfile  import time  import urllib +from hggtk.hglib import displaytime    TORTOISEHG_PATH = '~/tools/tortoisehg-dev'  TERMINAL_KEY = '/desktop/gnome/applications/terminal/exec' @@ -513,7 +514,7 @@
  rev = ctx.rev()   ctx = repo.changectx(rev)   node = short(ctx.node()) - date = time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime(ctx.date()[0])) + date = displaytime(ctx.date())   parents = '\n'.join([short(p.node()) for p in ctx.parents()])   description = ctx.description()   user = ctx.user()
 
22
23
24
25
 
26
27
28
29
30
31
 
120
121
122
123
 
124
125
126
 
22
23
24
 
25
26
27
 
28
29
30
 
119
120
121
 
122
123
124
125
@@ -22,10 +22,9 @@
 from mercurial import context, patch, revlog  from gdialog import *  from hgcmd import CmdDialog -from hglib import toutf, fromutf +from hglib import toutf, fromutf, displaytime  from gtklib import StatusBar   -  class ChangeSet(GDialog):   """GTK+ based dialog for displaying repository logs   """ @@ -120,7 +119,7 @@
    # TODO: Add toggle for gmtime/localtime   eob = buf.get_end_iter() - date = time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime(ctx.date()[0])) + date = displaytime(ctx.date())   if self.clipboard:   self.clipboard.set_text(short(ctx.node()))   change = str(rev) + ':' + short(ctx.node())
Change 1 of 2 Show Entire File hggtk/​datamine.py Stacked
 
14
15
16
17
 
18
19
20
 
148
149
150
151
 
152
153
154
 
14
15
16
 
17
18
19
20
 
148
149
150
 
151
152
153
154
@@ -14,7 +14,7 @@
 import threading, thread2  import time  from mercurial import hg, ui, util, revlog -from hglib import hgcmd_toq, toutf, fromutf, gettabwidth +from hglib import hgcmd_toq, toutf, fromutf, gettabwidth, displaytime  from gdialog import *  from vis import treemodel  from vis.colormap import AnnotateColorMap, AnnotateColorSaturation @@ -148,7 +148,7 @@
  author = util.shortuser(ctx.user())   summary = ctx.description().replace('\0', '')   summary = summary.split('\n')[0] - date = time.strftime("%y-%m-%d %H:%M", time.gmtime(ctx.date()[0])) + date = displaytime(ctx.date())   desc = author+'@'+str(rev)+' '+date+' "'+summary+'"'   self.changedesc[rev] = (desc, author)   return (desc, author)
Change 1 of 1 Show Entire File hggtk/​hglib.py Stacked
 
387
388
389
 
 
 
 
387
388
389
390
391
392
@@ -387,3 +387,6 @@
  q.put(str(a))   u = Qui()   return thgdispatch(u, path, list(args)) + +def displaytime(date): + return util.datestr(date, '%Y-%m-%d %H:%M:%S %1%2')
 
10
11
12
13
14
15
16
 
23
24
25
26
 
27
28
29
 
30
31
32
 
128
129
130
131
 
132
133
134
 
10
11
12
 
13
14
15
 
22
23
24
 
25
26
27
 
28
29
30
31
 
127
128
129
 
130
131
132
133
@@ -10,7 +10,6 @@
 import gtk  import gobject  import re -from time import (strftime, gmtime)  from mercurial import util  from mercurial.node import short  from mercurial.hgweb import webutil @@ -23,10 +22,10 @@
 # Besides, we want to be compatible older Python versions.  try:   # when history.py is invoked directly - from hglib import toutf + from hglib import toutf, displaytime  except ImportError:   # when history.py is imported and called from hgproc.py - from hggtk.hglib import toutf + from hggtk.hglib import toutf, displaytime    # treemodel row enumerated attributes  LINES = 0 @@ -128,7 +127,7 @@
  else:   author = toutf(util.shortuser(ctx.user()))   - date = strftime("%Y-%m-%d %H:%M:%S", gmtime(ctx.date()[0])) + date = displaytime(ctx.date())     wc_parent = revid in self.parents   head = revid in self.heads