ยท @Martin: The repository is an empty one, I can reproduce the failure just creating a new repo, branching it on a client, making some changes, and then trying to push it. Thankfully, there's no need to recover the data. That only corrupts the repo on the server, on the client all the btree leafs have an integer size. I'm almost sure that the repo manager is the one breaking things up, but I don't know why :S It's curious that the indexes files were created correctly (have non zero size), but the pack-names file has the None values. In a few words, what the repo manager does is run a simple wrapper script around bzr serve and then uses a bzr plugin to check the user rights. To pass the user to the plugin the only way I've found is including it on the directory option of bzr serve (that's what the wrapper is for, at first, my intention was to check the user rights on the wrapper before calling bzr serve, but at that point in bzr you do not have this information, right?). - ssh starts the wrapper with the username of the ssh key used - the wrapper then starts bzr serve with the user on the directory option (this step is no more needed, you can start bzr serve from the ssh config) - bzr server starts the plugin - the plugin then registers a transport to check the user rights for each command executed There is also a post_update hook, but it's not used yet at this point of the execution. Running 'bzr check' throws the same exception: Checking working tree at '/home/bzr/repositories/bazitis-admin'. bzr: ERROR: exceptions.ValueError: invalid literal for int() with base 10: 'None' Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 924, in exception_to_return_code return the_callable(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 1124, in run_bzr ret = run(*run_argv) File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 689, in run_argv_aliases return self.run(**all_cmd_args) File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 711, in run return self._operation.run_simple(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 135, in run_simple self.cleanups, self.func, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups result = func(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/bzrlib/builtins.py", line 3327, in run check_dwim(path, verbose, do_branch=branch, do_repo=repo, do_tree=tree) File "/usr/lib/python2.7/dist-packages/bzrlib/check.py", line 421, in check_dwim scan_tree(None, base_tree, needed_refs, to_unlock) File "/usr/lib/python2.7/dist-packages/bzrlib/check.py", line 394, in scan_tree tree.lock_read() File "/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.py", line 571, in lock_read self.branch.lock_read() File "/usr/lib/python2.7/dist-packages/bzrlib/branch.py", line 2502, in lock_read self.repository.lock_read() File "/usr/lib/python2.7/dist-packages/bzrlib/repofmt/pack_repo.py", line 2416, in lock_read self._refresh_data() File "/usr/lib/python2.7/dist-packages/bzrlib/repofmt/pack_repo.py", line 2340, in _refresh_data self._pack_collection.reload_pack_names() File "/usr/lib/python2.7/dist-packages/bzrlib/repofmt/pack_repo.py", line 2041, in reload_pack_names first_read = self.ensure_loaded() File "/usr/lib/python2.7/dist-packages/bzrlib/repofmt/pack_repo.py", line 1668, in ensure_loaded self._names[name] = self._parse_index_sizes(value) File "/usr/lib/python2.7/dist-packages/bzrlib/repofmt/pack_repo.py", line 1680, in _parse_index_sizes return tuple([int(digits) for digits in value.split(' ')]) ValueError: invalid literal for int() with base 10: 'None' I'm more interested in how those values got there and why, to avoid corrupting the repository again and again. Do you know where are they generated? And how? I'm trying to navigate through the code, but it's quite large :S Thanks, David