attn: abentley Re: [BUG] Merging repositories with a directory deleted

Aaron Bentley aaron.bentley at utoronto.ca
Wed Sep 14 23:48:15 BST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Harald Meland wrote:
> [Aaron Bentley]
> 
> 
>>Aaron Bentley wrote:
>>
>>>What I really need is a comprehensive exception-handling spec.  So far,
>>>I've just been handling each case as it bit people, based on vague ideas
>>>of 'the right way'.
>>
>>So I'm looking at it now, and I can see why I never handled it before:
>>Let's say, worst-case scenario, the file doesn't exist in THIS, and some
>>of its parent directories are also missing.
>>
>>1. Do I use BASE or OTHER for the path?
> 
> 
> If the file exists in BASE, but not in THIS, it must have been
> explicitly deleted from the branch we're merging into.  My gut feeling
> is to regard that deletion as a wish for not having the same file
> resurrected by a merge.

I should have been clearer;  I don't think we should resurrect the file,
but I do think we should indicate the changes that were made, because
files are typically deleted after the code in them has been moved
elsewhere.  So far, we've indicated conflicting changes by creating
$path.BASE, $path.OTHER $path.THIS files.  If we do it the same way in
this case, what should $path be?

> 
> If it doesn't exist in BASE, but does exist in OTHER

I'm not talking about this case.  That's handled elsewhere, as a
non-conflicting creation if it doesn't exist in THIS, or as a
new_contents_conflict if it does.

>>2. Do I use the exact path from that tree, or do I invent a path by
>>iterating up through parents in OTHER/BASE until I find something that
>>exists in THIS?
> 
> I'm not sure what to do if foo/ has been deleted between BASE and
> THIS, though; would it be possible to put the file in a
> "unknown"-class directory and mark the tree as conflicted?

Files in an unknown directory will not, themselves, be marked as unknown.

>>3. When I make the directories, do I also add them to the inventory
>>of THIS?
> 
> 
> I'm not sure I understand this question; which directories are you
> referring to?

If I were to create parent directories for the .OTHER and .BASE files.

>>4. What do I do if there's something in the way?
> 
> 
> If both THIS and OTHER added a file with the same path

No, this is already handled.  The case I was asking about was
If THIS deletes a file $FOO, and OTHER modifies it, and there's already
a file named $FOO.BASE or $FOO.THIS, what should I do?

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDKKiM0F+nu1YWqI0RAn4+AJ9hUGfuLunuNMWNpPN7xOqgqdFW4ACfZ7OY
9aVMFd7zmPcBxmuxqNgydco=
=S9AZ
-----END PGP SIGNATURE-----




More information about the bazaar mailing list