Inconsistent revnum

Bug #675184 reported by ChriS on 2010-11-14
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
Medium
Jelmer Vernooij

Bug Description

bzr checkout --lightweight svn+ssh://svn.forge.ocamlcore.org/svnroot/tuareg/trunk

reports

bzr: ERROR: exceptions.AssertionError: Inconsistent revnum, prefixes: 0,set([''])

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 853, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1055, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 661, in run_argv_aliases
    return self.run_direct(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 665, in run_direct
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 122, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 156, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 1328, in run
    accelerator_tree, hardlink)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/svn/branch.py", line 373, in create_checkout
    return self._create_lightweight_checkout(to_location, revision_id)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/svn/branch.py", line 366, in _create_lightweight_checkout
    wt = WorkingTree.open(to_location)
  File "/usr/lib/python2.6/dist-packages/bzrlib/workingtree.py", line 326, in open
    return control.open_workingtree(_unsupported)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/svn/workingtree.py", line 1066, in open_workingtree
    return SvnWorkingTree(self, self.local_path, self.entry)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/svn/workingtree.py", line 188, in __init__
    self._update_base_revnum(max_rev)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/svn/workingtree.py", line 686, in _update_base_revnum
    self.read_working_inventory()
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/svn/workingtree.py", line 541, in read_working_inventory
    add_dir_to_inv(u"", rootwc, None)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/svn/workingtree.py", line 498, in add_dir_to_inv
    (id, revid) = find_ids(relpath, entry, rootwc)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/svn/workingtree.py", line 475, in find_ids
    relpath)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/svn/workingtree.py", line 401, in path_to_file_id
    return self.lookup_id(path)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/svn/workingtree.py", line 747, in lookup_id
    return self.basis_idmap.lookup(self.mapping, path)[:2]
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/svn/workingtree.py", line 211, in basis_idmap
    self.mapping)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/svn/repository.py", line 732, in get_fileid_map
    return self.fileid_map.get_map(revmeta.get_foreign_revid(), mapping)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/svn/fileids.py", line 396, in get_map
    for revmeta, mapping in self.repos._iter_reverse_revmeta_mapping_history(branch, revnum, to_revnum=0, mapping=mapping):
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/svn/repository.py", line 807, in _iter_reverse_revmeta_mapping_history
    for revmeta in iter:
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/svn/util.py", line 165, in next
    return self.it()
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/svn/revmeta.py", line 983, in next
    ret = self._get_next()
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/svn/revmeta.py", line 1349, in iter_changes
    from_revnum, to_revnum, pb=pb):
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/svn/logwalker.py", line 107, in iter_prefixes_changes
    raise AssertionError("Inconsistent revnum, prefixes: %r,%r" % (revnum, prefixes))
AssertionError: Inconsistent revnum, prefixes: 0,set([''])

bzr 2.1.2 on python 2.6.6 (Linux-2.6.35.7-x86_64-with-debian-squeeze-sid)
arguments: ['/usr/bin/bzr', 'checkout', '--lightweight', 'svn+ssh://svn.forge.ocamlcore.org/svnroot/tuareg/trunk']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  bzrtools /usr/lib/python2.6/dist-packages/bzrlib/plugins/bzrtools [2.1.0]
  dbus /usr/lib/python2.6/dist-packages/bzrlib/plugins/dbus [0.1.0dev]
  explorer /usr/lib/python2.6/dist-packages/bzrlib/plugins/explorer [1.0.0]
  git /usr/lib/python2.6/dist-packages/bzrlib/plugins/git [0.5.2]
  gtk /usr/lib/python2.6/dist-packages/bzrlib/plugins/gtk [0.99.0dev1]
  hg /usr/lib/python2.6/dist-packages/bzrlib/plugins/hg [0.2.0dev]
  launchpad /usr/lib/python2.6/dist-packages/bzrlib/plugins/launchpad [2.1.2]
  netrc_credential_store /usr/lib/python2.6/dist-packages/bzrlib/plugins/netrc_credential_store [2.1.2]
  news_merge /usr/lib/python2.6/dist-packages/bzrlib/plugins/news_merge [2.1.2]
  qbzr /usr/lib/python2.6/dist-packages/bzrlib/plugins/qbzr [0.18.6]
  svn /usr/lib/python2.6/dist-packages/bzrlib/plugins/svn [1.0.3]

