Hi everybody,
I am currently developping a CB plugin integrating svn version control to the CB environment. I already looked after the good work made in CBTortoiseSVN but i would like more control
inside Codeblocks. I feel relatively limited about the obligation to use TortoiseSVN for everything, and adding svn AND TortoiseSVN would make one plugin to have too many dependencies, and redondancies between them.
I could have linked my plugin with the svn library only but i chose a third option because of the complexity of this library, and found an easy way to achieve that :
by using svn command line and parsing its output to get infos about the success or the failure of the command.
I don't claim that is the best way to achieve this but it's an easy way to get a good control
inside Codeblocks. Futhermore, svn command line output is cleverly made to be parsed very easily(this solution is often used to make batch operations on a repository or a working copy with Perl scripts or other script languages).
You can get the last source code on svn at :
http://tools.assembla.com/svn/SVNInside[This list will be updated when major additions/modifications are made]For the moment , SVNInside features are :
- a new tab in the project management notebook, containing a tree with the project files status
- a configuration dialog where you can set properties like login, password, svn path, etc. This tree is the nervous center of SVNInside, by right clicking you get a popup menu to do things like commit, revert, add files to the repository, lock-unlock files, etc... depending of their status
- a short addition to the codeblocks projects extensions node managed by SVNInside
Here is a screenshot of the new project management tab : the SVNInside tree
| And i have a question to ask : i am trying to implement a way to block modifications on a file locked by another person. My wish is to add a msgbox when the cbEVT_EDITOR_MODIFIED event is sent that kind of file, asking for the user to choose among two options :
- continue modyfing the file locally as if it wasn't locked, despite the fact that it won't be able to be commited until it is unlocked
- revert the modification which generated the event and wait until the file it is unlocked
For the second option, i can't manage to undo the action just after the messazge box has been closed, i tried different ways :
cbStyledTextCtrl* pControl = pEditor->GetControl(); if (pControl) { //pControl->BeginUndoAction(); with those 2 lines commented or not pControl->Undo(); //pControl->EndUndoAction(); }
And i tried this:
EditorBase* ed = Manager::Get()->GetEditorManager()->GetActiveEditor(); if (ed) ed->Undo();
with no success, can someone help me about that ?
|
I must add that this project is currently under development and i would be happy to share my sources with anybody, to get feedback with my programming, my understanding of the wxWidgets or Code::Blocks APIs.
PS : sorry about my english if somethings appear obscure...