This is an archive of the discontinued Mercurial Phabricator instance.

merge: disable `m2-vs-ma` diff optimization in case of flat manifests
Changes PlannedPublic

Authored by pulkit on Sep 5 2020, 3:08 AM.

Details

Reviewers
marmoute
Group Reviewers
hg-reviewers
Summary

4d504e541d3d1a139f8ebbf8c405291140fd1853 introduced an optimization where in
some cases we first diff ancestor and second parent, get the list of files
changed between them and then only diff for these files between first parent and
second parent.

However as the commit message mentions, this optimization is only helpful when
rebasing very old commits and using treemanifest. On flat manifests, this
optimization rather adds a bit of overhead.

This makes optimization not much useful on flat manifests and can be disabled.

Now, while working on solving criss-cross merge issues where we want to create
new filenode for some files in initial merges, this optimization was causing
issues. Since it's filters file for which diff needs to be performed, the files
we are concerned with gets filters out and we don't get to store anything
related to those files.

Hence, want to disabling the optimization for flat manifests.

The tests changes are result of fact that we diff more files now in m1-vs-m2
comparison.

Small note: all these criss cross and new filenode thing I am talking about will
be behind a config flag. So nothing invasive yet :)

Diff Detail

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

Event Timeline

pulkit created this revision.Sep 5 2020, 3:08 AM
marmoute accepted this revision.Sep 11 2020, 5:05 AM
marmoute added a subscriber: marmoute.

Looks good. Out of curiosity, did you do any performance measurement of this?

pulkit planned changes to this revision.Sep 30 2020, 8:52 AM

I will get back to this later. This is no longer needed for the merge work I am doing.