Cannot perform "bzr mv" on a working tree while the repository is locked.

Bug #54107 reported by Andrew Bennetts
2
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Robert Collins

Bug Description

I have a repository with a number of branches inside it:

    repo/
    repo/branch1
    repo/branch2
    ...

The problem is that if do a "bzr branch http://remote/branch repo/new-branch", and while waiting for that in a seperate terminal I do: "cd repo/branch1; bzr mv file-a file-b", I get a message like this:

$ bzr mv database/schema/patch-40-99-0.sql database/schema/patch-40-65-0.sql
bzr: ERROR: Could not acquire lock LockDir(file:///home/andrew/warthogs/launchpad/.bzr/repository/lock)

It seems that even though "bzr mv" should only need to modify the working tree, it's unnecessarily trying to lock the repository as well.

Revision history for this message
John A Meinel (jameinel) wrote :

The basic flow is that WorkingTree always locks Branch which always locks Repository.
As Andrew points out, there are instances where we want a write-lock on WorkingTree, but really we only need a read-lock on Branch and Repo.
(building the working tree, moving files, etc would all be instances of this).
We've discussed and want to add a locking mechanism which has more customization about what gets locked.

Changed in bzr:
importance: Untriaged → Medium
status: Unconfirmed → Confirmed
Revision history for this message
John A Meinel (jameinel) wrote :

This probably needs to be turned into a spec, and fully fleshed out. Removing milestone, since it won't be in 0.10, and it is more involved than a simple bugfix

Revision history for this message
John A Meinel (jameinel) wrote :

This is fixed in 0.11 by Roberts 'lock_tree_write()' changes.

Changed in bzr:
assignee: nobody → lifeless
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.