Rev 3969: Have BzrDir.sprout() lock its WT when locking the basis tree. in lp:///~jameinel/bzr/win32-shelve

John Arbash Meinel john at arbash-meinel.com
Tue Feb 10 16:49:23 GMT 2009


At lp:///~jameinel/bzr/win32-shelve

------------------------------------------------------------
revno: 3969
revision-id: john at arbash-meinel.com-20090210164908-1bth6b5yjyzlw92c
parent: john at arbash-meinel.com-20090210163901-4m1f9jbidianssvt
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: win32-shelve
timestamp: Tue 2009-02-10 10:49:08 -0600
message:
  Have BzrDir.sprout() lock its WT when locking the basis tree.
-------------- next part --------------
=== modified file 'bzrlib/bzrdir.py'
--- a/bzrlib/bzrdir.py	2009-01-16 07:50:48 +0000
+++ b/bzrlib/bzrdir.py	2009-02-10 16:49:08 +0000
@@ -1151,6 +1151,7 @@
             wt = None
         if recurse == 'down':
             if wt is not None:
+                wt.lock_read()
                 basis = wt.basis_tree()
                 basis.lock_read()
                 subtrees = basis.iter_references()
@@ -1174,6 +1175,8 @@
                         force_new_repo=force_new_repo, recurse=recurse,
                         stacked=stacked)
             finally:
+                if wt is not None:
+                    wt.unlock()
                 if basis is not None:
                     basis.unlock()
         return result



More information about the bazaar-commits mailing list