Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

SVNInside : development of another SVN plugin for CodeBlocks

(1/31) > >>

orel:
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 :


--- Code: ---cbStyledTextCtrl* pControl = pEditor->GetControl();
if (pControl)
{
     //pControl->BeginUndoAction();    with those 2 lines commented or not
     pControl->Undo();
     //pControl->EndUndoAction();
}

--- End code ---

And i tried this:

--- Code: ---EditorBase* ed = Manager::Get()->GetEditorManager()->GetActiveEditor();
if (ed) ed->Undo();

--- End code ---

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...

Jan van den Borst:
The new tab looks great.
Maybe we should join forces and make a svn plugin that is also working in non msw environments?

Jan vd Borst

orel:
What a good idea!!

Porting this plugin to other platforms should not be very difficult, c++ stl is used when possible and all code is portable, the only part of it which is non portable for the moment is the class i implement to read console output (under Win32 that's not an easy task). I think reading svn console output under linux (or any other platform) should be easier.

If you are interested i can email you the sources.

I could have posted them on this forum but SVNInside is for the moment under development, working but too many features lack to be used daily.

orel:
Your last post made me realize that i totally forgotten to tell for which platform SVNInside is currently developped, for win32 yes but :

under Windows XP
with CodeBlocks revision 4503
on a Penitum Centrino DUO

Jan van den Borst:
Couldn't you setup a svn repository as I did on assembla?
Jan

(I use a laptop vista, celeron, latest codeblocks from svn)

Navigation

[0] Message Index

[#] Next page

Go to full version