gitview: Fix the graph display .
This fix all the known issue with the graph display The bug need to be explained graphically | a This line need not be there ---->| \ b | | / c c is parent of a and all a,b and c are placed on the same line and b is child of c With my last checkin I added a seperate line to indicate that a is connected to c. But then we had the line connecting a and b which should not be ther. This changes fixes the same bug Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Aneesh Kumar K.V committed
Feb 24, 2006 at 21:57 UTC
1509bd9e69b916ca7f04a89fc03662e03e2ba312
1 file changed
+4
-2
contrib/gitview/gitview
+4
-2
@@ -938,8 +938,10 @@ class GitView:
938
def draw_incomplete_line(self, sha1, node_pos, out_line, in_line, index):
939
for idx, pos in enumerate(self.incomplete_line[sha1]):
940
if(pos == node_pos):
941
- out_line.append((pos,
942
- pos+0.5, self.colours[sha1]))
941
+ #remove the straight line and add a slash
942
+ if ((pos, pos, self.colours[sha1]) in out_line):
943
+ out_line.remove((pos, pos, self.colours[sha1]))
944
+ out_line.append((pos, pos+0.5, self.colours[sha1]))
945
self.incomplete_line[sha1][idx] = pos = pos+0.5
946
try:
947
next_commit = self.commits[index+1]