hgext/record.py
changeset 7308 b6f5490effbf
parent 7015 6651de7176a0
child 7718 6fa7b6fb90a9
--- a/hgext/record.py	Mon Nov 03 16:31:47 2008 +0100
+++ b/hgext/record.py	Mon Nov 03 16:48:23 2008 +0100
@@ -413,9 +413,10 @@
             modified, added, removed = changes
             match = cmdutil.matchfiles(repo, modified + added + removed)
         diffopts = mdiff.diffopts(git=True, nodates=True)
+        chunks = patch.diff(repo, repo.dirstate.parents()[0], match=match,
+                            changes=changes, opts=diffopts)
         fp = cStringIO.StringIO()
-        patch.diff(repo, repo.dirstate.parents()[0], match=match,
-                   changes=changes, opts=diffopts, fp=fp)
+        fp.write(''.join(chunks))
         fp.seek(0)
 
         # 1. filter patch, so we have intending-to apply subset of it