##// END OF EJS Templates
changeset_printer: change flush() to accept ctx instead of rev...
Yuya Nishihara -
r25763:60c79159 default
parent child Browse files
Show More
@@ -1119,7 +1119,8 b' class changeset_printer(object):'
1119 self.lastheader = None
1119 self.lastheader = None
1120 self.footer = None
1120 self.footer = None
1121
1121
1122 def flush(self, rev):
1122 def flush(self, ctx):
1123 rev = ctx.rev()
1123 if rev in self.header:
1124 if rev in self.header:
1124 h = self.header[rev]
1125 h = self.header[rev]
1125 if h != self.lastheader:
1126 if h != self.lastheader:
@@ -2156,7 +2157,7 b' def displaygraph(ui, dag, displayer, sho'
2156 lines = displayer.hunk.pop(rev).split('\n')
2157 lines = displayer.hunk.pop(rev).split('\n')
2157 if not lines[-1]:
2158 if not lines[-1]:
2158 del lines[-1]
2159 del lines[-1]
2159 displayer.flush(rev)
2160 displayer.flush(ctx)
2160 edges = edgefn(type, char, lines, seen, rev, parents)
2161 edges = edgefn(type, char, lines, seen, rev, parents)
2161 for type, char, lines, coldata in edges:
2162 for type, char, lines, coldata in edges:
2162 graphmod.ascii(ui, state, type, char, lines, coldata)
2163 graphmod.ascii(ui, state, type, char, lines, coldata)
@@ -4627,7 +4627,7 b' def log(ui, repo, *pats, **opts):'
4627 else:
4627 else:
4628 revmatchfn = None
4628 revmatchfn = None
4629 displayer.show(ctx, copies=copies, matchfn=revmatchfn)
4629 displayer.show(ctx, copies=copies, matchfn=revmatchfn)
4630 if displayer.flush(rev):
4630 if displayer.flush(ctx):
4631 count += 1
4631 count += 1
4632
4632
4633 displayer.close()
4633 displayer.close()
General Comments 0
You need to be logged in to leave comments. Login now