comparison hgext/patchbomb.py @ 10611:e764f24a45ee

patch/diff: move patch.export() to cmdutil.export() This API change will allow us to break a cycle between patch and cmdutil.
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Mon, 08 Mar 2010 19:43:24 +0100
parents d757bc0c7865
children 7a0502a6f9a1
comparison
equal deleted inserted replaced
10610:eea2db5f56ba 10611:e764f24a45ee
247 return [str(repo.changelog.rev(r)) for r in o] 247 return [str(repo.changelog.rev(r)) for r in o]
248 248
249 def getpatches(revs): 249 def getpatches(revs):
250 for r in cmdutil.revrange(repo, revs): 250 for r in cmdutil.revrange(repo, revs):
251 output = cStringIO.StringIO() 251 output = cStringIO.StringIO()
252 patch.export(repo, [r], fp=output, 252 cmdutil.export(repo, [r], fp=output,
253 opts=patch.diffopts(ui, opts)) 253 opts=patch.diffopts(ui, opts))
254 yield output.getvalue().split('\n') 254 yield output.getvalue().split('\n')
255 255
256 def getbundle(dest): 256 def getbundle(dest):
257 tmpdir = tempfile.mkdtemp(prefix='hg-email-bundle-') 257 tmpdir = tempfile.mkdtemp(prefix='hg-email-bundle-')