[PATCH V5] copy: add flag for disabling copy tracing

Durham Goode durham at fb.com
Mon Aug 3 13:47:00 CDT 2015



On 8/3/15 11:39 AM, Durham Goode wrote:
> # HG changeset patch
> # User Durham Goode <durham at fb.com>
> # Date 1422386787 28800
> #      Tue Jan 27 11:26:27 2015 -0800
> # Branch stable
> # Node ID 3ec836fca4d2f2b5d18a7e1cbfec6ea8a1d93f7b
> # Parent  79f0cb97d7537a7c2948f8f9b0a89148825a3a1d
> copy: add flag for disabling copy tracing
>
> Copy tracing can be up to 80% of rebase time when rebasing stacks
> of commits in large repos (hundreds of thousands of files).
> This provides the option of turning off the majority of copy tracing. It
> does not turn off _forwardcopies() since that is used to carry copy
> information inside a commit across a rebase.
>
> This will affect the situation where a user edits a file, then rebases on top of
> commits that have moved that file. The move will not be detected and the user
> will have to manually resolve the issue (possibly by redoing the rebase with
> this flag off).
>
> This takes rebasing a 3 commit stack that's a couple weeks old from 65s to 12s.
I sent the last version of this back in April-ish.  Martin pointed out 
that one of the changes didn't actually affect the test. This new 
version has updated tests that should test each of the changes.

We'll likely not disable copy tracing entirely inside our company. We'll 
probably tweak it so that if a rebase is over N000 commits disable copy 
tracing, but smaller rebases keep it.


More information about the Mercurial-devel mailing list