Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0, 1.0.1, and 1.0.2

csinfo: add support for p4 changeset info in extras

When browsing a repository that was converted from perforce, this will show the
source changelist number.

Changeset ff43b0d8cb49

Parent 0d0955c1e3fb

by Steve Borho

Changes to one file · Browse files at ff43b0d8cb49 Showing diff from parent 0d0955c1e3fb Diff from another changeset...

 
20
21
22
23
 
24
25
26
 
200
201
202
203
 
 
204
205
206
 
282
283
284
 
 
 
285
286
287
 
329
330
331
332
 
333
334
335
 
20
21
22
 
23
24
25
26
 
200
201
202
 
203
204
205
206
207
 
283
284
285
286
287
288
289
290
291
 
333
334
335
 
336
337
338
339
@@ -20,7 +20,7 @@
   from tortoisehg.hgtk import gtklib   -PANEL_DEFAULT = ('rev', 'summary', 'user', 'dateage', 'branch', 'tags', 'transplant') +PANEL_DEFAULT = ('rev', 'summary', 'user', 'dateage', 'branch', 'tags', 'transplant', 'p4')    def create(repo, target=None, style=None, custom=None, **kargs):   return Factory(repo, custom, style, target, **kargs)() @@ -200,7 +200,8 @@
  'user': _('User:'), 'date': _('Date:'),'age': _('Age:'),   'dateage': _('Date:'), 'branch': _('Branch:'),   'tags': _('Tags:'), 'rawbranch': _('Branch:'), - 'rawtags': _('Tags:'), 'transplant': _('Transplant:')} + 'rawtags': _('Tags:'), 'transplant': _('Transplant:'), + 'p4': _('Perforce:')}     def __init__(self):   pass @@ -282,6 +283,9 @@
  except KeyError:   pass   return None + elif item == 'p4': + extra = ctx.extra() + return extra.get('p4', None)   elif item == 'ishead':   return len(ctx.children()) == 0   raise UnknownItem(item) @@ -329,7 +333,7 @@
  return '%s' % revid   elif item in ('revid', 'transplant'):   return gtklib.markup(value, **mono) - elif item == 'revnum': + elif item in ('revnum', 'p4'):   return str(value)   elif item in ('rawbranch', 'branch'):   return gtklib.markup(' %s ' % value, color='black',