Code review comment for lp:~vila/bzr/config-lock-remote

Revision history for this message
Martin Pool (mbp) wrote :

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):

How does that work?

« Back to merge proposal