qcommit: have no sense to allow revert or diff for non-versioned files

Bug #149748 reported by Alexander Belchenko
2
Affects Status Importance Assigned to Milestone
QBzr
Fix Released
Low
Lukáš Lalinský

Bug Description

If user check option "Show non-versioned files" then it possible to right-click on unversioned file and invoke revert or diff command. It's absolutely have no sense. But in the case of revert qcommit correctly shows error dialog with message "Path(s) not versioned", but in the case of diff internal bzrlib errors stays unhandled and produce traceback in console:

Traceback (most recent call last):
  File "C:\work\Bazaar\plugins-repo\qbzr\commit.py", line 469, in show_differences
    branch=self.tree.branch)
  File "C:\work\Bazaar\plugins-repo\qbzr\diff.py", line 312, in __init__
    treediff = TreeDiff(self.tree1, self.tree2, self.specific_files, complete)
  File "C:\work\Bazaar\plugins-repo\qbzr\diff.py", line 236, in __init__
    self._make_diff(old_tree, new_tree, specific_files, complete)
  File "C:\work\Bazaar\plugins-repo\qbzr\diff.py", line 189, in _make_diff
    delta = new_tree.changes_from(old_tree, specific_files=specific_files, require_versioned=True)
  File "bzrlib\tree.pyc", line 93, in changes_from
  File "bzrlib\decorators.pyc", line 127, in read_locked
  File "bzrlib\tree.pyc", line 633, in compare
  File "bzrlib\workingtree_4.pyc", line 900, in paths2ids
  File "bzrlib\workingtree_4.pyc", line 948, in _paths2ids_in_memory
bzrlib.errors.PathsNotVersionedError: Path(s) are not versioned: uninst.exe

Revision history for this message
Alexander Belchenko (bialix) wrote :

May be instead for non-versioned files right-click menu should suggest add?

Changed in qbzr:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Lukáš Lalinský (luks) wrote :

Just a note that 'Add' context menu is useless, because qcommit will add non-versioned with checked check-box automatically.

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 149748] Re: qcommit: have no sense to allow revert or diff for non-versioned files

Lukáš Lalinský пишет:
> Just a note that 'Add' context menu is useless, because qcommit will add
> non-versioned with checked check-box automatically.

Yeah, I saw it, but it's magic behavior, although it's correct, and
therefore could be unclear for new users.

But traceback on revert should be fixed anyway, IMO.

Lukáš Lalinský (luks)
Changed in qbzr:
assignee: nobody → luks
milestone: none → 0.8.0
status: Confirmed → Fix Committed
Lukáš Lalinský (luks)
Changed in qbzr:
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.