On 26 May 2011 16:33, Vincent Ladeuil <email address hidden> wrote:
> @@ -2372,13 +2384,13 @@
> # part of an object (roughly a Stack, directly or indirectly) that is
> # an attribute of the branch object itself. Since the BranchStore
> # cannot exist without a branch, it's safe to make it a weakref.
> - self.branch = weakref.ref(branch)
> + self.branch_ref = weakref.ref(branch)
>
> def lock_write(self, token=None):
> - return self.branch.lock_write(token)
> + return self.branch_ref().lock_write(token)
>
> def unlock(self):
> - return self.branch.unlock()
> + return self.branch_ref().unlock()
>
> @needs_write_lock
> def save(self):
On 26 May 2011 16:33, Vincent Ladeuil <email address hidden> wrote: lock_write( token) ref().lock_ write(token) unlock( ) ref().unlock( )
> @@ -2372,13 +2384,13 @@
> # part of an object (roughly a Stack, directly or indirectly) that is
> # an attribute of the branch object itself. Since the BranchStore
> # cannot exist without a branch, it's safe to make it a weakref.
> - self.branch = weakref.ref(branch)
> + self.branch_ref = weakref.ref(branch)
>
> def lock_write(self, token=None):
> - return self.branch.
> + return self.branch_
>
> def unlock(self):
> - return self.branch.
> + return self.branch_
>
> @needs_write_lock
> def save(self):
How does that work?