Merge lp:~simon-kersey/bzr-explorer/add-bzrexec-tool into lp:bzr-explorer
| Status: | Merged |
|---|---|
| Merged at revision: | not available |
| Proposed branch: | lp:~simon-kersey/bzr-explorer/add-bzrexec-tool |
| Merge into: | lp:bzr-explorer |
| Diff against target: |
70 lines (+12/-2) 4 files modified
NEWS (+3/-0) lib/explorer.py (+6/-2) lib/extensions/tools.py (+1/-0) lib/kinds.py (+2/-0) |
| To merge this branch: | bzr merge lp:~simon-kersey/bzr-explorer/add-bzrexec-tool |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Ian Clatworthy | 2010-03-31 | Approve on 2010-04-07 | |
|
Review via email:
|
|||
Description of the Change
Adds tool type 'bzr-exec'. Tools with this type invoke qrun with the '--execute' option so that the tool command is run immediately, without further user confirmation.
This provides the user with the beginnings of the functionality to allow 'click and do'. At the moment, when using tools, the user has to click the tool and then supply parameter(s) to the command and then click again to run the command.
The next step will be to add functionality to support %(selected)s in the tool action - initially the idea will be to populate this with the selected items from the working tree browser. In this way a tool can be defined that will operate immediately on a selected file.
To test this change add a tool based on 'ls'. Then edit the tools.xml file to change the type to 'bzr-exec'. With the working tree browser visible click on the tool, the results of the ls should be visible.
| Simon Kersey (simon-kersey) wrote : | # |
> Hi Simon,
>
> This all looks ok to me. FWIW, your suggested test fails for me gumbling about
> ...
>
> 'QBzrRunDialog' object has no attribute 'init_button_
>
> That doesn't look like it's your fault though.
Mine is working with the following environment:
Bazaar (bzr) 2.1.0rc1
Python interpreter: C:\Program Files\Bazaar\
Python standard library: C:\Program Files\Bazaar\
Platform: Windows-
bzrlib: C:\Program Files\Bazaar\
Bazaar configuration: C:\Documents and Settings\
Bazaar log file: C:\SJK\
With the following plugins:
bzrtools 2.1.0b1
Various useful commands for working with bzr.
explorer 1.1.0dev
Version Control for Human Beings.
fastimport 0.9.0dev
FastImport Plugin
launchpad 2.1.0rc1
Launchpad.net integration plugin for Bazaar.
netrc_credentia
Use ~/.netrc as a credential store for authentication.
qbzr 0.18.0
QBzr - Qt-based frontend for Bazaar
rebase 0.5.5
Rebase support.
trunk 0.1.0dev
Commands and Hooks to support Reserved Edit of files in Bazaar.
upload 1.0.0dev
Upload a working tree, incrementally.
xmloutput 0.8.5
This plugin provides xml output for status, log, annotate, missing, info,
>
> Before I merge this, I'd like slightly more detail on your plans. For example,
> are you planning to make "bzr-exec" a new kind inside tool_dialogs.py? Or a
> checkbox that only becomes active when the "Bazaar Command" kind is selected?
> If the latter, maybe we ought to model it that way inside the XML as well?
I hadn't given much thought to the UI. I was initially going to put this feature and support for %(selected)s in just through editing the tools.xml file. Then once that was working OK, look at UI support.
I suppose I would probably just add it as a different command type in tool_dialogs.py in the end.
The reason I wouldn't expose it on the UI initially is that it really only makes sense once you can select items on which to run the tool.
With regard to support for selecting items I was going use the fact that the tool action contained %(selected)s to determine whether it should be displayed or not. If it contained %(selected)s then it would only be shown if the working tree browser was shown. Then when you run the tool anything that was selected in the working tree would replace %(selected)s. (This goes back to a branch I submitted some months ago about toolbars and stuff)
The next part of my grand plan is to add tools to the working tree right-click menu. You outlined some thoughts you had on this. From that I sort of inferred the following as a way forward and would be interested in knowing what you thought.
Add a new file type, ContextMenus.xml.
Have separate <folder> elements within this file relate to particular UI features that might support a context menu, e.g. working_tree. Within the UI feature folder specify folders of tools that apply to items displayed in the UI feature. It's at this point that it starts to get complicated when you consider the working tree. The working tree displays...
| Ian Clatworthy (ian-clatworthy) wrote : | # |
OK. I'm happy with this patch so I'm merging it.
Can you email the qbzr mailing list please about supporting right click menus in Explorer's WT browser? I think that conversation is best held there (vs on this merge request).


Hi Simon,
This all looks ok to me. FWIW, your suggested test fails for me gumbling about ...
'QBzrRunDialog' object has no attribute 'init_button_ status' .
That doesn't look like it's your fault though.
Before I merge this, I'd like slightly more detail on your plans. For example, are you planning to make "bzr-exec" a new kind inside tool_dialogs.py? Or a checkbox that only becomes active when the "Bazaar Command" kind is selected? If the latter, maybe we ought to model it that way inside the XML as well?