This is an archive of the discontinued Mercurial Phabricator instance.

rewriteutil: also consider pending obsoletes when updating hashes in messages
ClosedPublic

Authored by mharbison72 on Aug 24 2020, 7:08 PM.

Details

Summary

Phabricator builds up the replacement commits and mapping in a single
transaction, and then finalizes everything once the commits have been rewritten.
That's too late when trying to update the messages for those commits.

I'm a little concerned that this isn't a generic enough interface, since it
doesn't mimic the list of list return of obsutil.successorssets(). But this
is the type of mapping that phabricator maintains, and I don't think the methods
that would be interested in calling this need to worry about split and
divergence. We can fix that later if the need arises.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

mharbison72 created this revision.Aug 24 2020, 7:08 PM
marmoute accepted this revision.Aug 26 2020, 3:11 PM
marmoute added a subscriber: marmoute.

Sounds fine, Maybe mention pending semantic and intended usage into the function docstring?

mercurial/utils/rewriteutil.py
52

nits: None is already the default for .get(key)

mharbison72 updated this revision to Diff 22541.Sep 4 2020, 2:19 PM
pulkit accepted this revision.Sep 8 2020, 3:29 AM
This revision is now accepted and ready to land.Sep 8 2020, 3:29 AM