This is an archive of the discontinued Mercurial Phabricator instance.

amend: extract function for calculating changeset extras
ClosedPublic

Authored by martinvonz on Dec 1 2017, 5:43 PM.

Details

Summary

We (Google) have extensions that would like to put their own entries
in the extras. Some of these don't make sense to keep on amend
(e.g. an entry saying "this corresponds to snaphot X of review unit
Y"). So this patch extracts a function for calculating the extras so
our extension can more easily override it.

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.

Event Timeline

martinvonz created this revision.Dec 1 2017, 5:43 PM
yuja accepted this revision.Dec 1 2017, 9:46 PM
This revision is now accepted and ready to land.Dec 1 2017, 9:46 PM
yuja added a comment.Dec 1 2017, 9:48 PM

Queued, but I doubt if pureextra == old.extra() would work with your extension.

This revision was automatically updated to reflect the committed changes.
In D1576#26799, @yuja wrote:

Queued, but I doubt if pureextra == old.extra() would work with your extension.

I did think about that and then I forgot it before I sent the patch :( We don't need this that urgently, so I'll just drop the patch and think of a better way of dealing with it. We should perhaps instead have some way of just indicating which extras can be carried over.