This is an archive of the discontinued Mercurial Phabricator instance.

absorb: make it explicit if empty changeset was created
ClosedPublic

Authored by mjacob on Jul 14 2020, 11:33 AM.

Details

Summary

If the config rewrite.empty-successor=skip is set, a message "became empty and
was dropped" is shown if the changeset became empty. If the config
rewrite.empty-successor=keep is set, absorb may create changesets even if they
became empty. It’s probably a good idea to make that explicit. Therefore the
message is changed to be a combination of both: "became empty and became ...".

Repeating the word "became" is not very elegant. This results from the fact
that "became" was and is overloaded to indicate both the change from non-empty
to empty and the successor relation. In the combinated message, both meanings
are used in one sentence.

Diff Detail

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

Event Timeline

mjacob created this revision.Jul 14 2020, 11:33 AM
Alphare accepted this revision.Jul 15 2020, 11:36 AM
Alphare added a subscriber: Alphare.

Not a fan of the wording, as you said... Maybe "became empty as <rev>:<hash>"?

Not a fan of the wording, as you said... Maybe "became empty as <rev>:<hash>"?

That sounds better to me.

mjacob added a subscriber: durin42.Jul 17 2020, 2:26 PM

@durin42 suggested "N:deadbeef: N file(s) changed, became M:f005ba11 (empty change)" on the mailing list. That doesn’t quite nail it, as the message should only be shown if there was a change from non-empty to empty.

@Alphare’s suggestion "became empty as <rev>:<hash>" is better, and I’ve created D8765 for that. Thanks for the suggestion!

pulkit accepted this revision.Jul 17 2020, 2:35 PM
This revision is now accepted and ready to land.Jul 17 2020, 2:35 PM
mjacob closed this revision.Jul 17 2020, 2:36 PM