diff mercurial/patch.py @ 6468:af2edc9c5bb9

Merge with crew-stable
author Patrick Mezard <pmezard@gmail.com>
date Fri, 04 Apr 2008 22:18:38 +0200
parents 65029a3aafc2
children ac0bcd951c2c ba0b2dacc623
line wrap: on
line diff
--- a/mercurial/patch.py	Thu Apr 03 13:47:05 2008 +0200
+++ b/mercurial/patch.py	Fri Apr 04 22:18:38 2008 +0200
@@ -1055,9 +1055,9 @@
     return err
 
 def diffopts(ui, opts={}, untrusted=False):
-    def get(key, name=None):
+    def get(key, name=None, getter=ui.configbool):
         return (opts.get(key) or
-                ui.configbool('diff', name or key, None, untrusted=untrusted))
+                getter('diff', name or key, None, untrusted=untrusted))
     return mdiff.diffopts(
         text=opts.get('text'),
         git=get('git'),
@@ -1066,7 +1066,7 @@
         ignorews=get('ignore_all_space', 'ignorews'),
         ignorewsamount=get('ignore_space_change', 'ignorewsamount'),
         ignoreblanklines=get('ignore_blank_lines', 'ignoreblanklines'),
-        context=get('unified'))
+        context=get('unified', getter=ui.config))
 
 def updatedir(ui, repo, patches):
     '''Update dirstate after patch application according to metadata'''