Comment 2 for bug 248932

Revision history for this message
Martin von Gagern (gagern) wrote :

The reconfiguration was indeed not successful, as I just found out while trying to revert on the working copy I had tried to reconfigure before. This can be reproduced as follows:

$ bzr init-repo --rich-root-pack repo
$ cd repo
$ bzr init branch
$ cd branch
$ echo foo > file
$ bzr add
$ bzr ci -m r1
$ bzr reconfigure --standalone
(errors as described above)
$ echo bar > file
$ bzr revert
bzr: ERROR: bzrlib.errors.NoSuchRevision: KnitPackRepository('file://.../repo/branch/.bzr/repository/') has no revision ('...',)

Traceback (most recent call last):
  File "bzr.dev/bzrlib/commands.py", line 857, in run_bzr_catch_errors
    return run_bzr(argv)
  File "bzr.dev/bzrlib/commands.py", line 797, in run_bzr
    ret = run(*run_argv)
  File "bzr.dev/bzrlib/commands.py", line 499, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "bzr.dev/bzrlib/builtins.py", line 3147, in run
    self._revert_tree_to_revision(tree, revision, file_list, no_backup)
  File "bzr.dev/bzrlib/builtins.py", line 3160, in _revert_tree_to_revision
    tree.branch.repository.revision_tree(rev_id),
  File "bzr.dev/bzrlib/decorators.py", line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File "bzr.dev/bzrlib/repository.py", line 1652, in revision_tree
    inv = self.get_revision_inventory(revision_id)
  File "bzr.dev/bzrlib/decorators.py", line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File "bzr.dev/bzrlib/repository.py", line 1615, in get_revision_inventory
    return self.get_inventory(revision_id)
  File "bzr.dev/bzrlib/decorators.py", line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File "bzr.dev/bzrlib/repository.py", line 1508, in get_inventory
    return self.iter_inventories([revision_id]).next()
  File "bzr.dev/bzrlib/repository.py", line 1526, in _iter_inventories
    for text, revision_id in self._iter_inventory_xmls(revision_ids):
  File "bzr.dev/bzrlib/repository.py", line 1537, in _iter_inventory_xmls
    raise errors.NoSuchRevision(self, record.key)
NoSuchRevision: KnitPackRepository('file://.../repo/branch/.bzr/repository/') has no revision ('...',)

bzr 1.6b3 on python 2.5.2 (linux2)
arguments: ['bzr.dev/bzr', 'revert']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'de_DE.utf8'
plugins:
  bzrtools site-packages/bzrlib/plugins/bzrtools [1.6.0]
  launchpad bzr.dev/bzrlib/plugins/launchpad [unknown]
  svn $HOME/.bazaar/plugins/svn [0.4.11exp0]
*** 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.

I consider the problem quite serious, as it can severely damage a branch. Unless you have backups around, this could cause serious trouble. Thus I suggest an increase to the importance of this issue.