diff -r 81edef14922e -r 8380ed691df8 mercurial/filemerge.py --- 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