Don't print traceback for NoSuchFile error

Bug #177695 reported by Gary van der Merwe
2
Affects Status Importance Assigned to Milestone
Bazaar GTK+ Frontends
Triaged
Low
Unassigned

Bug Description

Steps to reproduce:
* Remove file from tree
* bzr gdiff

Actual results:
* The following error is writen to the console:
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/gtk/diff.py", line 382, in _treeview_cursor_cb
    self.diff_view.show_diff(specific_files)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/gtk/diff.py", line 242, in show_diff
    old_label='', new_label='',
  File "/usr/lib/python2.5/site-packages/bzrlib/diff.py", line 378, in show_diff_trees
    return differ.show_diff(specific_files, extra_trees)
  File "/usr/lib/python2.5/site-packages/bzrlib/diff.py", line 710, in show_diff
    self.diff(file_id, path, path)
  File "/usr/lib/python2.5/site-packages/bzrlib/diff.py", line 743, in diff
    old_kind = self.old_tree.kind(file_id)
  File "/usr/lib/python2.5/site-packages/bzrlib/workingtree_4.py", line 545, in kind
    return self._kind(relpath)
  File "/usr/lib/python2.5/site-packages/bzrlib/workingtree_4.py", line 549, in _kind
    kind = file_kind(abspath)
  File "/usr/lib/python2.5/site-packages/bzrlib/osutils.py", line 153, in file_kind
    raise errors.NoSuchFile(f)
bzrlib.errors.NoSuchFile: No such file: u'/home/garyvdm/picard/dev/resources/images/22x22/media-playback-start.png'

Expected results:
* No error written to the console.

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 177695] NoSuchFile error when using gdiff on tree with missing file

Am Donnerstag, den 20.12.2007, 16:10 +0000 schrieb Gary van der Merwe:
> Public bug reported:
>
> Steps to reproduce:
> * Remove file from tree
> * bzr gdiff
>
> Actual results:
> * The following error is writen to the console:
> Traceback (most recent call last):
> File "/usr/lib/python2.5/site-packages/bzrlib/plugins/gtk/diff.py", line 382, in _treeview_cursor_cb
> self.diff_view.show_diff(specific_files)
> File "/usr/lib/python2.5/site-packages/bzrlib/plugins/gtk/diff.py", line 242, in show_diff
> old_label='', new_label='',
> File "/usr/lib/python2.5/site-packages/bzrlib/diff.py", line 378, in show_diff_trees
> return differ.show_diff(specific_files, extra_trees)
> File "/usr/lib/python2.5/site-packages/bzrlib/diff.py", line 710, in show_diff
> self.diff(file_id, path, path)
> File "/usr/lib/python2.5/site-packages/bzrlib/diff.py", line 743, in diff
> old_kind = self.old_tree.kind(file_id)
> File "/usr/lib/python2.5/site-packages/bzrlib/workingtree_4.py", line 545, in kind
> return self._kind(relpath)
> File "/usr/lib/python2.5/site-packages/bzrlib/workingtree_4.py", line 549, in _kind
> kind = file_kind(abspath)
> File "/usr/lib/python2.5/site-packages/bzrlib/osutils.py", line 153, in file_kind
> raise errors.NoSuchFile(f)
> bzrlib.errors.NoSuchFile: No such file: u'/home/garyvdm/picard/dev/resources/images/22x22/media-playback-start.png'
>
> Expected results:
> * No error written to the console.
I think it's actually correct that it is not showing you anything but
giving an error. It should display a single-line error rather than a
traceback though.

 status triaged
 importance low
 summary "Don't print traceback for NoSuchFile error"

Cheers,

Jelmer
--
Jelmer Vernooij <email address hidden> - http://samba.org/~jelmer/
Jabber: <email address hidden>

Changed in bzr-gtk:
importance: Undecided → Low
status: New → Triaged
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.