Page MenuHomePhabricator

merge: chain copies with existing copies in working copy
Changes PlannedPublic

Authored by martinvonz on Jun 5 2020, 9:39 PM.

Details

Reviewers
None
Group Reviewers
hg-reviewers
Summary

This makes the merge code chain and filter copies when grafting with
copies already in the working copy. For example, if the working copy
has renamed file A to B and you somehow graft in a change that renames
B to C, then that will now become a rename from A to C. That will
soon be necessary for hg rebase --collapse. It seems that we don't
have any existing cases where chaining makes a difference.

Diff Detail

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

Event Timeline

martinvonz created this revision.Jun 5 2020, 9:39 PM

This patch seems related to D8596 which @martinvonz pointed as "not meant to be merged". What should we do with this diff ? is it intended for landing ? If not could get we it out of need-review and marke it RFC ?

This patch seems related to D8596 which @martinvonz pointed as "not meant to be merged". What should we do with this diff ? is it intended for landing ? If not could get we it out of need-review and marke it RFC ?

That was on an earlier version of the series; this series is now ready.

martinvonz updated this revision to Diff 21605.Jun 10 2020, 1:54 PM
marmoute added inline comments.Jun 11 2020, 9:45 AM
mercurial/merge.py
1918–1923

I am not sure why we gain all these new cases? where do they comes from?

martinvonz added inline comments.Jun 11 2020, 9:51 AM
mercurial/merge.py
1918–1923

Did you miss the comment I added on line 1914 or do you think it's not enough? Each case is documented there.

(I have an unsubmitted question laying around for over a month…)

mercurial/merge.py
1918–1923

I don't understand how it answser my question of "why does these new cases pops up?"

martinvonz added inline comments.Jul 15 2020, 12:22 PM
mercurial/merge.py
1918–1923

I guess I don't understand what your question was in that case. Can you rephrase it?

marmoute added inline comments.Jul 16 2020, 10:33 AM
mercurial/merge.py
1918–1923

Previously, theses extra ifs clause were not necessary, Now they appears. Why do they become necessary now ?

martinvonz planned changes to this revision.Jul 16 2020, 11:23 AM

Changes planned to earlier patch in the series

martinvonz added inline comments.Jul 16 2020, 11:28 AM
mercurial/merge.py
1918–1923

Ah, I see. See copies.filter() (called copies._filter() at head) for details.