*** Bazaar has encountered an internal error. This probably indicates a
    bug in Bazaar. You can help us fix it by filing a bug report at
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.

ChriS (christophe-troestler) wrote :

Related to bug #675168

ChriS (christophe-troestler) wrote :
Download full text (4.3 KiB)

After upgrading to svn 1.0.5dev the checkout works but then " bzr log -r -2" reports

bzr: ERROR: exceptions.AssertionError: Expected 186, was (<CachingBzrRevisionMetadata for revision 192, path chris in repository 'a37b5e43-4b7f-4128-9b7a-df1949a3dd69'>,<bzrlib.plugins.svn.mapping4.BzrSvnMappingv4 object at 0x25c4450>) 185

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 917, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1117, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 691, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 710, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1132, in ignore_pipe
    result = func(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 2395, in run
    rev1, rev2 = _get_revision_range(revision, b, self.name())
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 2462, in _get_revision_range
    rev1 = rev2 = revisionspec_list[0].in_history(branch)
  File "/usr/lib/python2.6/dist-packages/bzrlib/revisionspec.py", line 224, in in_history
    return self._match_on_and_check(branch, revs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/revisionspec.py", line 203, in _match_on_and_check
    info = self._match_on(branch, revs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/revisionspec.py", line 322, in _match_on
    return self._try_spectype(RevisionSpec_revno, branch)
  File "/usr/lib/python2.6/dist-packages/bzrlib/revisionspec.py", line 311, in _try_spectype
    return rs.in_history(branch)
  File "/usr/lib/python2.6/dist-packages/bzrlib/revisionspec.py", line 224, in in_history
    return self._match_on_and_check(branch, revs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/revisionspec.py", line 203, in _match_on_and_check
    info = self._match_on(branch, revs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/revisionspec.py", line 365, in _match_on
    branch, revno, revision_id = self._lookup(branch, revs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/revisionspec.py", line 425, in _lookup
    revision_id = branch.get_rev_id(revno, revs_or_none)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/svn/branch.py", line 524, in get_rev_id
    assert revmeta.get_revno(mapping) == revno, "Expected %d, was (%r,%r) %d" % (revno, revmeta, mapping, revmeta.get_revno(mapping))
AssertionError: Expected 186, was (<CachingBzrRevisionMetadata for revision 192, path chris in repository 'a37b5e43-4b7f-4128-9b7a-df1949a3dd69'>,<bzrlib.plugins.svn.mapping4.BzrSvnMappingv4 object at 0x25c4450>) 185

bzr 2.3b3 on python 2.6.6 (Linux-2.6.35.7-x86_64-with-debian-squeeze-sid)
a...

Read more...

Martin Packman (gz) on 2010-11-14
affects: bzr → bzr-svn

On Sun, 2010-11-14 at 14:03 +0000, ChriS wrote:
> Public bug reported:
>
> bzr checkout --lightweight
> svn+ssh://svn.forge.ocamlcore.org/svnroot/tuareg/trunk
This appears to be fixed by one of the recent graph fixes in newer
versions of bzr-svn. At least, I can't reproduce it in trunk.

Marking this as closed for the moment, please reopen if you can still
reproduce it with trunk.

  affects bzr-svn
  status fixcommitted

Changed in bzr-svn:
status: New → Fix Committed
Bryan Cain (plombo) wrote :

I was affected by this bug using the version packaged in maverick, and I can confirm that it is fixed in trunk.

Jelmer Vernooij (jelmer) wrote :

Thanks for confirming!

Changed in bzr-svn:
importance: Undecided → Medium
Jelmer Vernooij (jelmer) on 2011-01-28
Changed in bzr-svn:
assignee: nobody → Jelmer Vernooij (jelmer)
milestone: none → 1.1.0
Jelmer Vernooij (jelmer) on 2011-08-26
Changed in bzr-svn:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers