This is an archive of the discontinued Mercurial Phabricator instance.

context: introduce p[12]copies() methods and debugp[12]copies commands
ClosedPublic

Authored by martinvonz on Feb 20 2019, 7:27 PM.

Details

Summary

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.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.