Augie Fackler <augie@google.com> [Wed, 20 Feb 2019 18:02:28 -0500] rev 41760
cleanup: prefer nested context managers to \-continuations
I'd prefer Python accept a tuple of context managers, but alas it
isn't meant to be. This will have to suffice.
Differential Revision: https://phab.mercurial-scm.org/D5994
Augie Fackler <augie@google.com> [Wed, 20 Feb 2019 19:28:51 -0500] rev 41759
cleanup: use () to wrap long lines instead of \
This is a little less brittle, and often helps indentation. In a
surprising number of cases the entire cleanup was deleting the \, as
the expression was *already* parenthesized in a workable way.
Differential Revision: https://phab.mercurial-scm.org/D5993
Augie Fackler <augie@google.com> [Sun, 13 Jan 2019 20:13:22 -0500] rev 41758
tests: use () instead of \ to wrap lines
This should auto-format more consistently, and is slightly more
typical Python.
Differential Revision: https://phab.mercurial-scm.org/D5992
Martin von Zweigbergk <martinvonz@google.com> [Wed, 20 Feb 2019 20:49:41 -0800] rev 41757
merge with stable
Martin von Zweigbergk <martinvonz@google.com> [Tue, 19 Feb 2019 15:42:45 -0800] rev 41756
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
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Jan 2019 13:13:30 -0800] rev 41755
context: introduce p[12]copies() methods and debugp[12]copies commands
As mentioned earlier, I'm working on support for storing copy metadata
in the changeset instead of in the filelog.
In order to transition a repo from storing metadata in filelogs to
storing it in the changeset, I'm going to provide a config option for
reading the metadata from the changeset, but falling back to getting
it from the filelog if it's not in the changeset. In this compatiblity
mode, the changeset-optmized algorithms will be used. We will then
need to convert the filelog copy metadata to look like that provided
by changeset copy metadata. This patch introduces methods that do just
that.
By having these methods here, we can start writing changeset-optimized
algorithms that should work already before we add any support for
storing the metadata in the changesets.
This commit also includes new debugp[12]copies commands and exercises
them in test-copies.t.
Differential Revision: https://phab.mercurial-scm.org/D5990