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

history: code clear

Changeset 69de4bfd5ab2

Parent 93fafab7889b

by diego@diegooliveira.com

Changes to 2 files · Browse files at 69de4bfd5ab2 Showing diff from parent 93fafab7889b Diff from another changeset...

 
175
176
177
 
 
 
 
178
 
 
 
 
 
 
179
180
181
182
183
184
185
186
187
 
188
189
190
191
192
193
194
195
 
 
196
197
198
 
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
 
 
 
 
 
193
194
 
 
 
 
 
 
 
195
196
197
198
199
@@ -175,24 +175,25 @@
  ctx.arc(arc_start_position_x, arc_start_position_y,   box_size / 5, 0, 2 * math.pi)   + # Possible node status + # 0 - normal + # 1 - outgoing + # -1 - incoming   if status != 0: + def draw_arrow(x, y, inc): + ctx.move_to(x - 2, y) + ctx.line_to(x + 4, y) + ctx.line_to(x + 1, y + inc) + ctx.line_to(x - 2, y) + ctx.stroke_preserve()   arrow_y = arc_start_position_y - box_size / 4   arrow_x = arc_start_position_x + 7;   ctx.rectangle(arrow_x, arrow_y , 2, 5)   if status == 1: - ctx.move_to(arrow_x - 2, arrow_y + 5) - ctx.line_to(arrow_x + 4, arrow_y + 5) - ctx.line_to(arrow_x +1, arrow_y + 8) - ctx.line_to(arrow_x - 2, arrow_y + 5) - ctx.stroke_preserve() + draw_arrow(arrow_x, arrow_y + 5, 3)   elif status == -1: - ctx.move_to(arrow_x - 2, arrow_y) - ctx.line_to(arrow_x + 4, arrow_y) - ctx.line_to(arrow_x +1, arrow_y - 3) - ctx.line_to(arrow_x - 2, arrow_y) - ctx.stroke_preserve() - - + draw_arrow(arrow_x, arrow_y, -3) +   self.set_colour(ctx, colour, 0.0, 0.5)   ctx.stroke_preserve()  
 
103
104
105
106
107
108
109
 
150
151
152
153
154
155
156
157
158
159
160
 
171
172
173
174
 
175
176
 
 
 
 
177
178
 
179
180
181
182
 
 
 
 
 
183
184
185
 
103
104
105
 
106
107
108
 
149
150
151
 
 
 
 
 
152
153
154
 
165
166
167
 
168
169
 
170
171
172
173
174
 
175
176
177
178
 
179
180
181
182
183
184
185
186
@@ -103,7 +103,6 @@
  (revid, graphnode, lines, path) = self.graphdata[rowref]     if column == REVID: return revid - if column == GRAPHNODE: return graphnode   if column == LINES: return lines   if column == LAST_LINES:   if rowref>0: @@ -150,11 +149,6 @@
  node = ctx.node()   tags = self.repo.nodetags(node)   taglist = hglib.toutf(', '.join(tags)) - if node in self.outgoing: - out = '<span color="%s" background="%s"> %s </span> ' % \ - ('black', '#ffffaa', 'out') - else: - out = ''   tstr = ''   for tag in tags:   tstr += '<span color="%s" background="%s"> %s </span> ' % \ @@ -171,15 +165,22 @@
    color = self.color_func(ctx.parents(), revid, author)   if revid in self.wcparents: - sumstr = out + bstr + tstr + '<b><u>' + summary + '</u></b>' + sumstr = bstr + tstr + '<b><u>' + summary + '</u></b>'   else: - sumstr = out + bstr + tstr + summary + sumstr = bstr + tstr + summary + + status = node in self.outgoing and -1 or 0 + # TODO: determine incoming, give status 1   - revision = (sumstr, author, taglist, color, age) + revision = (sumstr, author, taglist, color, age, status)   self.revisions[revid] = revision   else:   revision = self.revisions[revid] - return revision[column-MESSAGE] + if column == GRAPHNODE: + column, color = graphnode + return (column, color, revision[5]) + else: + return revision[column-MESSAGE]     def on_iter_next(self, rowref):   if rowref < len(self.graphdata) - 1: