# HG changeset patch # User Brendan Cully # Date 1155579021 25200 # Node ID ce967d96a1c1c684ba3e7f147d136853405a352d # Parent 2fe4d99ae726e023c1699722b85067b9e300e5cc Properly shell-quote arguments in extdiff diff --git a/hgext/extdiff.py b/hgext/extdiff.py --- a/hgext/extdiff.py +++ b/hgext/extdiff.py @@ -92,8 +92,9 @@ def dodiff(ui, repo, diffcmd, pats, opts dir2 = snapshot_node(modified + added, node2) else: dir2 = snapshot_wdir(modified + added) - util.system('%s %s "%s" "%s"' % - (diffcmd, ' '.join(opts['option']), dir1, dir2), + util.system('%s %s %s %s' % + (util.shellquote(diffcmd), ' '.join(opts['option']), + util.shellquote(dir1), util.shellquote(dir2)), cwd=tmproot) return 1 finally: