Comment 2 for bug 305006

Revision history for this message
Henrik Steensland (henrik-steensland) wrote : Re: shelve fails with "Could not acquire lock"

Why is this not fixed in 1.11?
Not only does the command "bzr shelve" always fail on Windows, it is also complicated to recover from. See below.

> bzr version
Bazaar (bzr) 1.11
  Python interpreter: C:\Program\Bazaar\python25.dll 2.5.2
  Python standard library: C:\Program\Bazaar\lib\library.zip
  bzrlib: C:\Program\Bazaar\lib\library.zip\bzrlib

> bzr shelve
bzr: ERROR: Could not acquire lock "C:/src/.bzr/checkout/dirstate"

> bzr commit
Unable to obtain lock file:///C:/src/.bzr/checkout/lock
held by <email address hidden> on host lime [process #5416]
locked 33 seconds ago
Will continue to try until 09:57:09, unless you press Ctrl-C
If you're sure that it's not being modified, use bzr break-lock file:///C:/src/.bzr/checkout/lock
bzr: ERROR: Could not acquire lock "LockDir(file:///C:/src/.bzr/checkout/lock)"

> bzr break-lock .bzr\checkout\lock
Break lock file:///C:/src/.bzr/checkout/lock
held by <email address hidden> on host lime [process #5416]
locked 8 minutes, 3 seconds ago? [y/n]: y

> bzr shelve
bzr: ERROR: This tree contains left-over files from a failed operation.
    Please examine C:/src/.bzr/checkout/limbo to see if it contains any files you wish to keep, and delete it when you are done.

> rmdir /sq .bzr\checkout\limbo

> bzr shelve
bzr: ERROR: This tree contains left-over files from a failed operation.
    Please examine C:/src/.bzr/checkout/pending-deletion to see if it contains any files you wish to keep, and delete it when you are done.

> rmdir /sq .bzr\checkout\pending-deletion

> bzr shelve
bzr: ERROR: This tree contains left-over files from a failed operation.
    Please examine C:/src/.bzr/checkout/limbo to see if it contains any files you wish to keep, and delete it when you are done.

Again!?

> rmdir /sq .bzr\checkout\limbo

Now, we are finally back to square one.