bzr: ERROR: exceptions.KeyError: 0

Bug #377063 reported by Marius Kruger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Invalid
Undecided
Unassigned
Bazaar Subversion Plugin
Fix Released
High
Jelmer Vernooij

Bug Description

traceback when trying to push a bzr branch (for the first time) into svn.
I'm running a freshly pulled bzr-svn and subvertpy and python-tdb 1.1.3~git20081222-2build1 (I could not find the source otherwise I would have tried to upgrade).
I assume the workaround is to uninstall python-tdb?!

$ bzr push https://<email address hidden>/trunk/xx
bzr: ERROR: exceptions.KeyError: 0

Traceback (most recent call last):
  File "/stuph/projects/bzr/bzr.repo/bzr.dev/bzrlib/commands.py", line 729, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/stuph/projects/bzr/bzr.repo/bzr.dev/bzrlib/commands.py", line 924, in run_bzr
    ret = run(*run_argv)
  File "/stuph/projects/bzr/bzr.repo/bzr.dev/bzrlib/commands.py", line 560, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/amanica/.bazaar/plugins/bzr_push_and_update/__init__.py", line 75, in run
    return builtins.cmd_push.run(self, *args, **kwargs)
  File "/stuph/projects/bzr/bzr.repo/bzr.dev/bzrlib/builtins.py", line 1076, in run
    use_existing_dir=use_existing_dir)
  File "/stuph/projects/bzr/bzr.repo/bzr.dev/bzrlib/push.py", line 128, in _show_push_branch
    remember)
  File "/home/amanica/.bazaar/plugins/svn/remote.py", line 243, in push_branch
    target_branch = self.open_branch()
  File "/home/amanica/.bazaar/plugins/svn/remote.py", line 227, in open_branch
    branch = SvnBranch(repos, self.branch_path)
  File "/home/amanica/.bazaar/plugins/svn/branch.py", line 172, in __init__
    self.layout = self.repository.get_layout()
  File "/home/amanica/.bazaar/plugins/svn/repository.py", line 578, in get_layout
    return self.get_layout_source()[0]
  File "/home/amanica/.bazaar/plugins/svn/repository.py", line 600, in get_layout_source
    self._find_guessed_layout()
  File "/home/amanica/.bazaar/plugins/svn/repository.py", line 618, in _find_guessed_layout
    revnum, self._hinted_branch_path)
  File "/home/amanica/.bazaar/plugins/svn/layout/guess.py", line 143, in repository_guess_layout
    repository._log.iter_changes(None, revnum, max(0, revnum-GUESS_SAMPLE_SIZE)), revnum, branch_path)
  File "/home/amanica/.bazaar/plugins/svn/layout/guess.py", line 101, in guess_layout_from_history
    for (revpaths, revnum, revprops) in changed_paths:
  File "/home/amanica/.bazaar/plugins/svn/logwalker.py", line 74, in iter_changes
    revprops = revprop_list(revnum)
  File "/home/amanica/.bazaar/plugins/svn/logwalker.py", line 195, in revprop_list
    (known_revprops, has_all_revprops) = self.cache.get_revprops(revnum)
  File "/home/amanica/.bazaar/plugins/svn/cache/tdbcache.py", line 255, in get_revprops
    return (ret[0], bool(ret[1]))
KeyError: 0

bzr 1.15dev on python 2.6.2 (linux2)
arguments: ['/stuph/bin/bzr', 'push', 'https://<email address hidden>/trunk/xx']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_ZA.UTF-8'
plugins:
  authors /home/amanica/.bazaar/plugins/authors [unknown]
  bisect /home/amanica/.bazaar/plugins/bisect [1.1.0.pre.0]
  bookmarks /home/amanica/.bazaar/plugins/bookmarks [unknown]
  bzr_push_and_update /home/amanica/.bazaar/plugins/bzr_push_and_update [0.2dev]
  bzrtools /home/amanica/.bazaar/plugins/bzrtools [1.14]
  difftools /home/amanica/.bazaar/plugins/difftools [0.91]
  docdiff /home/amanica/.bazaar/plugins/docdiff [0.9]
  email /home/amanica/.bazaar/plugins/email [unknown]
  extcommand /home/amanica/.bazaar/plugins/extcommand [unknown]
  fastimport /home/amanica/.bazaar/plugins/fastimport [0.8dev]
  gtk /home/amanica/.bazaar/plugins/gtk [0.96.0.dev.1]
  launchpad /stuph/projects/bzr/bzr.repo/bzr.dev/bzrlib/plugins/launchpad [1.15dev]
  lessdiff /home/amanica/.bazaar/plugins/lessdiff [unknown]
  lesslog /home/amanica/.bazaar/plugins/lesslog [unknown]
  merge_into /home/amanica/.bazaar/plugins/merge_into [unknown]
  multilocation /home/amanica/.bazaar/plugins/multilocation [1.0.0.dev.1]
  multiuser /home/amanica/.bazaar/plugins/multiuser [1.0.0.dev.1]
  netrc_credential_store /stuph/projects/bzr/bzr.repo/bzr.dev/bzrlib/plugins/netrc_credential_store [1.15dev]
  qbzr /home/amanica/.bazaar/plugins/qbzr [0.10dev]
  rebase /home/amanica/.bazaar/plugins/rebase [0.4.3dev]
  recursive_upgrade /home/amanica/.bazaar/plugins/recursive_upgrade [unknown]
  rxrename /home/amanica/.bazaar/plugins/rxrename [0.0.1 pre-alpha]
  scmproj /home/amanica/.bazaar/plugins/scmproj [0.4.5.dev.2]
  shell_hooks /home/amanica/.bazaar/plugins/shell_hooks [1.0dev]
  stats /home/amanica/.bazaar/plugins/stats [unknown]
  svn /home/amanica/.bazaar/plugins/svn [0.6dev]
  text_checker /home/amanica/.bazaar/plugins/text_checker [0.3.0.dev.1]
  update_mirrors /home/amanica/.bazaar/plugins/update_mirrors [unknown]
  xmloutput /home/amanica/.bazaar/plugins/xmloutput [0.8.3]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

Revision history for this message
Marius Kruger (amanica) wrote :

yes, uninstalling python-tdb worked.
I have tracked down the tdb source, let me know if you need me to install it and test if for you.

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 377063] [NEW] bzr: ERROR: exceptions.KeyError: 0

On Fri, May 15, 2009 at 07:29:58PM -0000, Marius Kruger wrote:
> Public bug reported:

> traceback when trying to push a bzr branch (for the first time) into svn.
> I'm running a freshly pulled bzr-svn and subvertpy and python-tdb 1.1.3~git20081222-2build1 (I could not find the source otherwise I would have tried to upgrade).
> I assume the workaround is to uninstall python-tdb?!

> $ bzr push https://<email address hidden>/trunk/xx
What happens if you remove ~/.bazaar/svn-cache/ and try again ? We
were writing incorrect values into the tdb database at one point, so
I *think* that should fix it. If it doesn't, please reopen.

  affects bzr
  status invalid

  affects bzr-svn
  importance high
  status fixreleased

Cheers,

Jelmer

Changed in bzr-svn:
importance: Undecided → High
status: New → Fix Released
Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 377063] Re: bzr: ERROR: exceptions.KeyError: 0

On Fri, May 15, 2009 at 08:56:26PM -0000, Marius Kruger wrote:
> yes, uninstalling python-tdb worked.
> I have tracked down the tdb source, let me know if you need me to install it and test if for you.
This is a bzr-svn issue, I don't think the version of TDB would be
relevant. Any chance you can try again with the suggestion I mentioned
in my other email, with TDB installed ?

Cheers,

Jelmer

Revision history for this message
Marius Kruger (amanica) wrote :

2009/5/16 Jelmer Vernooij <email address hidden>

> On Fri, May 15, 2009 at 08:56:26PM -0000, Marius Kruger wrote:
> > yes, uninstalling python-tdb worked.
> > I have tracked down the tdb source, let me know if you need me to install
> it and test if for you.
> This is a bzr-svn issue, I don't think the version of TDB would be
> relevant. Any chance you can try again with the suggestion I mentioned
> in my other email, with TDB installed ?

sjucks, CNR.
I installed tdb again, and I pushed the same branch now to a different
server with a similar setup,
with no problem. Is it possible that then non-tdb push which worked fixed
it?

I don't want to push it to another directory on the original server because
I'm not sure how to delete it again. If it happens again, I'll let you know
if deleting the cache helps.

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