yuja requested changes to this revision.
yuja added inline comments.
This revision now requires changes to proceed.
> + oldchunks = chunks
> + chunks = patch.difflabel(lambda **kwargs: oldchunks,
> + if ui.canbatchlabelwrites():
I slightly prefer passing `chunks` as an argument in place of `oldchunks`
trick. But this is really minor nit.
If we make all diffui() batchable (e.g. _exportsingle()) as a follow up,
just take `chunks` as an argument.
> + def writenolabels(self, **opts):
> + '''check if write actually uses the label'''
Can you remove unused `opts` parameter?
I don't think it will be any useful since we want to feed chunks
at once where opts may vary.
> + return True
> + return self._colormode is None
Perhaps "label -> true" would be preferable than double negative "no label ->
> + '''check if write calls with labels are batchable'''
> + assert not self.writenolabels()
> + # Windows color printing is special, see ``write``.
I think this assert is irrelevant since "no label" writes can be batched.
To: joerg.sonnenberger, #hg-reviewers, yuja
Cc: yuja, mercurial-devel
Mercurial-devel mailing list