mercurial/filemerge.py
changeset 11988 8380ed691df8
parent 11702 eb07fbc21e9c
child 12010 ce818cf215dc
--- a/mercurial/filemerge.py	Thu Aug 19 11:14:09 2010 -0500
+++ b/mercurial/filemerge.py	Wed Aug 18 18:18:26 2010 -0400
@@ -222,8 +222,8 @@
         if "$output" in args:
             out, a = a, back # read input from backup, write to original
         replace = dict(local=a, base=b, other=c, output=out)
-        args = re.sub("\$(local|base|other|output)",
-            lambda x: '"%s"' % util.localpath(replace[x.group()[1:]]), args)
+        args = util.interpolate(r'\$', replace, args,
+                                lambda s: '"%s"' % util.localpath(s))
         r = util.system(toolpath + ' ' + args, cwd=repo.root, environ=env)
 
     if not r and (_toolbool(ui, tool, "checkconflicts") or