a572f4405909

api: it's 2010 -- time to use git diffs

fixes issue 47
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Tue, 20 Jul 2010 19:04:57 -0400
parents fcdbab575d22
children de7319315abe
branches/tags (none)
files review/api.py

Changes

--- a/review/api.py	Tue Jul 20 18:43:14 2010 -0400
+++ b/review/api.py	Tue Jul 20 19:04:57 2010 -0400
@@ -533,8 +533,9 @@
         diffs = {}
         for filename in filenames:
             m = cmdutil.matchfiles(self.target, [filename])
-            d = patch.diff(self.target, node1, node2, match=m,
-                opts=patch.diffopts(self.ui, opts))
+            diff_opts = patch.diffopts(self.ui, opts)
+            diff_opts.git = True
+            d = patch.diff(self.target, node1, node2, match=m, opts=diff_opts)
 
             # patch.diff will give us back a generator with two items
             # the first is the diff --git header, which we don't care about