( )⚙ D12119 narrow: allow merging non-conflicting change outside of the narrow spec

This is an archive of the discontinued Mercurial Phabricator instance.

narrow: allow merging non-conflicting change outside of the narrow spec
ClosedPublic

Authored by marmoute on Jan 30 2022, 3:15 PM.

Details

Summary

We use the mergestate to carry information about these merge action and
reprocess them at commit time to apply the necessary update.

The dirstate itself is never affected and remains "pure", with content only in
the narrow-spec. This file involved in such merge are therefor not listed in `hg
status`.

The current testing is based on a modification of the previous testing, that
refused to do such merges. As a result it is a bit simple and more extensive
code and testing testing will have to be introduced later. I am planning to do
this extra testing, soon.

In addition, this only works for flat manifest. Support for tree manifest will
need more work. I am not currently planning to do this work.

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.Jan 30 2022, 3:15 PM
Alphare requested changes to this revision.Feb 3 2022, 4:33 AM
Alphare added a subscriber: Alphare.

I don't think we can forgo a test of a simple added and removed case.

mercurial/commit.py
217

Should be mergestate.CHANGE_ADDED. This makes me suspect that the testing is not extensive enough even with the limited scope mentioned in the commit message

230

unknown*

This revision now requires changes to proceed.Feb 3 2022, 4:34 AM
marmoute added inline comments.Feb 3 2022, 10:57 AM
mercurial/commit.py
217

Yeah the removed/added case are not tested yet. I'll just drop them from this patch and reintroduce them later with the testing.

baymax updated this revision to Diff 32053.Feb 3 2022, 11:55 AM

✅ refresh by Heptapod after a successful CI run (🐙 💚)

baymax edited the summary of this revision. (Show Details)Feb 3 2022, 1:23 PM
baymax updated this revision to Diff 32058.

✅ refresh by Heptapod after a successful CI run (🐙 💚)

Alphare accepted this revision.Feb 4 2022, 5:24 AM
This revision is now accepted and ready to land.Feb 4 2022, 5:24 AM