mercurial/merge.py
changeset 3311 966632304dde
parent 3309 e8be5942335d
child 3312 c5075ad5e3e9
--- a/mercurial/merge.py	Tue Oct 10 01:13:03 2006 -0500
+++ b/mercurial/merge.py	Tue Oct 10 01:16:06 2006 -0500
@@ -32,6 +32,10 @@
 
     fcm = wctx.filectx(fw)
     fco = mctx.filectx(fo)
+
+    if not fco.cmp(fcm.data()): # files identical?
+        return 0
+
     fca = fcm.ancestor(fco)
     if not fca:
         fca = repo.filectx(fw, fileid=-1)
@@ -39,7 +43,11 @@
     b = temp("base", fca)
     c = temp("other", fco)
 
-    repo.ui.note(_("resolving %s\n") % fw)
+    if fw != fo:
+        repo.ui.status(_("merging %s and %s\n") % (fw, fo))
+    else:
+        repo.ui.status(_("merging %s\n") % fw)
+
     repo.ui.debug(_("my %s other %s ancestor %s\n") % (fcm, fco, fca))
 
     cmd = (os.environ.get("HGMERGE") or repo.ui.config("ui", "merge")
@@ -281,10 +289,6 @@
             removed +=1
         elif m == "m": # merge
             f2, fd, flag, move = a[2:]
-            if f != f2:
-                repo.ui.status(_("merging %s and %s to %s\n") % (f, f2, fd))
-            else:
-                repo.ui.status(_("merging %s\n") % f)
             if filemerge(repo, f, f2, wctx, mctx):
                 unresolved += 1
             else: