keyerror when branching a remove https repository

Bug #64831 reported by Stijn Hoop
6
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
Fix Released
Critical
Jelmer Vernooij

Bug Description

[stijn@pcbcf001] <~/src/bzr> bzr branch svn+https://svn.sandcat.nl/repos/sws/trunk
bzr: ERROR: exceptions.KeyError: '18'

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 611, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 573, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 282, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.4/site-packages/bzrlib/builtins.py", line 722, in run
    revision_id, basis_dir)
  File "/home/stijn/.bazaar/plugins/svn/format.py", line 80, in sprout
    result_repo = repo.clone(result, revision_id, basis)
  File "/usr/lib/python2.4/site-packages/bzrlib/decorators.py", line 38, in read_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.4/site-packages/bzrlib/repository.py", line 301, in clone
    self.copy_content_into(result, revision_id, basis)
  File "/usr/lib/python2.4/site-packages/bzrlib/repository.py", line 253, in copy_content_into
    return InterRepository.get(self, destination).copy_content(revision_id, basis)
  File "/usr/lib/python2.4/site-packages/bzrlib/decorators.py", line 51, in write_locked
    return unbound(self, *args, **kwargs)
  File "/home/stijn/.bazaar/plugins/svn/fetch.py", line 281, in copy_content
    for (branch, changes, revnum) in \
  File "/home/stijn/.bazaar/plugins/svn/logwalker.py", line 125, in follow_history
    rev = self.revisions[str(i)]
  File "/usr/lib/python2.4/bsddb/dbshelve.py", line 106, in __getitem__
    data = self.db[key]
KeyError: '18'

bzr 0.11.0 on python 2.4.3.final.0 (linux2)
arguments: ['/usr/bin/bzr', 'branch', 'svn+https://svn.sandcat.nl/repos/sws/trunk']

This is on Dapper, with jelmer's python-subversion, python2.4-subversion and libsvn0 packages installed.

The repo branched is a publicly readable one, so this should be reproduceable.

Jelmer Vernooij (jelmer)
Changed in bzr-svn:
assignee: nobody → jelmer
importance: Undecided → Medium
status: Unconfirmed → Confirmed
Jelmer Vernooij (jelmer)
Changed in bzr-svn:
importance: Medium → Critical
Revision history for this message
Erik Bågfors (zindar) wrote :

I get the same error when trying to branch mplayer trunk
bzr branch svn://svn.mplayerhq.hu/mplayer/trunk mplayer-trunk

So this is not dependent on https....

bzr: ERROR: exceptions.KeyError: '26'

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 623, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 585, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 291, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.4/site-packages/bzrlib/builtins.py", line 723, in run
    revision_id, basis_dir)
  File "/home/bagfors/.bazaar/plugins/svn/format.py", line 80, in sprout
    result_repo = repo.clone(result, revision_id, basis)
  File "/usr/lib/python2.4/site-packages/bzrlib/decorators.py", line 38, in read_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.4/site-packages/bzrlib/repository.py", line 309, in clone
    self.copy_content_into(result, revision_id, basis)
  File "/usr/lib/python2.4/site-packages/bzrlib/repository.py", line 261, in copy_content_into
    return InterRepository.get(self, destination).copy_content(revision_id, basis)
  File "/usr/lib/python2.4/site-packages/bzrlib/decorators.py", line 51, in write_locked
    return unbound(self, *args, **kwargs)
  File "/home/bagfors/.bazaar/plugins/svn/fetch.py", line 281, in copy_content
    for (branch, changes, revnum) in \
  File "/home/bagfors/.bazaar/plugins/svn/logwalker.py", line 125, in follow_history
    rev = self.revisions[str(i)]
  File "bsddb/dbshelve.py", line 106, in __getitem__
KeyError: '26'

bzr 0.12.0 on python 2.4.4.candidate.1 (linux2)
arguments: ['/usr/bin/bzr', 'branch', 'svn://svn.mplayerhq.hu/mplayer/trunk', 'mplayer-trunk']

** please send this report to <email address hidden>

Revision history for this message
David Cournapeau (david-ar) wrote :

I have exactly the same problem with the following svn trunks:

http://svn.scipy.org/svn/numpy/trunk (using branch svn+http://svn.scipy.org/svn/numpy/trunk numpy.bzr)

http://svn.scipy.org/svn/scipy/trunkbzr (using branch svn+http://svn.scipy.org/svn/zcipy/trunk scipy.bzr)

with bzr 0.12.0 on edgy and last bzr.svn (rev 230).

It looks like for some reason, after the step "fetching svn revision is complete", the variable self.revisions in logwalker.LogWalker.follow_history has the first revisions removed (not always the same number: from 0 to 6 when branching everyting from numpy, from 0 to 18 when branching everything from scipy).

Revision history for this message
David Cournapeau (david-ar) wrote :

I don't know if this is relevant, but the SvnBranch._generate_revision_history is called twice when trying to branch, and the self.revisions variable has its first revisions removed only at the second time

Jelmer Vernooij (jelmer)
Changed in bzr-svn:
status: Confirmed → In Progress
Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 64831] keyerror when branching a remove https repository

  status fixcommitted

Fixed in revision <email address hidden>
--
Jelmer Vernooij <email address hidden> - http://samba.org/~jelmer/

Changed in bzr-svn:
status: In Progress → Fix Committed
Revision history for this message
David Cournapeau (david-ar) wrote :

Ok, I upgraded bzr.svn and bzr to 0.13, and now, I have other kind of errors:

DBError: (5, 'Input/output error -- read: 0x8381d40, 16384: Input/output error')

I first thought it was the same kind of errors, but after having debug an other problem in bzr, I realized that this error is specific to my setup, where my home is on NFS share. Should I open a new bug ?

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 64831] Re: keyerror when branching a remove https repository

On Thu, 2006-12-07 at 05:07 +0000, David Cournapeau wrote:
> Ok, I upgraded bzr.svn and bzr to 0.13, and now, I have other kind of
> errors:
>
> DBError: (5, 'Input/output error -- read: 0x8381d40, 16384: Input/output
> error')
>
> I first thought it was the same kind of errors, but after having debug
> an other problem in bzr, I realized that this error is specific to my
> setup, where my home is on NFS share. Should I open a new bug ?
Please do. This'll most likely be fixed once we trade bsddb for sqlite3.

Cheers,

Jelmer

Jelmer Vernooij (jelmer)
Changed in bzr-svn:
status: Fix Committed → 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.