svn-upgrade fails with a KeyError (in rebase generate_transpose_plan)

Bug #320113 reported by Wouter van Heyst
2
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
Fix Released
Medium
Jelmer Vernooij

Bug Description

I'm trying to see if svn-upgrade on a v3 branch would result in the same thing as a fresh v4 branch.

> bzr-experiment svn-upgrade
Using saved location: svn+ssh://source/home/wouter/tmp/kmx_svn/trunk/kmx
wouter@source's password:
bzr: ERROR: exceptions.KeyError: 'svn-v4:cd2972fe-eb09-0410-94ea-d8feb256cc61:trunk/kmx:8048'to fetch:copying revision:determining revisions to fetch:copying revision:determining revisions to fetch:copying revis

Traceback (most recent call last):
  File "/home/wouter/src/bzr/bzr.dev/bzrlib/commands.py", line 893, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/home/wouter/src/bzr/bzr.dev/bzrlib/commands.py", line 839, in run_bzr
    ret = run(*run_argv)
  File "/home/wouter/src/bzr/bzr.dev/bzrlib/commands.py", line 539, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/wouter/src/bzr/bzr.dev/bzrlib/commands.py", line 853, in ignore_pipe
    result = func(*args, **kwargs)
  File "/home/wouter/.bazaar/plugins/experiment/svn/__init__.py", line 348, in run
    allow_changes=True, verbose=verbose)
  File "/home/wouter/.bazaar/plugins/experiment/svn/foreign/upgrade.py", line 117, in upgrade_workingtree
    allow_changes=allow_changes, verbose=verbose)
  File "/home/wouter/.bazaar/plugins/experiment/svn/foreign/upgrade.py", line 165, in upgrade_branch
    allow_changes=allow_changes, verbose=verbose)
  File "/home/wouter/.bazaar/plugins/experiment/svn/foreign/upgrade.py", line 287, in upgrade_repository
    allow_changes=allow_changes)
  File "/home/wouter/.bazaar/plugins/experiment/svn/foreign/upgrade.py", line 253, in create_upgrade_plan
    graph, lambda revid: create_upgraded_revid(revid, new_mapping.upgrade_suffix))
  File "/home/wouter/.bazaar/plugins/experiment/rebase/rebase.py", line 226, in generate_transpose_plan
    replace_map[r] = (v, parent_map[v])
KeyError: 'svn-v4:cd2972fe-eb09-0410-94ea-d8feb256cc61:trunk/kmx:8048'

bzr 1.12dev on python 2.5.2 (linux2)
arguments: ['/home/wouter/src/bzr/bzr.dev/bzr', 'svn-upgrade']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.6]
  launchpad /home/wouter/src/bzr/bzr.dev/bzrlib/plugins/launchpad [unknown]
  netrc_credential_store /home/wouter/src/bzr/bzr.dev/bzrlib/plugins/netrc_credential_store [unknown]
  rebase /home/wouter/.bazaar/plugins/experiment/rebase [0.4.3dev]
  svn /home/wouter/.bazaar/plugins/experiment/svn [0.5rc1]
*** 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
Jelmer Vernooij (jelmer) wrote : Re: [Bug 320113] [NEW] svn-upgrade fails with a KeyError (in rebase generate_transpose_plan)

This is not a public repository I presume ?

If not, any chance you can see in the svn logs what sort of changes
happened in r8048 exactly? Is it a bzr-svn revision?
--
Jelmer Vernooij <email address hidden> - http://samba.org/~jelmer/
Jabber: <email address hidden>

Revision history for this message
Wouter van Heyst (larstiq) wrote :

Yes, r8048 was a test commit made with bzr-svn 0.5.

The changes are an added line of whitespace in setup.py, which I think should be no problem, and then:

(output of svn diff -c 8048)

Property changes on: .
___________________________________________________________________
Modified: bzr:revision-info
   - timestamp: 2008-04-03 13:47:15.256000042 +0200
committer: ivo
properties:
        branch-nick: test2

   + timestamp: 2009-01-22 17:42:56.230999947 +0100
committer: wouter
properties:
        branch-nick: kmx

Modified: bzr:file-ids
   -
   + setup.py 1746@cd2972fe-eb09-0410-94ea-d8feb256cc61:trunk%2Fkmx:setup.py

Added: bzr:revision-id:v4
   + 645 wouter-20090122164256-tkf7gw99nx8xf9z7

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Please try with the latest bzr-rebase and bzr-svn. I've fixed several issues, I think it may fix this issue as well.

Jelmer Vernooij (jelmer)
Changed in bzr-svn:
status: New → Incomplete
Revision history for this message
Wouter van Heyst (larstiq) wrote :

This is not fixed with bzr-svn r2476 and bzr-rebase r122.

The stacktrace is similar, same (logical) line in rebase, line number is 230 now. Same key that raises the KeyError.

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 320113] Re: svn-upgrade fails with a KeyError (in rebase generate_transpose_plan)

Wouter confirmed this bug is still there.

  status triaged
  importance medium
--
Jelmer Vernooij <email address hidden> - http://samba.org/~jelmer/
Jabber: <email address hidden>

Changed in bzr-svn:
importance: Undecided → Medium
status: Incomplete → Triaged
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Finally fixed.

Changed in bzr-svn:
assignee: nobody → jelmer
milestone: none → 0.5.0
status: Triaged → 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.