[merge] [#146176] fix Dirstate.set_state_from_inventory
Martin Pool
mbp at sourcefrog.net
Wed Oct 10 01:22:47 BST 2007
>
> > - elif (new_entry_key[0].split('/') < current_old[0][0].split('/')
> > - and new_entry_key[1:] < current_old[0][1:]):
> > + elif (new_dir_parts < current_old[0][0].split('/')
> > + or (new_dirname == current_old[0][0]
> > + and new_entry_key[1:] < current_old[0][1:])):
>
Robert pointed out that I should actually be using cmp_by_dirs, so I
merged an updated version which does that.
I think this bug could cause the dirstate to get scrambled in some
cases. Suppose we have a file that comes earlier in
iter_entries_by_dir order, but later using the incorrect comparison of
(dir_earlier and name_earlier). Then it'll be deleted from the
dirstate, and it won't get reinserted later on.
I looked yesterday for either a bug that seemed to correspond to this,
or a manual reproduction of a failure, and couldn't find one. I do
wonder if something similar is behind the bugs about problems updating
the dirstate when conflicts are detected.
--
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20071010-dirstate-modify.diff
Type: text/x-diff
Size: 3438 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20071010/81d0e6dd/attachment.bin
More information about the bazaar
mailing list