Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

repomodel: draw mq patch revisions as diamonds

Changeset f9eee966e59c

Parent 30bfa04af71c

by George Marrows

Changes to one file · Browse files at f9eee966e59c Showing diff from parent 30bfa04af71c Diff from another changeset...

 
361
362
363
364
365
366
367
368
 
 
 
369
370
371
 
380
381
382
 
 
 
 
 
 
 
 
383
384
385
386
387
 
388
389
 
 
 
 
 
 
 
390
391
392
 
361
362
363
 
 
364
 
 
365
366
367
368
369
370
 
379
380
381
382
383
384
385
386
387
388
389
390
391
 
 
 
392
393
 
394
395
396
397
398
399
400
401
402
403
@@ -361,11 +361,10 @@
  painter.drawPath(path)     # Draw node - # - rev / mqpatch - # - wd parent   dot_color = QColor(self.namedbranch_color(ctx.branch())) - dotcolor = QColor(dot_color).lighter() - pencolor = dotcolor.darker() + dotcolor = dot_color.lighter() + pencolor = dot_color.darker() + white = QColor("white")     pen = QPen(pencolor)   pen.setWidthF(1.5) @@ -380,13 +379,25 @@
  centre_y - r,   2 * r, 2 * r)   painter.drawEllipse(rect) + + def diamond(r): + poly = QPolygonF([QPointF(centre_x - r, centre_y), + QPointF(centre_x, centre_y - r), + QPointF(centre_x + r, centre_y), + QPointF(centre_x, centre_y + r), + QPointF(centre_x - r, centre_y),]) + painter.drawPolygon(poly)     tags = set(ctx.tags()) - if tags.intersection(self.mqueues): - pass - else: + if tags.intersection(self.mqueues): # diamonds for patches   if gnode.rev in self.wd_revs: - painter.setBrush(QColor(255,255,255,255)) + painter.setBrush(white) + diamond(2 * 0.9 * radius / 1.5) + painter.setBrush(dotcolor) + diamond(radius / 1.5) + else: # circles for normal revisions + if gnode.rev in self.wd_revs: + painter.setBrush(white)   circle(0.9 * radius)   painter.setBrush(dotcolor)   circle(0.5 * radius)