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

logview: draw a thicker line to second parent

Allows to identify the second parent in the graph.

Always highlight the second parent in the changeset info
for consistency with the highlighting in the graph.

The compact graph mode is not affected.

Changeset 774bd409298c

Parent 741eceb05c9e

by Adrian Buehlmann

Changes to 3 files · Browse files at 774bd409298c Showing diff from parent 741eceb05c9e Diff from another changeset...

 
492
493
494
495
 
496
497
498
 
492
493
494
 
495
496
497
498
@@ -492,7 +492,7 @@
  pctxs = ctx.parents()   parents = []   for pctx in pctxs: - highlight = len(pctxs) == 2 and pctx == pctxs[pindex] + highlight = len(pctxs) == 2 and pctx == pctxs[1]   branch = None   if hasattr(pctx, 'branch') and pctx.branch() != ctx.branch():   branch = pctx.branch()
 
147
148
149
150
 
 
 
151
152
153
 
155
156
157
 
 
158
159
160
 
161
162
163
164
165
166
 
 
167
168
169
 
170
171
172
 
147
148
149
 
150
151
152
153
154
155
 
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
@@ -147,7 +147,9 @@
    box_size = self.box_size(widget)   - ctx.set_line_width(box_size / 8) + linewidth = box_size / 8 + merge_linewidth = 2.5 * linewidth + ctx.set_line_width(linewidth)   ctx.set_line_cap(cairo.LINE_CAP_ROUND)     # Draw lines into the cell @@ -155,18 +157,24 @@
  style = style_SOLID   if type & 1:   style = style_DASHED + if type & 4: + ctx.set_line_width(merge_linewidth)   self.render_line (ctx, cell_area, box_size,   bg_area.y, bg_area.height,   start, end, colour, style) + ctx.set_line_width(linewidth)     # Draw lines out of the cell   for start, end, colour, type in self.out_lines:   style = style_SOLID   if type & 2:   style = style_DASHED + if type & 4: + ctx.set_line_width(merge_linewidth)   self.render_line (ctx, cell_area, box_size,   bg_area.y + bg_area.height, bg_area.height,   start, end, colour, style) + ctx.set_line_width(linewidth)     # Draw the revision node in the right column   (column, colour, status) = self.node
 
129
130
131
 
132
133
134
 
193
194
195
196
 
197
198
 
 
 
 
199
200
201
 
129
130
131
132
133
134
135
 
194
195
196
 
197
198
 
199
200
201
202
203
204
205
@@ -129,6 +129,7 @@
 type_PLAIN = 0  type_LOOSE_LOW = 1  type_LOOSE_HIGH = 2 +type_MERGE = 4    def revision_grapher(repo, start_rev, stop_rev, branch=None, noheads=False, branch_color=False):   """incremental revision grapher @@ -193,9 +194,12 @@
  color = rev_color[rev]   lines.append( (i, next_revs.index(rev), color, type_PLAIN) )   elif rev == curr_rev: - for parent in parents: + for index, parent in enumerate(parents):   color = rev_color[parent] - lines.append( (i, next_revs.index(parent), color, type_PLAIN) ) + type = type_PLAIN + if index == 1: + type = type | type_MERGE + lines.append( (i, next_revs.index(parent), color, type) )     yield (curr_rev, (rev_index, rev_color[curr_rev]), lines, None)   revs = next_revs