hgext/extdiff.py
changeset 23152 b8f6d840d3ec
parent 23151 733d980b9c59
parent 23138 72a89cf86fcd
child 23270 41c03b7592ed
--- a/hgext/extdiff.py	Sun Nov 02 15:27:15 2014 -0500
+++ b/hgext/extdiff.py	Mon Nov 03 16:56:32 2014 -0600
@@ -120,7 +120,7 @@
 
     revs = opts.get('rev')
     change = opts.get('change')
-    args = ' '.join(diffopts)
+    args = ' '.join(map(util.shellquote, diffopts))
     do3way = '$parent2' in args
 
     if revs and change:
@@ -281,8 +281,7 @@
                 path = util.findexe(cmd)
                 if path is None:
                     path = filemerge.findexternaltool(ui, cmd) or cmd
-            diffopts = ui.config('extdiff', 'opts.' + cmd, '')
-            diffopts = diffopts and [diffopts] or []
+            diffopts = shlex.split(ui.config('extdiff', 'opts.' + cmd, ''))
         elif cmd.startswith('opts.'):
             continue
         else: