##// 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
mpm@selenic.com
Add back links from file revisions to changeset revisions...
r0 #!/usr/bin/env python
#
Matt Mackall
Update copyright notice
r1698 # mercurial - scalable distributed SCM
mpm@selenic.com
Add back links from file revisions to changeset revisions...
r0 #
Thomas Arendsen Hein
Updated copyright notices and add "and others" to "hg version"
r4635 # Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
mpm@selenic.com
Add back links from file revisions to changeset revisions...
r0 #
Martin Geisler
updated license to be explicit about GPL version 2
r8225 # This software may be used and distributed according to the terms of the
# GNU General Public License version 2, incorporated herein by reference.
mpm@selenic.com
Add back links from file revisions to changeset revisions...
r0
Thomas Arendsen Hein
Enable demandimport only in scripts, not in importable modules (issue605)...
r5197 # enable importing on demand to reduce startup time
Matt Mackall
Give a useful message about PYTHONPATH if startup fails
r7672 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)
Thomas Arendsen Hein
Enable demandimport only in scripts, not in importable modules (issue605)...
r5197
Patrick Mezard
Change standard streams mode to binary at hg startup...
r5531 import sys
import mercurial.util
Matt Mackall
dispatch: move command dispatching into its own module...
r5178 import mercurial.dispatch
Patrick Mezard
Change standard streams mode to binary at hg startup...
r5531
for fp in (sys.stdin, sys.stdout, sys.stderr):
mercurial.util.set_binary(fp)
Matt Mackall
dispatch: move command dispatching into its own module...
r5178 mercurial.dispatch.run()