##// END OF EJS Templates
copies: speed up copy detection...
copies: speed up copy detection On some large repos, copy detection could spend > 10min using fctx.ancestor() to determine if file revisions were actually related. Because ancestor must traverse history to the root to determine the GCA, it was doing a lot more work than necessary. With this replacement, same status -r a:b takes ~3 seconds.

File last commit:

r8225:46293a0c default
r10262:eb243551 stable
Show More
hg
27 lines | 787 B | text/plain | TextLexer
#!/usr/bin/env python
#
# mercurial - scalable distributed SCM
#
# Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2, incorporated herein by reference.
# enable importing on demand to reduce startup time
try:
from mercurial import demandimport; demandimport.enable()
except ImportError:
import sys
sys.stderr.write("abort: couldn't find mercurial libraries in [%s]\n" %
' '.join(sys.path))
sys.stderr.write("(check your install and PYTHONPATH)\n")
sys.exit(-1)
import sys
import mercurial.util
import mercurial.dispatch
for fp in (sys.stdin, sys.stdout, sys.stderr):
mercurial.util.set_binary(fp)
mercurial.dispatch.run()