[MERGE][0.15] a few pointers needed for solving a bug

Martin Pool mbp at sourcefrog.net
Sat Mar 24 03:03:34 GMT 2007


On 3/23/07, John Arbash Meinel <john at arbash-meinel.com> wrote:

> The reason it was random, was because the _get_entry() code has the
> chance to look for an entry either where it was renamed from, or where
> it was renamed to. If it found it at 'renamed to', then it would
> succeed. If it found it at "renamed from", then it would follow the
> rename pointer, and end up at the wrong location.
>
> Fortunately, we had a check against this happening.
>
> Anyway, the attached patch has the single line fix:

This fails with

ERROR: test_set_path_id_no_parents
(bzrlib.tests.test_dirstate.TestDirStateManipulations)

vvvv[log from bzrlib.tests.test_dirstate.TestDirStateManipulations.test_set_path_id_no_parents]
trying to create missing lock
'/home/mbp/bzr/2336/test0000.tmp/test_dirstate.TestDirStateManipulations.test_set_path_id_no_parents/work/dirstate'

^^^^[log from bzrlib.tests.test_dirstate.TestDirStateManipulations.test_set_path_id_no_parents]
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/mbp/bzr/2336/bzrlib/tests/test_dirstate.py", line 536,
in test_set_path_id_no_parents
    state._validate()
  File "/home/mbp/bzr/2336/bzrlib/dirstate.py", line 2197, in _validate
    for entry in self._iter_entries():
  File "/home/mbp/bzr/2336/bzrlib/dirstate.py", line 1477, in _iter_entries
    self._read_dirblocks_if_needed()
  File "/home/mbp/bzr/2336/bzrlib/dirstate.py", line 1532, in
_read_dirblocks_if_needed
    self._read_header_if_needed()
  File "/home/mbp/bzr/2336/bzrlib/dirstate.py", line 1655, in
_read_header_if_needed
    raise errors.ObjectNotLocked(self)
ObjectNotLocked: DirState('dirstate') is not locked

I think this should be a simple matter; I'll fix it up and merge to 0.15.

-- 
Martin



More information about the bazaar mailing list