diff hgext/hgk.py @ 7308:b6f5490effbf

patch: turn patch.diff() into a generator This should even be a little faster than passing in an fp argument.
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Mon, 03 Nov 2008 16:48:23 +0100
parents af694c6a888c
children 26adfaccdf73
line wrap: on
line diff
--- a/hgext/hgk.py	Mon Nov 03 16:31:47 2008 +0100
+++ b/hgext/hgk.py	Mon Nov 03 16:48:23 2008 +0100
@@ -92,8 +92,10 @@
             if opts['pretty']:
                 catcommit(ui, repo, node2, "")
             m = cmdutil.match(repo, files)
-            patch.diff(repo, node1, node2, match=m,
-                       opts=patch.diffopts(ui, {'git': True}))
+            chunks = patch.diff(repo, node1, node2, match=m,
+                                opts=patch.diffopts(ui, {'git': True}))
+            for chunk in chunks:
+                repo.ui.write(chunk)
         else:
             __difftree(repo, node1, node2, files=files)
         if not opts['stdin']: