[BUG] bzr pull checks for changes to working tree

Aaron Bentley aaron.bentley at utoronto.ca
Thu Jun 9 03:03:15 BST 2005

Hash: SHA1

Hi all,

When bzr pull uses merge to update the working tree, it does not specify
whether to check for local changes.  The default value is to check for
local changes.

This was not my intent.  I did feel it was necessary to make checking
for changes the default, since that was the least dangerous option.
However, the branch/pull patch was separate from the merge patch that
introduced this behavior, so we got a logical, not textual conflict.

This problem is compounded by the fact that the check is done after the
branch stores and revision history have been updated.  As a result, when
the revision history is updated, an old version of the working tree is
compared to the last revision that has been pulled, which will usually
look like a conflict.

If we did want to prevent pulls when the working tree had been updated,
it would be nice to do it as early as possible.  That would prevent this
problem, and be more usable.  But at any rate, we would have to ensure
that the correct basis tree was used for the comparison.

To sumarize:
1. checking for changes when pulling ... bad
2. checking for changes in the middle of pulling ... really bad
3. checking an old working tree against a new basis tree ... priceless.

I've attached two patches.  One fixes the problem, the other adds a
__repr__ method to TreeDelta, which I found useful in debugging this issue.

Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pull-bug.patch
Type: text/x-patch
Size: 451 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050608/e5daf14e/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: td-repr.patch
Type: text/x-patch
Size: 520 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050608/e5daf14e/attachment-0001.bin 

More information about the bazaar mailing list