[PATCH 5 of 5] merge: don't pre-check for locally unknown files

Siddharth Agarwal sid0 at fb.com
Fri Feb 8 15:13:27 CST 2013


# HG changeset patch
# User Siddharth Agarwal <sid0 at fb.com>
# Date 1360339767 0
# Node ID 787156b90b65abd9bb3adab5077b159021da83e8
# Parent  34715ca02ce42fa3452b7b0d87cb0acfedb18a16
merge: don't pre-check for locally unknown files

Now that unknown files are checked in manifestmerge, this is no longer
necessary. On a repository with over 150,000 files, this speeds up an update
by 0.6-0.8 seconds, which is up to 25%.

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -472,8 +472,6 @@ def calculateupdates(repo, tctx, mctx, a
             _checkcollision(mctx, None)
         else:
             _checkcollision(mctx, (tctx, ancestor))
-    if not force:
-        _checkunknown(repo, tctx, mctx)
     if tctx.rev() is None:
         actions += _forgetremoved(tctx, mctx, branchmerge)
     actions += manifestmerge(repo, tctx, mctx,


More information about the Mercurial-devel mailing list