Needs a better handling of unknown revision-id in .bzr-upload.revid

Bug #600628 reported by Marek Turnovec
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bzr Upload plugin
Fix Released
Medium
Vincent Ladeuil

Bug Description

Whenever I tried to use upload function (from upload plugin of Bazaar), I've got the error:

bzrlib.errors.NoSuchRevision: CHKInventoryRepository('file:///home/mat/www/gdb/.bzr/repository/') has no revision ('<email address hidden>',)

When there is no "*.bzr-upload.revid", it works - or I must use the command line option "--full".

Here is the comple traceback:

mat@B02294:~/www/gdb$ bzr upload
Using saved location: ftp://gdb@ublg/gdb/www/
bzr: ERROR: bzrlib.errors.NoSuchRevision: CHKInventoryRepository('file:///home/mat/www/gdb/.bzr/repository/') has no revision ('<email address hidden>',)

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/plugins/upload/__init__.py", line 420, in run
    uploader.upload_tree()
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/upload/__init__.py", line 267, in upload_tree
    from_tree = self.branch.repository.revision_tree(rev_id)
  File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line 140, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/repository.py", line 2579, in revision_tree
    inv = self.get_revision_inventory(revision_id)
  File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line 140, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/repository.py", line 2538, in get_revision_inventory
    return self.get_inventory(revision_id)
  File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line 140, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/repository.py", line 2367, in get_inventory
    return self.iter_inventories([revision_id]).next()
  File "/usr/lib/python2.6/dist-packages/bzrlib/repofmt/groupcompress_repo.py", line 900, in _iter_inventories
    raise errors.NoSuchRevision(self, record.key)
NoSuchRevision: CHKInventoryRepository('file:///home/mat/www/gdb/.bzr/repository/') has no revision ('<email address hidden>',)

bzr 2.1.2 on python 2.6.5 (Linux-2.6.32-4-amd64-x86_64-with-debian-squeeze-sid)
arguments: ['/usr/bin/bzr', 'upload']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'cs_CZ.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]
  email /usr/lib/python2.6/dist-packages/bzrlib/plugins/email [unknown]
  explorer /usr/lib/python2.6/dist-packages/bzrlib/plugins/explorer [1.0.0]
  fastimport /usr/lib/python2.6/dist-packages/bzrlib/plugins/fastimport [0.9.0dev]
  gtk /usr/lib/python2.6/dist-packages/bzrlib/plugins/gtk [0.98.0.final.1]
  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]
  rewrite /usr/lib/python2.6/dist-packages/bzrlib/plugins/rewrite [0.6.0]
  search /usr/lib/python2.6/dist-packages/bzrlib/plugins/search [1.7.0dev]
  svn /usr/lib/python2.6/dist-packages/bzrlib/plugins/svn [1.0.2]
  upload /usr/lib/python2.6/dist-packages/bzrlib/plugins/upload [1.0.0dev]

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

Tags: upload
John A Meinel (jameinel)
affects: bzr → bzr-upload
Revision history for this message
Vincent Ladeuil (vila) wrote :

I'm not sure I understand your environment here.
Can you add the output of 'bzr info -v' to this bug for both your local branch and your remote one ?

Changed in bzr-upload:
status: New → Incomplete
Revision history for this message
Marek Turnovec (marek-turnovec) wrote :

I'm using only one branch - can be called local. It's on the development machine. And from this branch, I want - sometimes - to make an "upload" to the real server.

I attached the output of bzr info -v from this local branch, as you suggested.

Thanks for your time.

Revision history for this message
Vincent Ladeuil (vila) wrote :

Hmm, given the backtrace, it looks like .bzr-upload.revid contains a revid that isn't in your branch history.

I can only think of two possible causes:
- you uncommit after an upload,
- someone else has uploaded a revision and you didn't merge it locally

Is it the case for you ?

bzr-upload should provide a better error message in that case.

Changed in bzr-upload:
status: Incomplete → Confirmed
importance: Undecided → Medium
summary: - Unable to use UPLOAD plugin for incremental updates
+ Needs a better handling of unknown revision-id in .bzr-upload.revid
Revision history for this message
Vincent Ladeuil (vila) wrote :

A more user-friendly error message is now output

Changed in bzr-upload:
status: Confirmed → Fix Released
milestone: none → 1.0.0
Vincent Ladeuil (vila)
Changed in bzr-upload:
assignee: nobody → Vincent Ladeuil (vila)
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.