RevisionNotPresent in iter_reverse_revision_history running "bzr tags" on a branch with mainline ghosts

Bug #397556 reported by Tom Cato Amundsen
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Jelmer Vernooij
Nominated for 2.0 by Tom Cato Amundsen

Bug Description

bzr tags fails on http://solfege.org/bzr/solfege.dev/ since it has ghosts. Tried to upgrade to "2a" format just to see what happens. The upgrade seems to go ok, but the ghost problem is the same.

tom@tomsin-laptop:~/tmp/up/solfege.dev$ /home/tom/tmp/bzr/bzr.dev/bzr tags
bzr: ERROR: Revision {Arch-1:<email address hidden>%solfege--unstable--3.1--version-0} not present in "KnitPackRepository('file:///home/tom/tmp/up/solfege.dev/.bzr/repository/')".

tom@tomsin-laptop:~/tmp/up/solfege.dev$ /home/tom/tmp/bzr/bzr.dev/bzr version
Bazaar (bzr) 1.17dev
  from bzr checkout /home/tom/tmp/bzr/bzr.dev
    revision: 4523
    revid: <email address hidden>
    branch nick: bzr.dev
  Python interpreter: /usr/bin/python 2.6.2
  Python standard library: /usr/lib/python2.6
  bzrlib: /home/tom/tmp/bzr/bzr.dev/bzrlib
  Bazaar configuration: /home/tom/.bazaar
  Bazaar log file: /home/tom/.bzr.log

tom@tomsin-laptop:~/tmp/up/solfege.dev$ /home/tom/tmp/bzr/bzr.dev/bzr check
Checking working tree at 'file:///home/tom/tmp/up/solfege.dev/'.
Checking repository at 'file:///home/tom/tmp/up/solfege.dev/'.
checked repository <bzrlib.transport.local.LocalTransport url=file:///home/tom/tmp/up/solfege.dev/> format <RepositoryFormatKnitPack1>
  1537 revisions
  1449 file-ids
  7402 unique file texts
1565944 repeated file texts
     0 unreferenced text versions
     3 ghost revisions
     3 revisions missing parents in ancestry
Checking branch at 'file:///home/tom/tmp/up/solfege.dev/'.
checked branch file:///home/tom/tmp/up/solfege.dev/ format Branch format 6
branch contains ghosts in mainline

Traceback is
to. 2009-07-09 21:24:51 +0200
0.027 bzr arguments: [u'tags']
0.042 looking for plugins in /home/tom/.bazaar/plugins
0.107 looking for plugins in /home/tom/tmp/bzr/bzr.dev/bzrlib/plugins
0.121 looking for plugins in /usr/lib/python2.6/dist-packages/bzrlib/plugins
0.124 encoding stdout as sys.stdout encoding 'UTF-8'
0.272 Traceback (most recent call last):
  File "/home/tom/tmp/bzr/bzr.dev/bzrlib/commands.py", line 835, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/home/tom/tmp/bzr/bzr.dev/bzrlib/commands.py", line 1030, in run_bzr
    ret = run(*run_argv)
  File "/home/tom/tmp/bzr/bzr.dev/bzrlib/commands.py", line 647, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/tom/tmp/bzr/bzr.dev/bzrlib/commands.py", line 1045, in ignore_pipe
    result = func(*args, **kwargs)
  File "/home/tom/tmp/bzr/bzr.dev/bzrlib/builtins.py", line 5195, in run
    revno = branch.revision_id_to_dotted_revno(revid)
  File "/home/tom/tmp/bzr/bzr.dev/bzrlib/decorators.py", line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/home/tom/tmp/bzr/bzr.dev/bzrlib/branch.py", line 336, in revision_id_to_dotted_revno
    return self._do_revision_id_to_dotted_revno(revision_id)
  File "/home/tom/tmp/bzr/bzr.dev/bzrlib/branch.py", line 350, in _do_revision_id_to_dotted_revno
    revno = self.revision_id_to_revno(revision_id)
  File "/home/tom/tmp/bzr/bzr.dev/bzrlib/decorators.py", line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/home/tom/tmp/bzr/bzr.dev/bzrlib/branch.py", line 2684, in revision_id_to_revno
    self._extend_partial_history(stop_revision=revision_id)
  File "/home/tom/tmp/bzr/bzr.dev/bzrlib/branch.py", line 147, in _extend_partial_history
    stop_index=stop_index, stop_revision=stop_revision)
  File "/home/tom/tmp/bzr/bzr.dev/bzrlib/repository.py", line 4377, in _iter_for_revno
    revision_id = iterator.next()
  File "/home/tom/tmp/bzr/bzr.dev/bzrlib/repository.py", line 2301, in iter_reverse_revision_history
    raise errors.RevisionNotPresent(next_id, self)
RevisionNotPresent: Revision {Arch-1:<email address hidden>%solfege--unstable--3.1--version-0} not present in "CHKInventoryRepository('file:///home/tom/tmp/up/solfege.dev/.bzr/repository/')".

Tags: ghost tags

Related branches

Revision history for this message
Tom Cato Amundsen (tca) wrote :
Martin Pool (mbp)
Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
description: updated
summary: - "bzr tags" does not handle ghosts
+ RevisionNotPresent in iter_reverse_revision_history running "bzr tags"
+ on a branch with mainline ghosts
Jelmer Vernooij (jelmer)
tags: added: ghost
tags: added: tags
Jelmer Vernooij (jelmer)
Changed in bzr:
status: Confirmed → Fix Released
Revision history for this message
Tom Cato Amundsen (tca) wrote :

Which revno fixes this? I still have the same problem in bzr.dev revno 5677

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

I'll investigate further.

Changed in bzr:
status: Fix Released → In Progress
assignee: nobody → Jelmer Vernooij (jelmer)
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

iter_reverse_revision_history() does indeed with ghosts properly, but "bzr tags" is no longer using that method.

The attached branch fixes the issue in the new code path.

Revision history for this message
Tom Cato Amundsen (tca) wrote :

This fixes "bzr tag" for my repo (http://solfege.org/bzr/solfege.dev/) Thanks!

Then there is "bzr log -r ..10" that still have ghost issues. Should I file a new report for this?

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 397556] Re: RevisionNotPresent in iter_reverse_revision_history running "bzr tags" on a branch with mainline ghosts

On Sun, 2011-02-27 at 15:10 +0000, Tom Cato Amundsen wrote:
> This fixes "bzr tag" for my repo (http://solfege.org/bzr/solfege.dev/)
> Thanks!
>
> Then there is "bzr log -r ..10" that still have ghost issues. Should I
> file a new report for this?
>
> ** Attachment added: ".bzr.log"
> https://bugs.launchpad.net/bzr/+bug/397556/+attachment/1874747/+files/.bzr.log
Please do.

Cheers,

Jelmer

Jelmer Vernooij (jelmer)
Changed in bzr:
status: In Progress → Fix Committed
Vincent Ladeuil (vila)
Changed in bzr:
milestone: none → 2.4b1
status: Fix Committed → 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.