[MERGE] [BUG #161131] Correct DirState._discard_merge_parents
John Arbash Meinel
john at arbash-meinel.com
Thu Nov 15 01:15:57 GMT 2007
There was a small bug in the _discard_merge_parents code. It had a fast
path for when everything was deleted from a directory it would clear the
whole thing, rather than removing them one by one. However, the check was
incorrect, so if you removed 2 items from a directory, it would nuke all
entries in that directory.
This patch corrects this, and adds a few tests to make sure that
_discard_merge_parents does the right thing.
test_discard_renamed fails without the patch. The others are just some
direct tests to handle a couple edge cases just to be a little more
thorough.
This won't be tested by the delta tests, because they only test a single
parent, which doesn't exercise the _discard_merge_parents. However it is
fairly DirState specific, so it just gets direct tests.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-patch
Size: 11842 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20071114/0b863a3e/attachment.bin
More information about the bazaar
mailing list