bzr shelve created shelf that couldn't be restored

Bug #604458 reported by Philip Peitsch
26
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
High
Unassigned
Breezy
Triaged
High
Unassigned

Bug Description

I just ran bzr shelve on a lightweight checkout, and am now unable to restore this shelved pack a few minutes later. The exact steps were

1) Working on a lightweight checkout using a local shared repository, but bound to a remote branch (in a remote shared repository), I did a bzr add, then bzr shelve --all
2) Switched to a new remote branch... didn't do anything with this
3) Switched back to the original branch and attempted to run bzr unshelve

At this point the following error was spat back out at me:

C:\Source\BondAdvance\bzr\working>bzr unshelve
Using changes with id "1".
bzr: ERROR: bzrlib.errors.NoSuchRevision: CHKInventoryRepository('file:///C:/Source/BondAdvance/bzr/.bzr/repository/') has no revision ('<email address hidden>',)

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 853, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1055, in run_bzr
  File "bzrlib\commands.pyo", line 661, in run_argv_aliases
  File "bzrlib\commands.pyo", line 665, in run_direct
  File "bzrlib\cleanup.pyo", line 122, in run_simple
  File "bzrlib\cleanup.pyo", line 156, in _do_with_cleanups
  File "bzrlib\builtins.pyo", line 5820, in run
  File "bzrlib\shelf_ui.pyo", line 469, in run
  File "bzrlib\shelf.pyo", line 401, in get_unshelver
  File "bzrlib\shelf.pyo", line 321, in from_tree_and_shelf
  File "bzrlib\decorators.pyo", line 140, in read_locked
  File "bzrlib\repository.pyo", line 2579, in revision_tree
  File "bzrlib\decorators.pyo", line 140, in read_locked
  File "bzrlib\repository.pyo", line 2538, in get_revision_inventory
  File "bzrlib\decorators.pyo", line 140, in read_locked
  File "bzrlib\repository.pyo", line 2367, in get_inventory
  File "bzrlib\repofmt\groupcompress_repo.pyo", line 900, in _iter_inventories
NoSuchRevision: CHKInventoryRepository('file:///C:/Source/BondAdvance/bzr/.bzr/repository/') has no revision ('<email address hidden>',)

bzr 2.1.2 on python 2.5.4 (Windows-XP-5.1.2600-SP3)
arguments: ['bzr', 'unshelve']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Program Files\Bazaar\plugins\bzrtools [2.1.0]
  explorer C:\Program Files\Bazaar\plugins\explorer [1.0.0rc1]
  launchpad C:\Program Files\Bazaar\plugins\launchpad [2.1.2]
  netrc_credential_store C:\Program Files\Bazaar\plugins\netrc_credential_store [2.1.2]
  qbzr C:\Program Files\Bazaar\plugins\qbzr [0.18.6]
  rebase C:\Program Files\Bazaar\plugins\rebase [0.5.5]
  svn C:\Program Files\Bazaar\plugins\svn [1.0.2]
  upload C:\Program Files\Bazaar\plugins\upload [1.0.0dev]
  xmloutput C:\Program Files\Bazaar\plugins\xmloutput [0.8.6]

*** 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.

I've attached the shelf file for perusal. I would like this to remain a non-public bug for now though as the actual bundle itself contains some possibly sensitive material... though if I can find reproduction steps I will happily re-raise this in a new public bug.

I haven't tested for reproducibility yet... I have found this setup (as in multiple shared repo's) is causing some other issues though (I use bzr-svn, and have been bitten by quite a few bugs in the last few months... potentially the repo itself is in an inconsistent state somehow).

Revision history for this message
Philip Peitsch (philip-peitsch) wrote :
visibility: public → private
Revision history for this message
Philip Peitsch (philip-peitsch) wrote :

Ok... it *appears* as if the local shared repository missed out on a revision that was pushed to the remote branch. I ran a bzr up in the lightweight checkout, and this pulled in an extra revision that was present in the remote branch (and the remote shared repo), but not the local branch. I wonder if this is an issue in wider bzr potentially...

Revision history for this message
Philip Peitsch (philip-peitsch) wrote :

Some more info, bzr info on this current setup shows:

C:\Source\BondAdvance\bzr\working>bzr info
Lightweight checkout (format: 2a)
Location:
       light checkout root: .
  repository checkout root: C:/Source/BondAdvance/bzr/features/res-instrument-to-autogen
        checkout of branch: bzr+ssh://zpp@yogi//vsl/bedrock/BSDSRG/Projects/Bond%20Advance/Bazaar/zpp/res-instrument-to-autogen/
         shared repository: C:/Source/BondAdvance/bzr

Related branches:
    push branch: bzr+ssh://zpp@yogi//vsl/bedrock/BSDSRG/Projects/Bond%20Advance/Bazaar/zpp/res-instrument-to-autogen/
  parent branch: C:/Source/BondAdvance/bzr/svntrunk
  submit branch: C:/Source/BondAdvance/bzr/svntrunk

visibility: private → public
Revision history for this message
Philip Peitsch (philip-peitsch) wrote :

Hi Robert,

I would request that this bug report stays private without prior discussion with me. As stated in the description, some of the details and source snippets (though generally small and likely safe) I am not really under permission to release to the wide internet :)

visibility: public → private
Revision history for this message
Philip Peitsch (philip-peitsch) wrote :

Had discussions with various people finally so this has now been deemed abile to be revealed

visibility: private → public
Revision history for this message
Vincent Ladeuil (vila) wrote :

As a workaround, you should be able to do 'bzr unshelve X --preview' and apply the resulting patch.

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

Other bug subscribers

Bug attachments

Remote bug watches

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