Mercurial > hg
diff hgext/patchbomb.py @ 37603:678d760c71ff
export: extract function to write patch to file object (API)
This is common use case of cmdutil.export(), and we wouldn't want to handle
formatter thingy everywhere.
.. api::
The ``fp`` argument is removed from ``cmdutil.export()``. Use
``cmdutil.exportfile()`` instead.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 12 Apr 2018 22:59:49 +0900 |
parents | e77cee5de1c7 |
children | 46c2b19a1263 |
line wrap: on
line diff
--- a/hgext/patchbomb.py Thu Apr 12 22:39:43 2018 +0900 +++ b/hgext/patchbomb.py Thu Apr 12 22:59:49 2018 +0900 @@ -306,8 +306,8 @@ ui.warn(_('warning: working directory has ' 'uncommitted changes\n')) output = stringio() - cmdutil.export(repo, [r], fp=output, - opts=patch.difffeatureopts(ui, opts, git=True)) + cmdutil.exportfile(repo, [r], output, + opts=patch.difffeatureopts(ui, opts, git=True)) yield output.getvalue().split('\n') def _getbundle(repo, dest, **opts): """return a bundle containing changesets missing in "dest"