InvalidRevisionSpec: Requested revision: u'281' does not exist in branch

Bug #506777 reported by Tim Penhey
38
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
High
Unassigned
Breezy
Triaged
High
Jelmer Vernooij

Bug Description

tim@elwood:~/src/lp/imports-urls$ bzr log -r 281 bzr+ssh://bazaar.launchpad.net/~launchpad-pqm/bzr-hg/broken -Derror
bzr: ERROR: bzrlib.errors.InvalidRevisionSpec: Requested revision: u'281' does not exist in branch: RemoteBranch(bzr+ssh://bazaar.launchpad.net/~launchpad-pqm/bzr-hg/broken/)

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 826, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1027, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 638, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1042, in ignore_pipe
    result = func(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 2343, in run
    revision, file_list)
  File "/usr/lib/python2.6/dist-packages/bzrlib/log.py", line 1913, in _get_info_for_log_files
    "log")
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 2435, in _get_revision_range
    rev1 = rev2 = revisionspec_list[0].in_history(branch)
  File "/usr/lib/python2.6/dist-packages/bzrlib/revisionspec.py", line 222, in in_history
    return self._match_on_and_check(branch, revs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/revisionspec.py", line 201, in _match_on_and_check
    info = self._match_on(branch, revs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/revisionspec.py", line 334, in _match_on
    raise errors.InvalidRevisionSpec(self.spec, branch)
InvalidRevisionSpec: Requested revision: u'281' does not exist in branch: RemoteBranch(bzr+ssh://bazaar.launchpad.net/~launchpad-pqm/bzr-hg/broken/)
HPSS calls: 44 (27 vfs) SmartSSHClientMedium(connected=False, username=u'thumper', host='bazaar.launchpad.net', port=None)

This branch was created by:

  bzr branch lp:bzr-hg
  bzr push lp:~...

It stacked on trunk, but has no extra revisions.

Martin Pool (mbp)
Changed in bzr:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 506777] [NEW] InvalidRevisionSpec: Requested revision: u'281' does not exist in branch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tim Penhey wrote:
> Public bug reported:
>
> tim@elwood:~/src/lp/imports-urls$ bzr log -r 281 bzr+ssh://bazaar.launchpad.net/~launchpad-pqm/bzr-hg/broken -Derror
> bzr: ERROR: bzrlib.errors.InvalidRevisionSpec: Requested revision: u'281' does not exist in branch: RemoteBranch(bzr+ssh://bazaar.launchpad.net/~launchpad-pqm/bzr-hg/broken/)
>
...

> InvalidRevisionSpec: Requested revision: u'281' does not exist in branch: RemoteBranch(bzr+ssh://bazaar.launchpad.net/~launchpad-pqm/bzr-hg/broken/)
> HPSS calls: 44 (27 vfs) SmartSSHClientMedium(connected=False, username=u'thumper', host='bazaar.launchpad.net', port=None)
>
> This branch was created by:
>
> bzr branch lp:bzr-hg
> bzr push lp:~...
>
> It stacked on trunk, but has no extra revisions.

This doesn't seem to be a bug in "log", but it does indicate something
wrong with the branch.

This doesn't reproduce locally with:

bzr branch --no-tree --stacked ../other/branch test

(the 'test' branch has an appropriate last revision, and log, etc show
correctly.)

Note that just doing:
 bzr log -r-10..-1 lp:~launchpad-pqm/bzr-hg/broken

But "bzr log" does work, and shows the branch having 281 revisions.

Definitely something weird. Perhaps the fallback isn't properly found at
the time when it is looking up the revspec, but *is* found when it goes
to actually log the revisions?

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktN5z8ACgkQJdeBCYSNAAPS1ACcCYb7LO89SHxNpfolPLJfuwgU
MwYAoLw713htLoNe7kFT2iYcFz2hcLWg
=ZA22
-----END PGP SIGNATURE-----

Jelmer Vernooij (jelmer)
tags: added: stacking
Revision history for this message
Martin Pool (mbp) wrote :

beuno seems to be hitting this too:

beuno@beuno-laptop:~$ bzr check lp:~ubuntuone-hackers/convoy/trunk
Checking branch at 'bzr+ssh://bazaar.launchpad.net/~ubuntuone-hackers/convoy/trunk/'.
No working tree found at specified location.
Checking repository at 'bzr+ssh://bazaar.launchpad.net/~ubuntuone-hackers/convoy/trunk/'.
checked repository bzr+ssh://bazaar.launchpad.net/~ubuntuone-hackers/convoy/trunk/ format RepositoryFormat2a()
    22 revisions
    14 file-ids
checked branch bzr+ssh://bazaar.launchpad.net/~ubuntuone-hackers/convoy/trunk/ format Remote: Branch format 7
beuno@beuno-laptop:~$ bzr branch -r 10 lp:~ubuntuone-hackers/convoy/trunk
bzr: ERROR: Requested revision: '10' does not exist in branch: bzr+ssh://bazaar.launchpad.net/~ubuntuone-hackers/convoy/trunk/
beuno@beuno-laptop:~$

the branch.last_revision_info is plausible.

log works correctly on the branch and shows there is a 10th revision, but it isn't found by log or branch.

21:51 <sidnei> i think the key is 'It stacked on trunk, but has no extra revisions.' maybe?

fetching r10 from a local copy of this branch works.

Revision history for this message
Martin Pool (mbp) wrote :

here's a snapshot of the server-side branch. it does indeed have no packs of its own so it's possibly connected to being stacked with no local changes.

Martin Pool (mbp)
Changed in bzr:
assignee: nobody → Martin Pool (mbp)
Martin Pool (mbp)
tags: added: affects-canonical
Revision history for this message
Martin Pool (mbp) wrote :

beuno has fixed his branch by pushing another revision, but I have another at lp:~mbp/convoy/test-stacking that is freshly pushed and can still reproduce this.

I guess this is going to only occur on RemoteBranch, and I suspect that is because it reimplements get_rev_id or something else reached by RevisionSpec_revno. The hpss log is attached.

tags: added: hpss
Revision history for this message
Andrew Bennetts (spiv) wrote :

See also the analysis in bug 785116 (a dupe).

Revision history for this message
Tom Haddon (mthaddon) wrote :

I just got bitten by this with an ISD branch. It's a private branch, but can provide more details if needed.

tags: added: canonical-losa-lp
Martin Pool (mbp)
Changed in bzr:
assignee: Martin Pool (mbp) → nobody
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Stefan (Chex) also just got bitten by this for an ISD branch.

Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
Changed in brz:
status: New → Triaged
importance: Undecided → High
tags: removed: check-for-breezy
Jelmer Vernooij (jelmer)
Changed in brz:
assignee: nobody → Jelmer Vernooij (jelmer)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.