Rev 2459: Fix info and status again. in http://bazaar.launchpad.net/~bzr/bzr/dirstate
Robert Collins
robertc at robertcollins.net
Tue Mar 6 02:38:09 GMT 2007
At http://bazaar.launchpad.net/~bzr/bzr/dirstate
------------------------------------------------------------
revno: 2459
revision-id: robertc at robertcollins.net-20070306023715-0ly3m7xrl29pgvn0
parent: mbp at sourcefrog.net-20070306023028-eqnd3kfvn19hwl26
committer: Robert Collins <robertc at robertcollins.net>
branch nick: dirstate.dogfood
timestamp: Tue 2007-03-06 13:37:15 +1100
message:
Fix info and status again.
modified:
bzrlib/workingtree.py workingtree.py-20050511021032-29b6ec0a681e02e3
bzrlib/workingtree_4.py workingtree_4.py-20070208044105-5fgpc5j3ljlh5q6c-1
=== modified file 'bzrlib/workingtree.py'
--- a/bzrlib/workingtree.py 2007-03-06 00:28:36 +0000
+++ b/bzrlib/workingtree.py 2007-03-06 02:37:15 +0000
@@ -1649,6 +1649,8 @@
def lock_read(self):
"""See Branch.lock_read, and WorkingTree.unlock."""
+ if not self.is_locked():
+ self._reset_data()
self.branch.lock_read()
try:
return self._control_files.lock_read()
@@ -1658,6 +1660,8 @@
def lock_tree_write(self):
"""See MutableTree.lock_tree_write, and WorkingTree.unlock."""
+ if not self.is_locked():
+ self._reset_data()
self.branch.lock_read()
try:
return self._control_files.lock_write()
@@ -1667,6 +1671,8 @@
def lock_write(self):
"""See MutableTree.lock_write, and WorkingTree.unlock."""
+ if not self.is_locked():
+ self._reset_data()
self.branch.lock_write()
try:
return self._control_files.lock_write()
@@ -1680,6 +1686,12 @@
def _basis_inventory_name(self):
return 'basis-inventory-cache'
+ def _reset_data(self):
+ """Reset transient data that cannot be revalidated."""
+ self._inventory_is_modified = False
+ result = self._deserialize(self._control_files.get('inventory'))
+ self._set_inventory(result, dirty=False)
+
@needs_tree_write_lock
def set_last_revision(self, new_revision):
"""Change the last revision in the working tree."""
=== modified file 'bzrlib/workingtree_4.py'
--- a/bzrlib/workingtree_4.py 2007-03-06 02:30:28 +0000
+++ b/bzrlib/workingtree_4.py 2007-03-06 02:37:15 +0000
@@ -1582,7 +1582,7 @@
# we can't fast-path these cases (yet)
for f in super(InterDirStateTree, self)._iter_changes(
include_unchanged, specific_files, pb, extra_trees,
- require_versioned):
+ require_versioned, want_unversioned=want_unversioned):
yield f
return
parent_ids = self.target.get_parent_ids()
More information about the bazaar-commits
mailing list