Mercurial > hg-stable
diff tests/test-copies.t @ 41765:49ad315b39ee
copies: do copy tracing based on ctx.p[12]copies() if configured
This adds an option to do copy tracing in a changeset-optimized
way. If the metadata is stored in filelogs, this is obviously going to
be suboptimal. The point is that it provides a way of transitioning to
changeset-stored metadata.
Some of the tests behave a little differently, but they all seem
resonable to me.
The config option may very well be renamed later when it's clearer
what options we want and how they will behave.
When the test suite is run with --extra-config-opt to use the new copy
tracing, all tests pass, besides test-copies.t (which fails in the
same way as you can see in this patch).
`hg debugpathcopies 4.0 4.8` reports 82 copies. With this option
enabled, the only difference is this:
-mercurial/pure/bdiff.py -> mercurial/cffi/bdiff.py
+setup_bdiff_cffi.py -> mercurial/cffi/bdiff.py
I believe that happened because it was renamed in different ways on
different sides of a merge and the new algorithm arbitrarily prefers
copies that happened on p1. The runtime is about 0.85 seconds with the
old copy tracing and 5.7 seconds with the new copy tracing. That's
kind of slow, but actually better than I had expected.
Differential Revision: https://phab.mercurial-scm.org/D5991
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 19 Feb 2019 15:42:45 -0800 |
parents | a4358f7345b4 |
children | cbdd2b56d4c3 |
line wrap: on
line diff
--- a/tests/test-copies.t Fri Jan 18 13:13:30 2019 -0800 +++ b/tests/test-copies.t Tue Feb 19 15:42:45 2019 -0800 @@ -1,9 +1,17 @@ +#testcases filelog compatibility $ cat >> $HGRCPATH << EOF > [alias] > l = log -G -T '{rev} {desc}\n{files}\n' > EOF +#if compatibility + $ cat >> $HGRCPATH << EOF + > [experimental] + > copies.read-from = compatibility + > EOF +#endif + $ REPONUM=0 $ newrepo() { > cd $TESTTMP @@ -338,7 +346,7 @@ $ hg debugpathcopies 1 2 x -> z $ hg debugpathcopies 0 2 - x -> z + x -> z (filelog !) Copy file that exists on both sides of the merge, different content $ newrepo @@ -476,7 +484,8 @@ $ hg debugpathcopies 1 4 $ hg debugpathcopies 2 4 $ hg debugpathcopies 0 4 - x -> z + x -> z (filelog !) + y -> z (compatibility !) $ hg debugpathcopies 1 5 $ hg debugpathcopies 2 5 $ hg debugpathcopies 0 5