Rev 2280: DirstateRevisionTrees need to be read_locked before they will work as BasisTree in http://bzr.arbash-meinel.com/branches/bzr/experimental/dirstate
John Arbash Meinel
john at arbash-meinel.com
Tue Feb 13 21:34:40 GMT 2007
At http://bzr.arbash-meinel.com/branches/bzr/experimental/dirstate
------------------------------------------------------------
revno: 2280
revision-id: john at arbash-meinel.com-20070213213438-ckxvudqmy5sa6pmu
parent: john at arbash-meinel.com-20070213213402-05v5g7g3bsbrxb3p
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: dirstate
timestamp: Tue 2007-02-13 15:34:38 -0600
message:
DirstateRevisionTrees need to be read_locked before they will work as BasisTree
modified:
bzrlib/commit.py commit.py-20050511101309-79ec1a0168e0e825
-------------- next part --------------
=== modified file 'bzrlib/commit.py'
--- a/bzrlib/commit.py 2007-02-02 04:49:38 +0000
+++ b/bzrlib/commit.py 2007-02-13 21:34:38 +0000
@@ -236,6 +236,8 @@
self.work_tree.lock_write()
self.pb = bzrlib.ui.ui_factory.nested_progress_bar()
+ self.basis_tree = self.work_tree.basis_tree()
+ self.basis_tree.lock_read()
try:
# Cannot commit with conflicts present.
if len(self.work_tree.conflicts())>0:
@@ -267,7 +269,6 @@
self.config = self.branch.get_config()
self.work_inv = self.work_tree.inventory
- self.basis_tree = self.work_tree.basis_tree()
self.basis_inv = self.basis_tree.inventory
if specific_files is not None:
# Ensure specified files are versioned
@@ -443,6 +444,7 @@
def _cleanup(self):
"""Cleanup any open locks, progress bars etc."""
cleanups = [self._cleanup_bound_branch,
+ self.basis_tree.unlock,
self.work_tree.unlock,
self.pb.finished]
found_exception = None
More information about the bazaar-commits
mailing list