To reproduce, run the attached test script before and after:
changeset: 10262:eb243551cbd8
branch: stable
user: Matt Mackall <mpm@selenic.com>
date: Tue Jan 19 22:20:05 2010 -0600
files: mercurial/context.py mercurial/copies.py
description:
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. |