Rev 4674: Review feedback. in http://bazaar.launchpad.net/~lifeless/bzr/2.0
Robert Collins
robertc at robertcollins.net
Wed Sep 30 22:39:06 BST 2009
At http://bazaar.launchpad.net/~lifeless/bzr/2.0
------------------------------------------------------------
revno: 4674
revision-id: robertc at robertcollins.net-20090930213849-0vyqtge2lfd16nx5
parent: robertc at robertcollins.net-20090930035513-ruistk552a4zbneg
committer: Robert Collins <robertc at robertcollins.net>
branch nick: 2.0
timestamp: Thu 2009-10-01 07:38:49 +1000
message:
Review feedback.
=== modified file 'NEWS'
--- a/NEWS 2009-09-30 03:55:13 +0000
+++ b/NEWS 2009-09-30 21:38:49 +0000
@@ -22,13 +22,13 @@
``keyboard-interactive`` auth but not ``password`` auth when using
Paramiko. (Andrew Bennetts, #433846)
-* Operations that set a full inventory in the working tree will now
- go via the apply_inventory_delta code path which is simpler and
- easier to understand than dirstates set_state_from_inventory method.
- This may have a small performance impact on operations built on
- _write_inventory, but such operations are already doing full tree
- scans, so no radical performance change should be observed.
- (Robert Collins, #403322)
+* Occasional IndexError on renamed files have been fixed. Operations that
+ set a full inventory in the working tree will now go via the
+ apply_inventory_delta code path which is simpler and easier to
+ understand than dirstates set_state_from_inventory method. This may
+ have a small performance impact on operations built on _write_inventory,
+ but such operations are already doing full tree scans, so no radical
+ performance change should be observed. (Robert Collins, #403322)
Improvements
************
=== modified file 'bzrlib/workingtree_4.py'
--- a/bzrlib/workingtree_4.py 2009-09-30 03:55:13 +0000
+++ b/bzrlib/workingtree_4.py 2009-09-30 21:38:49 +0000
@@ -1268,8 +1268,10 @@
raise AssertionError("attempting to write an inventory when the "
"dirstate is dirty will lose pending changes")
had_inventory = self._inventory is not None
- # Note that self.inventory may be inv, or may have been modified. So we
- # reconstruct a clean inventory from the dirstate,
+ # Setting self._inventory = None forces the dirstate to regenerate the
+ # working inventory. We do this because self.inventory may be inv, or
+ # may have been modified, and either case would prevent a clean delta
+ # being created.
self._inventory = None
# generate a delta,
delta = inv._make_delta(self.inventory)
More information about the bazaar-commits
mailing list