[BUG] bzr pull checks for changes to working tree

Aaron Bentley aaron.bentley at utoronto.ca
Thu Jun 9 12:39:46 BST 2005


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

Resending-- This appears to have gotten lost.

Aaron

- -------- Original Message --------
Subject: [BUG] bzr pull checks for changes to working tree
Date: Wed, 08 Jun 2005 22:03:15 -0400
From: Aaron Bentley <aaron.bentley at utoronto.ca>
To: bazaar-ng at lists.canonical.com <bazaar-ng at lists.canonical.com>

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.

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

iD8DBQFCqCp00F+nu1YWqI0RAmQtAJ4ikdDEKflQgWBWA7wgsU6ZF2YTjQCggh5h
RBs06ecJNkKzk77e2i0wRW4=
=MMwJ
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pull-bug.patch
Type: text/x-patch
Size: 452 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050609/f0c28bff/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: td-repr.patch
Type: text/x-patch
Size: 521 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050609/f0c28bff/attachment-0001.bin 


More information about the bazaar mailing list