mercurial/hg.py
changeset 240 737c66b68290
parent 232 fc4a6e5b5812
child 241 afe895fcc0d0
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -981,8 +981,8 @@ class localrepository:
         self.ui.debug("file %s: other %s ancestor %s\n" %
                               (fn, short(other), short(base)))
 
-        cmd = os.environ["HGMERGE"]
-        r = os.system("%s %s %s %s %s" % (cmd, a, b, c, fn))
+        cmd = os.environ.get("HGMERGE", "hgmerge")
+        r = os.system("%s %s %s %s" % (cmd, a, b, c))
         if r:
             self.ui.warn("merging %s failed!\n" % f)