diff diff_cmd.py @ 138:40474f6c1f84

diff_cmd: more robust, add tests.
author Augie Fackler <durin42@gmail.com>
date Thu, 11 Dec 2008 19:49:36 -0600
parents 91ce18fa0375
children 1fde85a10f9e
line wrap: on
line diff
--- a/diff_cmd.py
+++ b/diff_cmd.py
@@ -37,6 +37,13 @@ def diff_command(ui, repo, hg_repo_path,
     if o_r:
         parent = repo[o_r[-1]].parents()[0]
     base_rev, _junk = svn_commit_hashes[parent.node()]
-    it = patch.diff(repo, parent.node(), None, 
-                    opts=patch.diffopts(ui, opts))
+    it = patch.diff(repo, parent.node(), None,
+                    opts=patch.diffopts(ui, opts={'git': True,
+                                                  'show_function': False,
+                                                  'ignore_all_space': False,
+                                                  'ignore_space_change': False,
+                                                  'ignore_blank_lines': False,
+                                                  'unified': True,
+                                                  'text': False,
+                                                  }))
     ui.write(filterdiff(''.join(it), base_rev))