Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9, 0.9.1, and 0.9.1.1

changeset: highlight the active parent when more than one

useful to understand which parent the other parent button is referring

Changeset 6be7b0d7edb2

Parent 4a78f577647b

by Giampaolo Fadel

Changes to one file · Browse files at 6be7b0d7edb2 Showing diff from parent 4a78f577647b Diff from another changeset...

 
148
149
150
 
 
 
 
 
 
151
152
153
 
157
158
159
160
161
162
 
 
 
 
 
 
 
 
 
 
163
164
165
 
418
419
420
 
 
 
421
422
423
 
430
431
432
 
 
 
433
 
434
 
435
436
437
 
148
149
150
151
152
153
154
155
156
157
158
159
 
163
164
165
 
 
 
166
167
168
169
170
171
172
173
174
175
176
177
178
 
431
432
433
434
435
436
437
438
439
 
446
447
448
449
450
451
452
453
454
455
456
457
458
@@ -148,6 +148,12 @@
  if ctx.branch() != 'default':   title_line(_('branch:'), ctx.branch(), 'greybg')   title_line(_('user/date:'), ctx.user() + '\t' + date, 'changeset') + + if len(ctx.parents()) == 2 and self.parent_toggle.get_active(): + parentindex = 1 + else: + parentindex = 0 +   for pctx in ctx.parents():   try:   summary = pctx.description().splitlines()[0] @@ -157,9 +163,16 @@
  change = str(pctx.rev()) + ' : ' + str(pctx)   title = _('parent:')   title += ' ' * (12 - len(title)) - buf.insert_with_tags_by_name(eob, title, 'parent') - buf.insert_with_tags_by_name(eob, change, 'link') - buf.insert_with_tags_by_name(eob, ' ' + summary, 'parent') + + if len(ctx.parents()) == 2 and pctx == ctx.parents()[parentindex]: + buf.insert_with_tags_by_name(eob, title, 'parenthl') + buf.insert_with_tags_by_name(eob, change, 'linkhl') + buf.insert_with_tags_by_name(eob, ' ' + summary, 'parenthl') + else: + buf.insert_with_tags_by_name(eob, title, 'parent') + buf.insert_with_tags_by_name(eob, change, 'link') + buf.insert_with_tags_by_name(eob, ' ' + summary, 'parent') +   buf.insert(eob, "\n")   for cctx in ctx.children():   try: @@ -418,6 +431,9 @@
  paragraph_background='#F0F0F0'))   tag_table.add(make_texttag('parent', foreground='#000090',   paragraph_background='#F0F0F0')) + tag_table.add(make_texttag('parenthl', foreground='#000090', + paragraph_background='#F0F0F0', + weight=pango.WEIGHT_BOLD ))     tag_table.add( make_texttag( 'mono', family='Monospace' ))   tag_table.add( make_texttag( 'blue', foreground='blue' )) @@ -430,8 +446,13 @@
  tag_table.add( make_texttag( 'yellowbg', background='yellow' ))   link_tag = make_texttag( 'link', foreground='blue',   underline=pango.UNDERLINE_SINGLE ) + linkhl_tag = make_texttag( 'linkhl', foreground='blue', + underline=pango.UNDERLINE_SINGLE, + weight=pango.WEIGHT_BOLD )   link_tag.connect('event', self.link_event ) + linkhl_tag.connect('event', self.link_event )   tag_table.add( link_tag ) + tag_table.add( linkhl_tag )     def file_button_release(self, widget, event):   if event.button == 3 and not (event.state & (gtk.gdk.SHIFT_MASK |