Page MenuHomePhabricator

merge: add `ACTION_KEEP_ABSENT` to represent files we want to keep absent
ClosedPublic

Authored by pulkit on Sep 1 2020, 8:13 AM.

Details

Summary

There are files which were deleted/not present in working copy parent but were
present on other side of merge. On merge, we might decide to keep them deleted.
We want to track such cases more closely, rather all kind of cases which results
from some kind of merging logic.

We do have ACTION_KEEP but having a dedicated action for the absent case is
more cleaner.

Initially I named the action as ACTION_KEEP_DELETED but later realized that
file can be not-present because of other reasons than deletion like rename,
hence decided to use more generic name ACTION_KEEP_ABSENT.

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

pulkit created this revision.Sep 1 2020, 8:13 AM
pulkit retitled this revision from merge: add `ACTION_KEEP_DELETED` to represent files we want to keep deleted to merge: add `ACTION_KEEP_ABSENT` to represent files we want to keep absent.Sep 2 2020, 7:53 AM
pulkit edited the summary of this revision. (Show Details)
pulkit updated this revision to Diff 22508.
marmoute requested changes to this revision.Sep 11 2020, 4:55 AM
marmoute added a subscriber: marmoute.
marmoute added inline comments.
mercurial/merge.py
566–570

Can you split the introduction on NO_OP_ACTIONS in its own changeset so that the change coming with ACTION_KEEP_ABSENT get clearer?

This revision now requires changes to proceed.Sep 11 2020, 4:55 AM

(I wonder if we don't use "missing" more than "absent" through the code. However quick grepping is not very conclusive and "missing" could be confused with the hg status state)

This revision was not accepted when it landed; it landed in state Needs Revision.
This revision was automatically updated to reflect the committed changes.