Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.1, 1.1.1, and 1.1.2

thgpbranch: Show patch title

Changeset 2b364ae2c6f9

Parent 40a53112692c

by Peer Sommerlund

Changes to one file · Browse files at 2b364ae2c6f9 Showing diff from parent 40a53112692c Diff from another changeset...

 
22
23
24
 
25
26
27
28
29
 
30
31
32
 
46
47
48
 
 
 
 
 
49
50
51
 
123
124
125
126
 
 
127
128
129
 
172
173
174
 
175
176
177
 
255
256
257
258
259
260
 
 
 
 
261
262
263
 
334
335
336
 
 
 
 
 
 
 
 
 
 
 
 
337
338
339
 
495
496
497
 
498
499
500
 
557
558
559
 
 
560
561
562
 
22
23
24
25
26
27
28
29
30
31
32
33
34
 
48
49
50
51
52
53
54
55
56
57
58
 
130
131
132
 
133
134
135
136
137
 
180
181
182
183
184
185
186
 
264
265
266
 
 
 
267
268
269
270
271
272
273
 
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
 
517
518
519
520
521
522
523
 
580
581
582
583
584
585
586
587
@@ -22,11 +22,13 @@
 M_OUT_LINES = 2  M_NAME = 3  M_STATUS = 4 +M_TITLE = 5    # Patch Branch column enumeration  C_GRAPH = 0  C_STATUS = 1  C_NAME = 2 +C_TITLE = 3    class PBranchWidget(gtk.VBox):   @@ -46,6 +48,11 @@
  'Show name column',   False,   gobject.PARAM_READWRITE), + 'title-column-visible': (gobject.TYPE_BOOLEAN, + 'Title', + 'Show title column', + False, + gobject.PARAM_READWRITE),   'show-internal-branches': (gobject.TYPE_BOOLEAN,   'ShowInternalBranches',   "Show internal branches", @@ -123,7 +130,8 @@
  gobject.TYPE_PYOBJECT, # in-lines   gobject.TYPE_PYOBJECT, # out-lines   str, # patch name - str) # patch status + str, # patch status + str) # patch title   #### patch list view   self.list = gtk.TreeView(self.model)   self.list.connect('button-press-event', self.list_pressed) @@ -172,6 +180,7 @@
  )   addcol(_('St'), C_STATUS, M_STATUS)   addcol(_('Name'), C_NAME, M_NAME, editfunc=cell_edited) + addcol(_('Title'), C_TITLE, M_TITLE)     pane.add(self.list)   @@ -255,9 +264,10 @@
    stat = patch_status[name] and 'M' or 'C' # patch status   patchname = name - msg = '%s' % parents # summary (utf-8) - msg_esc = 'what-is-this-for' # escaped summary (utf-8) - self.model.append((node, in_lines, out_lines, patchname, stat)) + msg = self.pmessage(name) or '' # summary + msg_esc = 'message for tool-tip' # escaped summary (utf-8) + title = msg.split('\n')[0] + self.model.append((node, in_lines, out_lines, patchname, stat, title))   # Loop   in_lines = out_lines   dep_list = next_dep_list @@ -334,6 +344,18 @@
  status.append(_('needs update of diff base to tip of %s\n') % dep)   return status   + def pmessage(self, patch_name): + """ + Get patch message + + :param patch_name: Name of patch-branch + :retv: Full patch message. If you extract the first line + you will get the patch title. + """ + opts = {} + mgr = self.pbranch.patchmanager(self.repo.ui, self.repo, opts) + return mgr.patchdesc(patch_name) +   def pnew_ui(self):   """   Create new patch. @@ -495,6 +517,7 @@
  colappend(_('Show graph'), C_GRAPH)   colappend(_('Show status'), C_STATUS, active=False)   colappend(_('Show name'), C_NAME) + colappend(_('Show title'), C_TITLE, active=False)     append(sep=True)   @@ -557,6 +580,8 @@
  return 'status-column-visible'   if col_idx == C_NAME:   return 'name-column-visible' + if col_idx == C_TITLE: + return 'title-column-visible'   return ''     ### signal handlers ###