Comment 0 for bug 98836

Revision history for this message
Martin Pool (mbp) wrote : can't do readonly operations during a commit in a dirstate tree

WorkingTree4 holds the dirstate lock while reading the commit message from the editor. So you can't run even readonly operations to see what it is going to be committed.

bzr: ERROR: bzrlib.errors.LockError: Lock error: [Errno 11] Resource temporarily unavailable

Traceback (most recent call last):
  File "/home/mbp/lib/python/bzrlib/commands.py", line 638, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/home/mbp/lib/python/bzrlib/commands.py", line 600, in run_bzr
    ret = run(*run_argv)
  File "/home/mbp/lib/python/bzrlib/commands.py", line 296, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/mbp/lib/python/bzrlib/commands.py", line 610, in ignore_pipe
    result = func(*args, **kwargs)
  File "/home/mbp/lib/python/bzrlib/builtins.py", line 1435, in run
    old_label=old_label, new_label=new_label)
  File "/home/mbp/lib/python/bzrlib/diff.py", line 357, in diff_cmd_helper
    old_tree = tree.basis_tree()
  File "/home/mbp/lib/python/bzrlib/workingtree.py", line 373, in basis_tree
    revision_id = self.get_parent_ids()[0]
  File "/home/mbp/lib/python/bzrlib/decorators.py", line 125, in read_locked
    self.lock_read()
  File "/home/mbp/lib/python/bzrlib/workingtree_4.py", line 562, in lock_read
    state.lock_read()
  File "/home/mbp/lib/python/bzrlib/dirstate.py", line 2216, in lock_read
    self._lock_token = lock.ReadLock(self._filename)
  File "/home/mbp/lib/python/bzrlib/lock.py", line 170, in __init__
    raise errors.LockError(e)
LockError: Lock error: [Errno 11] Resource temporarily unavailable

bzr 0.16.0dev0 on python 2.5.0.final.0 (linux2)
arguments: ['/home/mbp/bin/bzr', 'dif']

** please send this report to <email address hidden>
/home/mbp/lib/python/bzrlib/lock.py:79: UserWarning: lock on <open file u'/home/mbp/bzr/hpss-faster-copy/.bzr/checkout/dirstate', mode 'rb' at 0x844f7b8> not released
  warn("lock on %r not released" % self.f)