renaming out of directory with unicode name fails with InconsistentDelta

Bug #185211 reported by Christian Tschabuschnig
8
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
High
Rory Yorke

Bug Description

Importing a SVN-dump with
bzr svn-import -v --standalone --trees ../subversion_dump_20080122 BZR
completes without error. When I try to rename a directory containing non-ASCII-characters
the following bzr commit fails. The error is shown here: http://launchpadlibrarian.net/11488753/trace2.txt

Related branches

Revision history for this message
Christian Tschabuschnig (tschaboo) wrote :

After several tries, I was able to reproduce the problem, starting with an empty repository.
I attached three of them. It seems that the problem only appears if it's a directory which
has files in it.

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 185211] Re: bzr commit fails on imported branch when renaming a directory with non-ASCII-name

Hi Christian,

On Wed, Jan 23, 2008 at 01:30:40AM -0000, Christian Tschabuschnig wrote:
> After several tries, I was able to reproduce the problem, starting with an empty repository.
> I attached three of them. It seems that the problem only appears if it's a directory which
> has files in it.

> ** Attachment added: "history.txt"
> http://launchpadlibrarian.net/11489882/history.txt
Thanks, this is extremely useful to be able to fix this bug. I'll have a
look at fixing it in the next couple of days. It shouldn't be too hard,
probably just a missing .encode/.decode call somewhere.

Cheers,

Jelmer

--

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: bzr commit fails on imported branch when renaming a directory with non-ASCII-name

I just reconfirmed this without using bzr-svn.

Changed in bzr-svn:
status: New → Confirmed
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

This is not a bzr-svn issue, the attached shell script reproduces it by using just core Bazaar.

Revision history for this message
Robert Collins (lifeless) wrote :

This indicates a dirstate delta update bug - we need to examine this urgently.

Changed in bzr:
importance: Undecided → Critical
Revision history for this message
Robert Collins (lifeless) wrote :

Here is a minimal version of the failure as shell:

Martin Pool (mbp)
Changed in bzr:
milestone: none → 1.2
Martin Pool (mbp)
Changed in bzr:
importance: Critical → High
Revision history for this message
Ismail Onur Filiz (onurf) wrote :

I am not sure if it is the same bug, but I can obtain the same backtrace with the attached shell script, independent of an encoding issue.

I basically split a subdirectory of a repository. If the subdirectory is empty, everything is fine. But if it contains a versioned file, I hit the bug.

Revision history for this message
codeslinger (codeslinger) wrote :

it sounds like there are two bugs here?

but the problem with special chars in a file name is probably a dup of Bug #135320

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

Robert's script still fails in bzr 2.2dev as follows:

0.827 Traceback (most recent call last):
  File "/home/mbp/bzr/trunk/bzrlib/commands.py", line 835, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/home/mbp/bzr/trunk/bzrlib/commands.py", line 1039, in run_bzr
    ret = run(*run_argv)
  File "/home/mbp/bzr/trunk/bzrlib/commands.py", line 643, in run_argv_aliases
    return self.run_direct(**all_cmd_args)
  File "/home/mbp/bzr/trunk/bzrlib/commands.py", line 647, in run_direct
    return self._operation.run_simple(*args, **kwargs)
  File "/home/mbp/bzr/trunk/bzrlib/cleanup.py", line 122, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/home/mbp/bzr/trunk/bzrlib/cleanup.py", line 156, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/home/mbp/bzr/trunk/bzrlib/builtins.py", line 3167, in run
    exclude=safe_relpath_files(tree, exclude))
  File "/home/mbp/bzr/trunk/bzrlib/decorators.py", line 194, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/home/mbp/bzr/trunk/bzrlib/workingtree_4.py", line 197, in commit
    result = WorkingTree3.commit(self, message, revprops, *args, **kwargs)
  File "/home/mbp/bzr/trunk/bzrlib/decorators.py", line 194, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/home/mbp/bzr/trunk/bzrlib/mutabletree.py", line 225, in commit
    *args, **kwargs)
  File "/home/mbp/bzr/trunk/bzrlib/commit.py", line 257, in commit
    possible_master_transports=possible_master_transports)
  File "/home/mbp/bzr/trunk/bzrlib/cleanup.py", line 118, in run
    self.cleanups, self.func, self, *args, **kwargs)
  File "/home/mbp/bzr/trunk/bzrlib/cleanup.py", line 156, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/home/mbp/bzr/trunk/bzrlib/commit.py", line 431, in _commit
    self.builder.get_basis_delta())
  File "/home/mbp/bzr/trunk/bzrlib/workingtree_4.py", line 1258, in update_basis_by_delta
    self.current_dirstate().update_basis_by_delta(delta, new_revid)
  File "/home/mbp/bzr/trunk/bzrlib/dirstate.py", line 1542, in update_basis_by_delta
    self._update_basis_apply_adds(adds)
  File "/home/mbp/bzr/trunk/bzrlib/dirstate.py", line 1609, in _update_basis_apply_adds
    'working tree does not contain new entry')
InconsistentDelta: An inconsistent delta was supplied involving 'abc\x93\xc3\x83\xc5\x93abc/bar', 'bar-20100315043854-tn8t7n0kt4upkuj8-2'
reason: working tree does not contain new entry

tags: added: dirstate unicode
Changed in bzr:
milestone: 1.2 → none
summary: - bzr commit fails on imported branch when renaming a directory with non-
- ASCII-name
+ renaming out of directory with unicode name fails with InconsistentDelta
Rory Yorke (ryorke)
Changed in bzr:
assignee: nobody → Rory Yorke (ryorke)
Martin Packman (gz)
Changed in bzr:
milestone: none → 2.5b5
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.