mercurial/simplemerge.py
branchstable
changeset 14328 3c65cdcf3ba6
parent 12401 4cdaf1adafc8
child 14329 abaacdab38f6
--- a/mercurial/simplemerge.py	Mon May 09 10:46:54 2011 +0200
+++ b/mercurial/simplemerge.py	Fri May 13 19:46:36 2011 -0500
@@ -407,10 +407,10 @@
         f.close()
         if util.binary(text):
             msg = _("%s looks like a binary file.") % filename
+            if not opts.get('quiet'):
+                ui.warn(_('warning: %s\n') % msg)
             if not opts.get('text'):
                 raise util.Abort(msg)
-            elif not opts.get('quiet'):
-                ui.warn(_('warning: %s\n') % msg)
         return text
 
     name_a = local
@@ -423,9 +423,12 @@
     if labels:
         raise util.Abort(_("can only specify two labels."))
 
-    localtext = readfile(local)
-    basetext = readfile(base)
-    othertext = readfile(other)
+    try:
+        localtext = readfile(local)
+        basetext = readfile(base)
+        othertext = readfile(other)
+    except util.Abort:
+        return 1
 
     local = os.path.realpath(local)
     if not opts.get('print'):