qrevert: press OK without selecting files: got traceback
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QBzr |
Fix Released
|
Medium
|
Alexander Belchenko |
Bug Description
André Bachmann wrote:
Yesterday, a co-worker reported a slight problem with qrevert: If you
open Bazaar, Work, Revert Working Tree... and click OK without doing
anything, you get a BzrCommandError (as it is raised in revert.py in
the function validate). Well, such a message isn't quite user-
friendly. Turning this in to a nicer QtGui.QMessageB
returning False isn't a problem. I have changed
raise errors.
revert.")
to
warningbox = QtGui.QMessageB
gettext("You have not selected anything to revert."))
return False
---------------
We should have appropriate check in validate method to prevent action to start.
Related branches
- IWATA Hidetaka: Pending requested
- QBzr Developers: Pending requested
-
Diff: 943 lines (+291/-231)16 files modifiedNEWS.txt (+3/-0)
lib/add.py (+10/-2)
lib/bind.py (+7/-8)
lib/commit.py (+46/-57)
lib/export.py (+32/-29)
lib/getnew.py (+33/-24)
lib/getupdates.py (+29/-11)
lib/ignore.py (+1/-3)
lib/init.py (+10/-8)
lib/pull.py (+4/-8)
lib/revert.py (+35/-26)
lib/send.py (+32/-28)
lib/switch.py (+2/-3)
lib/tag.py (+8/-18)
lib/uncommit.py (+3/-6)
lib/util.py (+36/-0)
- Alexander Belchenko: Approve
-
Diff: 41 lines (+15/-5)2 files modifiedNEWS.txt (+3/-0)
lib/revert.py (+12/-5)
description: | updated |
Changed in qbzr: | |
assignee: | nobody → Alexander Belchenko (bialix) |
status: | Confirmed → Fix Committed |
milestone: | none → 0.23beta1 |
Changed in qbzr: | |
status: | Fix Committed → Fix Released |
I had the time to change the validate method of qrevert - now it shows a warning if the user wants to revert without selecting files.
The check if there are files selected to revert also now does a real check.
Please check my branch and tell me your opinion about it.