Patchwork [3,of,3] merge: don't sort the manifest in _checkunknown

mail settings
Submitter Siddharth Agarwal
Date Feb. 1, 2013, 10:41 p.m.
Message ID <3c2df1f308015f3ce801.1359758486@sid0x220>
Download mbox | patch
Permalink /patch/794/
State Superseded
Commit 26627c30735a610f59979a36885b327b25d8dbff
Headers show


Siddharth Agarwal - Feb. 1, 2013, 10:41 p.m.
# HG changeset patch
# User Siddharth Agarwal <>
# Date 1359757817 28800
# Branch stable
# Node ID 3c2df1f308015f3ce8015724b1748c6d419d066e
# Parent  802db8814a53d3e1c0bd4d444e9a70158bd48396
merge: don't sort the manifest in _checkunknown

Iterating over the context returns the files in sorted order. That is
unnecessary here.

For a repository with over 150,000 files, this speeds up update by around 0.15


diff --git a/mercurial/ b/mercurial/
--- a/mercurial/
+++ b/mercurial/
@@ -101,7 +101,7 @@  def _checkunknown(repo, wctx, mctx):
     "check for collisions between unknown files and files in mctx"
     error = False
-    for f in repo.dirstate.notincluded(mctx):
+    for f in repo.dirstate.notincluded(mctx.manifest()):
         if _checkunknownfile(repo, wctx, mctx, f):
             error = True
             wctx._repo.ui.warn(_("%s: untracked file differs\n") % f)