Changeset 774bd409298c…
Parent 741eceb05c9e…
by
Changes to 3 files · Browse files at 774bd409298c Showing diff from parent 741eceb05c9e Diff from another changeset...
@@ -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,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,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
|
Loading...