This is an archive of the discontinued Mercurial Phabricator instance.

hooks: provide access to transaction changes for internal hooks
ClosedPublic

Authored by joerg.sonnenberger on Apr 30 2020, 9:24 PM.

Details

Summary

External hooks are skipped here as the environment often has a size
limit in the low MBs and that can easily be reached by larger
transactions.

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

This is part of a change discussed on IRC to make hooks more useful, e.g. providing better access to which changesets have been obsoleted or making it possible to avoid per changeset hooks with *-phase with a follow-up option to always compute the phase markers. I have some small potential concerns about the environmental size this can have for external hooks, so I'm also open for the idea of providing this argument only for internal hooks.

marmoute requested changes to this revision.May 1 2020, 9:59 AM
marmoute added a subscriber: marmoute.

Yeah, I don't think we can blindy pass it to shell hooks because ENVIRON might explode. Lets start with providing this for python hook only, and we can devise better way to do this for shell hook (maybe a files with content to parse ?)

This revision now requires changes to proceed.May 1 2020, 9:59 AM
joerg.sonnenberger retitled this revision from hooks: provide access to transaction changes for hooks to hooks: provide access to transaction changes for internal hooks.May 1 2020, 12:11 PM
joerg.sonnenberger edited the summary of this revision. (Show Details)
joerg.sonnenberger updated this revision to Diff 21267.
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.