Added SVN commit dialog actions for diff file, add file and revert file.
This is done by commit dialog context menu actions.
SVN commit dialog is now a separate class and moved to a separate file.
Also added SVNCommands class with static methods to access basic SVN actions like geting revision or geting remote URL path for a file.
Also added ItemVersion::MissingVersion control for SVN plugin.
Details
- Reviewers
elvisangelaccio meven ngraham - Group Reviewers
VDG - Commits
- R449:31c122b68eae: SVN commit dialog now supports diff, add and revert actions.
Run SVN commit dialog and check diff file works, revert works and add works.
Diff Detail
- Lint
Lint Skipped - Unit
Unit Tests Skipped
This is a huge one guys, sorry for this.
Found this update useful for my everyday needs.
As i think SVNCommands class should be a class to process all SVN commands in the future (if I'll do it now this will be a realy big commit).
FileViewSvnPlugin should be a class for plugin UI (call other dialogs, update items states).
I am ready for comments and updates.
Just a couple nitpick one regarding cmake and the other about a refresh button.
The point regarding supporting multiple files is out of scope here.
This is some nice code, nice separation of logic and UI, Enum and documentation, makes it easy to review.
svn/CMakeLists.txt | ||
---|---|---|
10 | Do you really need a set for HDRS ? | |
svn/fileviewsvnplugin.h | ||
70 | Eventually we woulde need those functions to receive several files QList<QString> and rename them to revertFiles, to make the API future proof and the usage more flexible. | |
svn/svncommitdialog.cpp | ||
239 | Add a button so the user can trigger this himself using the UI and discover this shortcut. |
Thanks for advices!
Changes:
- No more headers in the CMakeLists.txt
- Added QStringList for addFiles, revertFiles and so on.
- Added "Refresh" button.
Also added possibility for user to commit just a few files or just one directory, thanks for this idea, great feature.
Added more comments and explanations.
@meven What do you think about using an UI files?
You are welcome. This is some nice work.
Changes:
- No more headers in the CMakeLists.txt
:)
- Added QStringList for addFiles, revertFiles and so on.
I didn't think this would be easy to add here, nice !
- Added "Refresh" button.
Add an icon to it and associate the shortcut rather than implement SvnCommitDialog::keyPressEvent
Also added possibility for user to commit just a few files or just one directory, thanks for this idea, great feature.
Added more comments and explanations.@meven What do you think about using an UI files?
You mean .ui Qt file ? Personally I like those, you can reduce C++ code extracting UI setup code to dedicated xml.
But here since you have already done the work, up to you to add some more work.
svn/fileviewsvnplugin.cpp | ||
---|---|---|
459 | Todos are more commonly written //TODO within our codebase. | |
491 | Well now is a good time ;) | |
svn/svncommitdialog.cpp | ||
114 | You can probably find an appropriate icon and associate the shortcut to this action/button so that it is shown in the tooltip. |
Updated.
- Added shortcut for a refresh action in the commit dialog (standard system hotkey).
- Added icon for a refresh button.
- Added comments.
Also fixed commit action in a separate SVN transactions for each file: now it is done in one operation.
I wish we could have a diff on a side panel, but this is already a nice improvement !
I am thinking the context menu actions are not very discoverable, buttons for actions could be added later.
Please wait for @elvisangelaccio or @ngraham review, but IMHO it is ready for merging.