diff --git a/mercurial/merge.py b/mercurial/merge.py
index 18c2184c27dcb9a310152d67e5d4aa7cea92c7ba_bWVyY3VyaWFsL21lcmdlLnB5..0b6e6eacc939c303136cb38af108e307d640c26e_bWVyY3VyaWFsL21lcmdlLnB5 100644
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -200,6 +200,8 @@
         pa = wctx
     elif pa == p2: # backwards
         pa = wctx.p1()
+    elif not branchmerge and not wctx.dirty(missing=True):
+        pass
     elif pa and repo.ui.configbool("merge", "followcopies", True):
         ret = copies.mergecopies(repo, wctx, p2, pa)
         copy, movewithdir, diverge, renamedelete = ret
diff --git a/tests/test-subrepo.t b/tests/test-subrepo.t
index 18c2184c27dcb9a310152d67e5d4aa7cea92c7ba_dGVzdHMvdGVzdC1zdWJyZXBvLnQ=..0b6e6eacc939c303136cb38af108e307d640c26e_dGVzdHMvdGVzdC1zdWJyZXBvLnQ= 100644
--- a/tests/test-subrepo.t
+++ b/tests/test-subrepo.t
@@ -210,7 +210,6 @@
   subrepo merge f0d2028bf86d+ 1831e14459c4 1f14a2e2d3ec
     subrepo t: other changed, get t:6747d179aa9a688023c4b0cad32e4c92bb7f34ad:hg
   getting subrepo t
-    searching for copies back to rev 1
   resolving manifests
    branchmerge: False, force: False, partial: False
    ancestor: 60ca1237c194, local: 60ca1237c194+, remote: 6747d179aa9a