mercurial/simplemerge.py
changeset 8269 bb9f13974d8e
parent 7280 810ca383da9c
child 8312 b87a50b7125c
--- a/mercurial/simplemerge.py	Thu Apr 30 19:22:06 2009 -0500
+++ b/mercurial/simplemerge.py	Thu Apr 30 23:57:36 2009 -0500
@@ -24,11 +24,6 @@
 class CantReprocessAndShowBase(Exception):
     pass
 
-def warn(message):
-    sys.stdout.flush()
-    sys.stderr.write(message)
-    sys.stderr.flush()
-
 def intersect(ra, rb):
     """Given two ranges return the range where they intersect or None.
 
@@ -405,7 +400,7 @@
 
         return unc
 
-def simplemerge(local, base, other, **opts):
+def simplemerge(ui, local, base, other, **opts):
     def readfile(filename):
         f = open(filename, "rb")
         text = f.read()
@@ -415,7 +410,7 @@
             if not opts.get('text'):
                 raise util.Abort(msg)
             elif not opts.get('quiet'):
-                warn(_('warning: %s\n') % msg)
+                ui.warn(_('warning: %s\n') % msg)
         return text
 
     name_a = local
@@ -451,5 +446,5 @@
 
     if m3.conflicts:
         if not opts.get('quiet'):
-            warn(_("warning: conflicts during merge.\n"))
+            ui.warn(_("warning: conflicts during merge.\n"))
         return 1