Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.3rc1, 0.3, and 0.4rc1

nautilus: show file's last commit info in property page

Changeset 3b3ea8aa3d14

Parent e5d92b531b70

by Steve Borho

Changes to one file · Browse files at 3b3ea8aa3d14 Showing diff from parent e5d92b531b70 Diff from another changeset...

 
19
20
21
 
22
23
24
 
493
494
495
496
497
 
 
 
 
 
 
 
498
 
499
500
501
 
505
506
507
508
 
509
510
511
512
513
514
515
516
517
518
519
520
 
 
 
 
 
 
 
 
521
522
523
 
19
20
21
22
23
24
25
 
494
495
496
 
 
497
498
499
500
501
502
503
504
505
506
507
508
 
512
513
514
 
515
516
517
518
519
520
 
 
 
 
 
 
 
521
522
523
524
525
526
527
528
529
530
531
@@ -19,6 +19,7 @@
 import subprocess  import sys  import tempfile +import time  import urllib    TORTOISEHG_PATH = '~/tools/tortoisehg-dev' @@ -493,9 +494,15 @@
  emblem, status = self._get_file_status(repo, localpath)     # Get the information from Mercurial - ctx = repo.changectx() - rev = ctx.rev() + ctx = repo.workingctx().parents()[0] + try: + fctx = ctx.filectx(localpath) + rev = fctx.filelog().linkrev(fctx.filenode()) + except: + 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]))   parents = '\n'.join([short(p.node()) for p in ctx.parents()])   description = ctx.description()   user = ctx.user() @@ -505,19 +512,20 @@
    self.property_label = gtk.Label('Mercurial')   - table = gtk.Table(5, 2, False) + table = gtk.Table(7, 2, False)   table.set_border_width(5)   table.set_row_spacings(5)   table.set_col_spacings(5)     self.__add_row(table, 0, '<b>Status</b>:', status) - self.__add_row(table, 1, '<b>Revision</b>:', str(rev)) - self.__add_row(table, 2, '<b>Description</b>:', description) - self.__add_row(table, 3, '<b>Tags</b>:', tags) - self.__add_row(table, 4, '<b>Node</b>:', node) - self.__add_row(table, 5, '<b>Parents</b>:', parents) - self.__add_row(table, 6, '<b>User</b>:', user) - self.__add_row(table, 7, '<b>Branch</b>:', branch) + self.__add_row(table, 1, '<b>Last-Commit-Revision</b>:', str(rev)) + self.__add_row(table, 2, '<b>Last-Commit-Description</b>:', description) + self.__add_row(table, 3, '<b>Last-Commit-Date</b>:', date) + self.__add_row(table, 4, '<b>Last-Commit-User</b>:', user) + if tags: + self.__add_row(table, 5, '<b>Tags</b>:', tags) + if branch != 'default': + self.__add_row(table, 6, '<b>Branch</b>:', branch)     table.show()