Page MenuHomePhabricator

salvaged: record salvaged in ChangingFiles at commit time
ClosedPublic

Authored by marmoute on Sep 29 2020, 6:37 AM.

Details

Summary

The new code is a simple but effective way to detect this information. We might
be able to move it inside the various conditionnal above, but I want to focus
on simplicity until we have a full working stack.

It is worth noting that if we record the information in the ChangingFiles
object, it is not persisted yet. This will comes with later changesets.

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

marmoute created this revision.Sep 29 2020, 6:37 AM
Alphare accepted this revision.Oct 2 2020, 5:20 AM
Alphare added a subscriber: Alphare.

Other than my comment, the logic seems sound.

mercurial/commit.py
150

Coming from a Rust development perspective, _stateextras would be a private method and you wouldn't be able to access it here.
I've seen a lot of "abstraction leakage" in the Python codebase, so I'm wondering if this is justified, as in "this is a temporary solution and will disappear in a few patches or "this would require a huge refactor otherwise", or even "this should be a public attribute".

marmoute added inline comments.Oct 2 2020, 8:59 AM
mercurial/commit.py
150

This is the junction of my work and Pulkit work. My plan here is to first make it work so that we can see what data we need when. From there, we can cleanup the code and add the necessary API.

Alphare added inline comments.Oct 2 2020, 9:08 AM
mercurial/commit.py
150

Sounds good

pulkit added a subscriber: pulkit.Oct 2 2020, 9:12 AM
pulkit added inline comments.
mercurial/commit.py
150

Yes, I need to make a public function/attribute for reading all extras of a mergestate.

pulkit accepted this revision.Oct 7 2020, 8:05 AM
This revision is now accepted and ready to land.Oct 7 2020, 8:05 AM