Page MenuHomePhabricator

copies: add test that makes both the merging csets dirty and fails
ClosedPublic

Authored by khanchi97 on Feb 14 2019, 9:15 AM.

Details

Summary

This patch is a part of series which is about the case when both the merging
csets are not descendant of merge base. The existing code assumes if c1 is
dirty there shouldn't be any partial copies from c2 i.e both2['incomplete']
and same for c2, if c2 is dirty both1['incomplete'] should be empty,
but this is not the right assumption.
Now as we know we can have both c1 and c2 dirty at the same time, it
is possible that c1 is dirty and both2['incomplete'] has some value.
Or if c2 is dirty and both1['incomplete'] has some value.

Added test shows that because of this assumption it could fail.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

khanchi97 created this revision.Feb 14 2019, 9:15 AM
khanchi97 edited the summary of this revision. (Show Details)Feb 20 2019, 12:42 PM

Ping for review.

martinvonz added inline comments.
tests/test-copytrace-heuristics.t
931–980 ↗(On Diff #14091)

nit: we usually redirect stderr and grep for the error (AssertionError here) to make it a bit shorter. (besides, the test here with /home/khanchi/ paths is clearly not going to pass on most people's machines)

khanchi97 updated this revision to Diff 14240.Feb 25 2019, 2:32 PM

@martinvonz updated this one too.

khanchi97 updated this revision to Diff 14309.Mar 3 2019, 1:50 AM
khanchi97 updated this revision to Diff 14347.Mar 4 2019, 2:52 PM

Ping for review.

martinvonz added inline comments.Mar 11 2019, 2:42 AM
tests/test-copies.t
575 ↗(On Diff #14347)

As in the previous patch, I'd like to avoid hashes in the output by using hg l.

608 ↗(On Diff #14347)

You can use -t :other here and not have to manually resolve it

khanchi97 updated this revision to Diff 14456.Mar 11 2019, 5:49 AM
khanchi97 marked 2 inline comments as done.Mar 11 2019, 5:51 AM

Thanks, I have updated the patch.

martinvonz accepted this revision.Mar 11 2019, 11:34 AM
This revision is now accepted and ready to land.Mar 11 2019, 11:34 AM
This revision was automatically updated to reflect the committed changes.