comparison mercurial/commands.py @ 25763:60c791592aa7

changeset_printer: change flush() to accept ctx instead of rev Because flush() is the function to write data buffered by show(ctx), flush(ctx) is more consistent than flush(rev). This makes sure that buffered header and hunk are always keyed by ctx.rev(). This patch will allow us to give an integer to the wdir while keeping wctx.rev() -> None.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 12 Apr 2015 21:52:02 +0900
parents 0d37b9b21467
children 95dc4b009f60
comparison
equal deleted inserted replaced
25762:f4412380d357 25763:60c791592aa7
4625 if filematcher: 4625 if filematcher:
4626 revmatchfn = filematcher(ctx.rev()) 4626 revmatchfn = filematcher(ctx.rev())
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()
4634 4634
4635 @command('manifest', 4635 @command('manifest',