view tests/test-mq-caches.out @ 5149:ad6b97132b81

merge: fix a copy detection bug (issue672) When merging rev1 and rev2, we want to search for copies that happened in rev1 but not in rev2 and vice-versa. We were starting the search at rev1/rev2 and then going back, stopping as soon as we reached the revno of the ancestor, but that can miss some cases (see the new test-issue672). Now we calculate the revisions that are ancestors of rev1 or rev2 (but not both) and make sure the search doesn't stop too early. Simplified test provided by mpm, based on a test case provided by Edward Lee.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sun, 12 Aug 2007 12:15:10 -0300
parents a7af0eeae8a3
children
line wrap: on
line source

# mq patch on an empty repo
tip: 0
No .hg/branch.cache
tip: 0
No .hg/branch.cache

# some regular revisions
Patch queue now empty
tip: 1
3f910abad313ff802d3a23a7529433872df9b3ae 1
3f910abad313ff802d3a23a7529433872df9b3ae bar
9539f35bdc80732cc9a3f84e46508f1ed1ec8cff foo

# add some mq patches
applying p1
Now at: p1
tip: 2
3f910abad313ff802d3a23a7529433872df9b3ae 1
3f910abad313ff802d3a23a7529433872df9b3ae bar
9539f35bdc80732cc9a3f84e46508f1ed1ec8cff foo
tip: 3
3f910abad313ff802d3a23a7529433872df9b3ae 1
3f910abad313ff802d3a23a7529433872df9b3ae bar
9539f35bdc80732cc9a3f84e46508f1ed1ec8cff foo
branch foo: 3
branch bar: 2

# removing the cache
tip: 3
3f910abad313ff802d3a23a7529433872df9b3ae 1
3f910abad313ff802d3a23a7529433872df9b3ae bar
9539f35bdc80732cc9a3f84e46508f1ed1ec8cff foo
branch foo: 3
branch bar: 2

# importing rev 1 (the cache now ends in one of the patches)
tip: 3
3f910abad313ff802d3a23a7529433872df9b3ae 1
3f910abad313ff802d3a23a7529433872df9b3ae bar
9539f35bdc80732cc9a3f84e46508f1ed1ec8cff foo
branch foo: 3
branch bar: 2
qbase: 1

# detect an invalid cache
Patch queue now empty
applying p0
applying p1
applying p2
Now at: p2
tip: 3
9539f35bdc80732cc9a3f84e46508f1ed1ec8cff 0
9539f35bdc80732cc9a3f84e46508f1ed1ec8cff foo