breaks when diffing against empty thread

Bug #253476 reported by Jelmer Vernooij on 2008-07-31
2
Affects Status Importance Assigned to Milestone
Loom
Medium
Unassigned

Bug Description

When using "bzr diff -rthread:" and the parent thread is an empty tree, loom falls over:

ganieda:/data/tmp/loom% bzr.dev diff -rthread:
/usr/lib/python2.5/site-packages/bzrlib/plugins/cia/__init__.py:188: DeprecationWarning: bzrlib.branch.BranchHooks.install_hook was deprecated in version 1.5.
  Branch.hooks.install_hook('post_commit', branch_commit_hook)
bzr: ERROR: bzrlib.errors.NoSuchRevision: KnitPackRepository('file:///data/tmp/loom/.bzr/repository/') has no revision ('empty:',)

Traceback (most recent call last):
  File "/data/jelmer/bzr/bzr.dev/bzrlib/commands.py", line 857, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/data/jelmer/bzr/bzr.dev/bzrlib/commands.py", line 797, in run_bzr
    ret = run(*run_argv)
  File "/data/jelmer/bzr/bzr.dev/bzrlib/commands.py", line 499, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/data/jelmer/bzr/bzr.dev/bzrlib/commands.py", line 818, in ignore_pipe
    result = func(*args, **kwargs)
  File "/home/jelmer/bzr/bzr.dev/bzrlib/builtins.py", line 1460, in run
    _get_trees_to_diff(file_list, revision, old, new)
  File "/data/jelmer/bzr/bzr.dev/bzrlib/diff.py", line 335, in _get_trees_to_diff
    old_tree = _get_tree_to_diff(old_revision_spec, working_tree, branch)
  File "/data/jelmer/bzr/bzr.dev/bzrlib/diff.py", line 376, in _get_tree_to_diff
    return branch.repository.revision_tree(revision_id)
  File "/data/jelmer/bzr/bzr.dev/bzrlib/decorators.py", line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/home/jelmer/bzr/bzr.dev/bzrlib/repository.py", line 1663, in revision_tree
    inv = self.get_revision_inventory(revision_id)
  File "/data/jelmer/bzr/bzr.dev/bzrlib/decorators.py", line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/home/jelmer/bzr/bzr.dev/bzrlib/repository.py", line 1627, in get_revision_inventory
    return self.get_inventory(revision_id)
  File "/data/jelmer/bzr/bzr.dev/bzrlib/decorators.py", line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/home/jelmer/bzr/bzr.dev/bzrlib/repository.py", line 1520, in get_inventory
    return self.iter_inventories([revision_id]).next()
  File "/home/jelmer/bzr/bzr.dev/bzrlib/repository.py", line 1538, in _iter_inventories
    for text, revision_id in self._iter_inventory_xmls(revision_ids):
  File "/home/jelmer/bzr/bzr.dev/bzrlib/repository.py", line 1549, in _iter_inventory_xmls
    raise errors.NoSuchRevision(self, record.key)
NoSuchRevision: KnitPackRepository('file:///data/tmp/loom/.bzr/repository/') has no revision ('empty:',)

bzr 1.6b4 on python 2.5.2 (linux2)
arguments: ['/home/jelmer/bzr/bzr.dev/bzr', 'diff', '-rthread:']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'de_DE.UTF-8'
plugins:
  avahi /home/jelmer/.bazaar/dev-plugins/avahi [unknown]
  builddeb /home/jelmer/.bazaar/dev-plugins/builddeb [0.96.0dev0]
  bzrtools /home/jelmer/.bazaar/dev-plugins/bzrtools [1.6.0]
  cia /usr/lib/python2.5/site-packages/bzrlib/plugins/cia [unknown]
  cvsps_import /usr/lib/python2.5/site-packages/bzrlib/plugins/cvsps_import [unknown]
  dbus /home/jelmer/.bazaar/dev-plugins/dbus.py [unknown]
  email /home/jelmer/.bazaar/dev-plugins/email [unknown]
  fastimport /home/jelmer/.bazaar/dev-plugins/fastimport [unknown]
  git /home/jelmer/.bazaar/dev-plugins/git [unknown]
  global_log /home/jelmer/.bazaar/dev-plugins/global_log [unknown]
  gnomevfs /home/jelmer/.bazaar/dev-plugins/gnomevfs [unknown]
  gtk /home/jelmer/.bazaar/dev-plugins/gtk [0.95.0dev1]
  jelmer /home/jelmer/.bazaar/dev-plugins/jelmer [unknown]
  launchpad /data/jelmer/bzr/bzr.dev/bzrlib/plugins/launchpad [unknown]
  loom /home/jelmer/.bazaar/dev-plugins/loom [1.4.0dev0]
  mergedirstatus /home/jelmer/.bazaar/dev-plugins/mergedirstatus [0.0.1dev0]
  pqm /home/jelmer/.bazaar/dev-plugins/pqm [1.0.0dev0]
  rebase /home/jelmer/.bazaar/dev-plugins/rebase [0.4.0dev0]
  search /home/jelmer/.bazaar/dev-plugins/search [1.6.0dev2]
  stats /home/jelmer/.bazaar/dev-plugins/stats [unknown]
  svn /home/jelmer/.bazaar/dev-plugins/svn [0.4.11exp0]
  upload /usr/lib/python2.5/site-packages/bzrlib/plugins/upload [0.1.0]
  vimdiff /home/jelmer/.bazaar/dev-plugins/vimdiff [unknown]
  webdav /home/jelmer/.bazaar/dev-plugins/webdav [1.6.0]
*** 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.

Changed in bzr-loom:
status: New → Confirmed
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers