KnitVersionedFile No default access_method or index any more

Bug #227828 reported by Mirko Friedenhagen
2
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
Fix Released
Undecided
Jelmer Vernooij

Bug Description

I upgraded bzr to 1.4 using the installer for Python2.5. I already had bzr-svn-0.49 installed and afterwards most bzr commands did not complete.

--- snip ---
D:\ws\default\mailservice-loadtest-bzr>bzr missing
Using last location: svn+https://<email address hidden>/svn/somesvnpath
bzr-svn is not up to date with installed bzr version 1.4.
There should be a newer version of bzr-svn available.
bzr: ERROR: exceptions.ValueError: No default access_method or index any more(None, None)

Traceback (most recent call last):
  File "C:\Dev\Python25\Lib\site-packages\bzrlib\commands.py", line 846, in run_bzr_catch_errors
    return run_bzr(argv)
  File "C:\Dev\Python25\Lib\site-packages\bzrlib\commands.py", line 802, in run_bzr
    ret = run(*run_argv)
  File "C:\Dev\Python25\Lib\site-packages\bzrlib\commands.py", line 504, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "C:\Dev\Python25\Lib\site-packages\bzrlib\commands.py", line 812, in ignore_pipe
    result = func(*args, **kwargs)
  File "C:\Dev\Python25\lib\site-packages\bzrlib\plugins\xmloutput\__init__.py", line 152, in run
    missing_class.run(self, *args, **kwargs)
  File "C:\Dev\Python25\Lib\site-packages\bzrlib\commands.py", line 812, in ignore_pipe
    result = func(*args, **kwargs)
  File "C:\Dev\Python25\Lib\site-packages\bzrlib\builtins.py", line 3337, in run
    remote_branch = Branch.open(other_branch)
  File "C:\Dev\Python25\Lib\site-packages\bzrlib\branch.py", line 111, in open
    return control.open_branch(_unsupported)
  File "C:\Dev\Python25\lib\site-packages\bzrlib\plugins\svn\remote.py", line 171, in open_branch
    repos = self.find_repository()
  File "C:\Dev\Python25\lib\site-packages\bzrlib\plugins\svn\remote.py", line 102, in find_repository
    return SvnRepository(self, transport, self.branch_path)
  File "C:\Dev\Python25\lib\site-packages\bzrlib\plugins\svn\repository.py", line 180, in __init__
    self.fileid_map = SimpleFileIdMap(self, cachedir_transport)
  File "C:\Dev\Python25\lib\site-packages\bzrlib\plugins\svn\fileids.py", line 234, in __init__
    CachingFileIdMap.__init__(self, cache_transport, FileIdMap(simple_apply_changes, repos))
  File "C:\Dev\Python25\lib\site-packages\bzrlib\plugins\svn\fileids.py", line 144, in __init__
    self.idmap_knit = KnitVersionedFile("fileidmap-v%d" % FILEIDMAP_VERSION, cache_transport, create=True)
  File "C:\Dev\Python25\lib\site-packages\bzrlib\knit.py", line 562, in __init__
    raise ValueError("No default access_method or index any more" + str((access_method, index)))
ValueError: No default access_method or index any more(None, None)

bzr 1.4 on python 2.5.1 (win32)
arguments: ['C:\\Dev\\Python25\\Scripts\\bzr', 'missing']
encoding: 'cp1252', fsenc: 'mbcs', lang: 'de'
plugins:
  launchpad C:\Dev\Python25\lib\site-packages\bzrlib\plugins\launchpad [unknown]
  svn C:\Dev\Python25\lib\site-packages\bzrlib\plugins\svn [0.4.9]
  xmloutput C:\Dev\Python25\lib\site-packages\bzrlib\plugins\xmloutput [0.4.2]
*** 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.

--- snap ---

I have fixed this by applying the suggestion of bzr-1.4rc1 (API breaks):
C:\Dokumente und Einstellungen\mifr\Anwendungsdaten\bazaar\2.0\plugins\svn>bzr info
Standalone tree (format: pack-0.92-subtree)
Location:
  branch root: .

Related branches:
  parent branch: http://people.samba.org/bzr/jelmer/bzr-svn/0.4.9/

C:\Dokumente und Einstellungen\mifr\Anwendungsdaten\bazaar\2.0\plugins\svn>bzr diff
=== modified file 'fileids.py'
--- fileids.py 2008-03-22 19:58:46 +0000
+++ fileids.py 2008-05-07 12:51:30 +0000
@@ -17,7 +17,7 @@

 from bzrlib import ui
 from bzrlib.errors import NotBranchError, RevisionNotPresent
-from bzrlib.knit import KnitVersionedFile
+from bzrlib.knit import make_file_knit
 from bzrlib.revision import NULL_REVISION
 from bzrlib.trace import mutter

@@ -141,7 +141,7 @@
 class CachingFileIdMap:
     """A file id map that uses a cache."""
     def __init__(self, cache_transport, actual):
- self.idmap_knit = KnitVersionedFile("fileidmap-v%d" % FILEIDMAP_VERSION, cache_transport, create=True)
+ self.idmap_knit = make_file_knit("fileidmap-v%d" % FILEIDMAP_VERSION, cache_transport, create=True)
         self.actual = actual
         self.apply_changes = actual.apply_changes

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

The version of bzr-svn you are using is not compatible with Bazaar 1.4, see the second line of output. The 0.4 branch will work with 1.4.

Changed in bzr-svn:
status: New → Invalid
status: Invalid → New
Revision history for this message
Mirko Friedenhagen (mfriedenhagen) wrote :

 * Well, then maybe the branch naming is a bit misleading :-):

 * On http://bazaar-vcs.org/BzrForeignBranches/Subversion?highlight=(svn)#branches it states that trunk is bleeding edge, launchpad tells correctly that 0.4 is the current development focus and 0.4.9 tricked me into thinking, it would be newer than 0.4

 Best Regards

Revision history for this message
Mirko Friedenhagen (mfriedenhagen) wrote :

 * I now installed http://people.samba.org/bzr/jelmer/bzr-svn/0.4/.
 * The repo is rather big (>200000 revisions). Now if I use 0.4 and execute `bzr pull` it will run immediately to the last revision pulled before and then stop and do nothing forever.
 * Do I have to checkout the project freshly?

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

0.4.10 works with bazaar >= 1.4

Changed in bzr-svn:
assignee: nobody → jelmer
status: New → 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.