Code::Blocks

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: orel on October 08, 2007, 11:31:10 pm

Title: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on October 08, 2007, 11:31:10 pm
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 (http://tools.assembla.com/svn/SVNInside)


[This list will be updated when major additions/modifications are made]

For the moment , SVNInside features are :
 


Here is a screenshot of the new project management tab : the SVNInside tree


(http://img214.imageshack.us/img214/5954/svninsidetreezq3.jpg)

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: [Select]
cbStyledTextCtrl* pControl = pEditor->GetControl();
if (pControl)
{
     //pControl->BeginUndoAction();    with those 2 lines commented or not
     pControl->Undo();
     //pControl->EndUndoAction();
}

And i tried this:
Code: [Select]
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...
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: Jan van den Borst on October 08, 2007, 11:47:11 pm
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
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on October 08, 2007, 11:58:49 pm
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.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on October 09, 2007, 12:05:49 am
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
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: Jan van den Borst on October 09, 2007, 12:09:34 am
Couldn't you setup a svn repository as I did on assembla?
Jan

(I use a laptop vista, celeron, latest codeblocks from svn)
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on October 09, 2007, 12:22:38 am
I didn't know about that good option, better using svn to develop a svn plugin :D

Let me deploy my sources on it and i will post you the link here, as soon as possible (probably tomorrow because bed time is coming...) but who knows ?
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on October 09, 2007, 02:16:07 am
     for Jan van den Borst:

Done !! you can go and get the source code at http://tools.assembla.com/svn/SVNInside (http://tools.assembla.com/svn/SVNInside). Thank you for your interest !

     for others:

You should't download and build this plugin if your goal is to use it, for the moment. It is only the beggining of its development, so there are a lot of bugs, a lot of test code here and there, etc.

orel
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: Jan van den Borst on October 09, 2007, 11:08:36 am
OK I will look at this tonight.

ps I'm in the GMT+1 timezone (amsterdam, netherlands)
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: MortenMacFly on October 09, 2007, 12:01:37 pm
Done !! you can go and get the source code at http://tools.assembla.com/svn/SVNInside (http://tools.assembla.com/svn/SVNInside).
Nice work! The screenshot looks pretty nice, really! I am currently trying to compile. ;-) Hence I have two questions so far:
1.) Why don't you provide the project files?! You stated in the log it's not needed, but why?!
2.) CSVNcommand.h and CSVNCommand.cpp differ in their case. While this doesn't matter on Windows it might be an ugly thing on Linux.
With regards, Morten.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: manmach on October 09, 2007, 01:34:59 pm
I was wondering, why the new tab? My thinking is it would be nicer if the project files listed under the Projects tab would be marked as under revision control or not. And right clicking one would then allow you to manipulate them.

Although the inability to select more than one file on the Projects tab, would make batch operations impossible.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: JGM on October 09, 2007, 02:36:09 pm
Great job!  :D

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.

You can use a wxWidgets function named wxExecute to execute and read the output of console programs like you said. In that way you don't have to worry about making different code for different platforms.

Quote from: wxWidgets Documentation
long wxExecute(const wxString& command, wxArrayString& output, int flags = 0)

Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: Jan van den Borst on October 09, 2007, 08:34:55 pm
Done !! you can go and get the source code at http://tools.assembla.com/svn/SVNInside (http://tools.assembla.com/svn/SVNInside).
Nice work! The screenshot looks pretty nice, really! I am currently trying to compile. ;-) Hence I have two questions so far:
1.) Why don't you provide the project files?! You stated in the log it's not needed, but why?!
Can you provide the project file?
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: killerbot on October 09, 2007, 09:22:31 pm
yes; using wxExecute will be better.
I used that one to for my ClearCase and valgrind plug-ins.

Once CB 1.0 is out, we gonna try to create a common interface for version control system in CB (like M$ does).


Since you are calling the command line svn, wxExecute should be fine for the job.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on October 09, 2007, 09:44:51 pm

First of all, thank you for compliments about this plugin.

Done !! you can go and get the source code at http://tools.assembla.com/svn/SVNInside (http://tools.assembla.com/svn/SVNInside).
Nice work! The screenshot looks pretty nice, really! I am currently trying to compile. ;-) Hence I have two questions so far:
1.) Why don't you provide the project files?! You stated in the log it's not needed, but why?!
Can you provide the project file?

Done !

I added it and also a little windows batch file here to zip and copy files where they are needed to debug the plugin dll.

1.) Why don't you provide the project files?! You stated in the log it's not needed, but why?!

i didn't provide it because i thought it was too messy and too personalized to be useful for others, but you're right : better modifying an existent one, even messy, rather than creating a new one from scratch.

2.) CSVNcommand.h and CSVNCommand.cpp differ in their case. While this doesn't matter on Windows it might be an ugly thing on Linux.
With regards, Morten.

This is also done!

Great job!  :D
You can use a wxWidgets function named wxExecute to execute and read the output of console programs like you said. In that way you don't have to worry about making different code for different platforms.

Than you for this hint, didn't knew about that, i'm currently trying to implement it and looking after other 'only windows code', but there is not too much.

Did someone already looked after the code, can you compile and run it under linux or even windows? Please tell me if you encounter some problems.

And i have to reask that question, because i found no answer for the moment, how to undo a file modification after having handled cb_EDITOR_MODIFIED_EVENT?
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: darthdespotism on October 09, 2007, 11:15:16 pm
I'll try some Linux builds as soon as you think it'll help ;) but as I never worked with wxWidgets as a Programmer I can't help you with that right away
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: stahta01 on October 10, 2007, 01:13:17 am
A patch that might help others to compile

Code: [Select]
Index: post_build_step.bat
===================================================================
--- post_build_step.bat (revision 5)
+++ post_build_step.bat (working copy)
@@ -1,10 +1,7 @@
-f:
-cd\
-cd "dev\CBPlugins\SVNInside_svn\trunk"
 zip -j9 -r SVNInside.zip resources\manifest.xml resources\*.xrc
 cd resources
 zip -0 -q ../SVNInside.zip images\*.ico images\*.png
 cd ..
 zip -j9 SVNInside.cbplugin SVNInside.dll SVNInside.zip
-xcopy /Y SVNInside.dll "F:\dev\CB_SVN\src\devel\share\CodeBlocks\plugins"
-xcopy /Y SVNInside.zip "F:\dev\CB_SVN\src\devel\share\codeblocks"
+xcopy /Y SVNInside.dll "..\..\..\devel\share\CodeBlocks\plugins\*"
+xcopy /Y SVNInside.zip "..\..\..\devel\share\codeblocks\*"
Index: SVNInside.cbp
===================================================================
--- SVNInside.cbp (revision 5)
+++ SVNInside.cbp (working copy)
@@ -36,7 +36,6 @@
  <Option compiler="gcc" />
  <Option host_application="codeblocks.exe" />
  <Compiler>
- <Add option="-O3" />
  <Add option="-pipe" />
  <Add option="-mthreads" />
  <Add option="-fmessage-length=0" />
@@ -57,12 +56,16 @@
  </Linker>
  </Target>
  </Build>
+ <VirtualTargets>
+ <Add alias="All" targets="debug;" />
+ </VirtualTargets>
  <Compiler>
  <Add directory="$(#cb)\include" />
  <Add directory="$(#cb)\include\wxscintilla\include" />
  <Add directory="$(#wx.include)" />
  <Add directory="$(#wx.lib)\gcc_dll\mswu" />
  <Add directory="$(#cb)\include\wxFlatNotebook\include" />
+ <Add directory="$(#cb)\include\tinyxml" />
  <Add directory="src" />
  <Add directory="src\SVNCommand" />
  <Add directory="src\Dialogs" />
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: thomas on October 10, 2007, 02:11:18 am
Since you are calling the command line svn, wxExecute should be fine for the job.
It is not. That's what I've been using in my RC2 Subversion plugin.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on October 10, 2007, 03:14:01 am
Since you are calling the command line svn, wxExecute should be fine for the job.
It is not. That's what I've been using in my RC2 Subversion plugin.

i am currently in the process of making some tests to see if i can replace my win32 (CreateProcess, DuplicateHandle, etc.) CConsoleProc implementation with one calling wxExecute. I'm not having too much problems for the moment although some little things seems stranges, particularly when configuring it to be asynchronous and working with a wxProcess.

What kinf of problem did you have with it? on unix-linux or windows?

if ::wxExecute is only working fine on linux, it's useless for me to rewrite the window implementation of my console output redirection.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: JGM on October 10, 2007, 03:57:16 am
if ::wxExecute is only working fine on linux, it's useless for me to rewrite the window implementation of my console output redirection.

I use it on windows and linux and it works fine. I don't know what could go wrong since for me is working. :?

Code: [Select]
bool QuerySvn(const wxString& workingDir, wxString& revision, wxString& date)

{

    revision = _T("0");

    date = _T("unknown date");

    wxString svncmd = _T("svn info --xml --non-interactive ");

    svncmd.Append(_T("\"") + workingDir + _T("\""));

    wxArrayString xmlOutput;



    if (wxExecute(svncmd, xmlOutput) != -1)

    {



        wxString buf = _T("");



        for(unsigned int i=0; i<xmlOutput.GetCount(); ++i){

            buf << xmlOutput[i];

        }



        TiXmlDocument doc;

        doc.Parse(ws2s(buf).c_str());



        if (doc.Error())

            return 0;



        TiXmlHandle hCommit(&doc);

        hCommit = hCommit.FirstChildElement("info").FirstChildElement("entry").FirstChildElement("commit");

if(const TiXmlElement* e = hCommit.ToElement())

        {

            revision = e->Attribute("revision") ? s2ws(e->Attribute("revision")) : _T("");

            const TiXmlElement* d = e->FirstChildElement("date");

            if(d && d->GetText())

                date = s2ws(d->GetText());



            return 1;

        }

    }

    return 0;

}

thats a function to retrieve the svn revision using wxExecute and it works pretty well on both platforms.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: Biplab on October 10, 2007, 05:32:41 am
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: [Select]
cbStyledTextCtrl* pControl = pEditor->GetControl();
if (pControl)
{
     //pControl->BeginUndoAction();    with those 2 lines commented or not
     pControl->Undo();
     //pControl->EndUndoAction();
}

And i tried this:
Code: [Select]
EditorBase* ed = Manager::Get()->GetEditorManager()->GetActiveEditor();
if (ed) ed->Undo();

with no success, can someone help me about that ?

EditorBase::Undo() is an empty virtual function which has been implemented in cbEditor. Try the following code.
Code: [Select]
// Code to catch cbEVT_EDITOR_MODIFIED event
void foo::OnEditorModified(CodeBlocksEvent& event)
{
    cbEditor* ed = (cbEditor*)event.GetEditor();
    ed->Undo();
}

Or

Code: [Select]
cbEditor* ed = Manager::Get()->GetEditorManager()->GetBuiltinActiveEditor();
ed->Undo();

HTH. :)
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: stahta01 on October 10, 2007, 08:24:10 am
Patch to Fix compiling under Windows without using Precompiled Headers.
Also, fixes some rules that killerbot has passed on to me.

killerbot inspired ones.
1. If possible, headers should use forward declarations instead of includes.
2. Headers should never include pre-compiled headers like [sdk.h] or [wxprec.h].
    Do not include sdk.h in headers
    Do not include wxprec.h in headers
    Do not use WX_PRECOMP in headers
    Do not use CB_PRECOMP in headers

Ones I decided on by myself.
3. Used system includes in plugins for C::B SDK and wxWidgets includes.
   In plugins, use [#include <sdk.h>] instead of [#include "sdk.h"]

4. Do not use [#include <wx/wx.h>] in either production headers or source code.

Code: [Select]
Index: src/Dialogs/wxSVNTreeCtrl.h
===================================================================
--- src/Dialogs/wxSVNTreeCtrl.h (revision 7)
+++ src/Dialogs/wxSVNTreeCtrl.h (working copy)
@@ -1,13 +1,7 @@
 #ifndef WXSVNTREECTRL_H
 #define WXSVNTREECTRL_H
 
-// For compilers that support precompilation, includes <wx/wx.h>
-#include <wx/wxprec.h>
 
-#ifndef WX_PRECOMP
-    #include <wx/wx.h>
-#endif
-
 #include <cbplugin.h>
 #include <wx/treectrl.h>
 
Index: src/Dialogs/ConfigDialog.cpp
===================================================================
--- src/Dialogs/ConfigDialog.cpp (revision 7)
+++ src/Dialogs/ConfigDialog.cpp (working copy)
@@ -21,7 +21,13 @@
 #endif
 
 #ifndef WX_PRECOMP
-#include "wx/wx.h"
+#include <wx/checkbox.h>
+#include <wx/dialog.h>
+#include <wx/dirdlg.h>
+#include <wx/filedlg.h>
+#include <wx/log.h>
+#include <wx/stattext.h>
+#include <wx/window.h>
 #endif
 
 ////@begin includes
@@ -30,6 +36,7 @@
 #include "ConfigDialog.h"
 #include "wx/file.h"
 #include "wx/dir.h"
+#include <wx/sizer.h>
 #include "wx/textctrl.h"
 #include "SVNInside_globals.h"
 
Index: src/Dialogs/SVNFileSelect.cpp
===================================================================
--- src/Dialogs/SVNFileSelect.cpp (revision 7)
+++ src/Dialogs/SVNFileSelect.cpp (working copy)
@@ -1,7 +1,7 @@
 /////////////////////////////////////////////////////////////////////////////
 // Name:        SVNFileSelect.cpp
 // Purpose:
-// Author:      Aurélien Rainone
+// Author:      Aurélien Rainone
 // Modified by:
 // Created:     02/10/2007 22:45:30
 // RCS-ID:
@@ -21,7 +21,12 @@
 #endif
 
 #ifndef WX_PRECOMP
-#include "wx/wx.h"
+#include <wx/button.h>
+#include <wx/checklst.h>
+#include <wx/log.h>
+#include <wx/sizer.h>
+#include <wx/stattext.h>
+#include <wx/textctrl.h>
 #endif
 
 ////@begin includes
Index: src/Dialogs/ConfigDialog.h
===================================================================
--- src/Dialogs/ConfigDialog.h (revision 7)
+++ src/Dialogs/ConfigDialog.h (working copy)
@@ -32,7 +32,10 @@
  */
 
 ////@begin forward declarations
+class wxStaticText;
 class wxToggleButton;
+class wxTextCtrl;
+class wxCheckBox;
 ////@end forward declarations
 
 /*!
Index: src/Dialogs/wxSVNTreeCtrl.cpp
===================================================================
--- src/Dialogs/wxSVNTreeCtrl.cpp (revision 7)
+++ src/Dialogs/wxSVNTreeCtrl.cpp (working copy)
@@ -1,4 +1,8 @@
 #include <sdk.h> // Code::Blocks SDK
+#ifndef CB_PRECOMP
+    #include <configmanager.h>
+    #include <cbproject.h>
+#endif
 #include <wx/menu.h>
 #include <wx/imaglist.h>
 
Index: src/Dialogs/SVNFileSelect.h
===================================================================
--- src/Dialogs/SVNFileSelect.h (revision 7)
+++ src/Dialogs/SVNFileSelect.h (working copy)
@@ -22,6 +22,7 @@
 
 ////@begin includes
 #include "wx/xrc/xmlres.h"
+#include <wx/dialog.h>
 #include "SVNInside_globals.h"
 ////@end includes
 
@@ -30,6 +31,10 @@
  */
 
 ////@begin forward declarations
+class wxButton;
+class wxCheckListBox;
+class wxStaticText;
+class wxTextCtrl;
 ////@end forward declarations
 
 /*!
Index: src/SVNInside.cpp
===================================================================
--- src/SVNInside.cpp (revision 7)
+++ src/SVNInside.cpp (working copy)
@@ -1,4 +1,9 @@
 #include <sdk.h> // Code::Blocks SDK
+#ifndef CB_PRECOMP
+    #include <projectmanager.h>
+    #include <cbproject.h>
+#endif
+
 #include <configurationpanel.h>
 
 #include "SVNInside.h"
Index: src/SVNCommand/CSVNcommand.h
===================================================================
--- src/SVNCommand/CSVNcommand.h (revision 7)
+++ src/SVNCommand/CSVNcommand.h (working copy)
@@ -1,13 +1,8 @@
 #ifndef CSVNCOMMAND_H
 #define CSVNCOMMAND_H
 
-// For compilers that support precompilation, includes <wx/wx.h>
-#include <wx/wxprec.h>
+#include <wx/string.h>
 
-#ifndef WX_PRECOMP
-    #include <wx/wx.h>
-#endif
-
 #include <string>
 
 #include "ConsoleProc.h"
Index: src/SVNInside.h
===================================================================
--- src/SVNInside.h (revision 7)
+++ src/SVNInside.h (working copy)
@@ -10,13 +10,8 @@
 #ifndef SVNINSIDE_H_INCLUDED
 #define SVNINSIDE_H_INCLUDED
 
-// For compilers that support precompilation, includes <wx/wx.h>
-#include <wx/wxprec.h>
+#include <wx/process.h>     // for "class wxProcess"
 
-#ifndef WX_PRECOMP
-    #include <wx/wx.h>
-#endif
-
 #include <cbplugin.h>       // for "class cbPlugin"
 #include <tinyxml.h>        // for "tinyxml API"
 #include <string>
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: MortenMacFly on October 10, 2007, 10:51:38 am
There is a loigical issue in wxSVNTreeCtrl.cpp which leads to a crash:
Code: [Select]
    SVNTreeItemData * pdata = 0; wxTreeItemData * ptr = this->GetItemData(id);
    if (ptr)
    {
        pdata = static_cast<SVNTreeItemData*>(ptr); if (!pdata) return 0;
    }
    [...]
    if (pdata->m_bIsFile)
At the last line pdata can still be "0" (and in fact it is if you right-click in svninside on the message "project not under version control". If it is the case the plugin crashes C::B. I suggest adding a null pointer check or changing the logic in the code above that "if" construct.
With regards, Morten.

Edit:
I have changed the code to the foillowing which works OK:
Code: [Select]
    // get item data
    SVNTreeItemData * pdata = 0; wxTreeItemData * ptr = this->GetItemData(id);
    if (ptr)
    {
        pdata = static_cast<SVNTreeItemData*>(ptr);
    }
    if (!pdata) return 0;
    [...]
This may make sense, too:
Code: [Select]
    // get item data
    SVNTreeItemData * pdata = 0; wxTreeItemData * ptr = this->GetItemData(id);
    if (!ptr) return 0;
    else
    {
        pdata = static_cast<SVNTreeItemData*>(ptr);
    }
    if (!pdata) return 0;
    [...]
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: Jan van den Borst on October 10, 2007, 11:59:05 am
Once CB 1.0 is out, we gonna try to create a common interface for version control system in CB (like M$ does).
Is there something like a preliminary source control interface description?

Jan
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: thomas on October 10, 2007, 12:42:38 pm
I use it on windows and linux and it works fine. I don't know what could go wrong since for me is working. :?
[...]
thats a function to retrieve the svn revision using wxExecute and it works pretty well on both platforms.
Yes, and that is a function that will make the GUI unresponsive for as long as Subversion is running. It is also a function that can have 500 other problems, including lock-up and stale processes, and crashes on exit, if a subprocess is still running. wxExecute is one big pile of crap. In particular, you'll be having a lot of fun if you try to get it to work asynchronously, and if you want to process the events. Apart from the abysmal performance, pointers being held in int variables are a lot of fun, especially if you run your code on a 64 bit platform for the first time. Let's not talk about reading data from a pipe in a tight spinloop and making 3-4 data copies...  :)

I had implemented a Subversion plugin for RC2 that worked exactly the way Orel described (except for using the project file tree, instead of its own, and running asynchronously). It was due for a rewrite, but I never did it, mostly because it's so frustrating to work with wxExecute.
I've written a replacement class with a Windows implementation, and Jonas Thedering contributed the POSIX implementation. Somehow, nobody was really interested in it, and no one would even wager to look at it, so... that thing is still in the attic (for nearly 2 years now).
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: killerbot on October 10, 2007, 01:33:47 pm
I must say I have seen a ClearCase command not returning in the wxExecute call, and indeed then the GUI of CB is locked. But overall I found it working ok.

@Thomas : so what are you still doing in the basement, get up there on that attic ;-)
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: thomas on October 10, 2007, 01:50:02 pm
I must say I have seen a ClearCase command not returning in the wxExecute call, and indeed then the GUI of CB is locked. But overall I found it working ok.
It is like everything in wxWidgets, it looks like it is working ok at first. But then, you get random crashes that you can't explain, and after weeks, you find out it only happnens when you have more than 127 commandline parameters. So you look at the code and find that wxExecute stores them in a static array that's hardcoded to 127 entries... leaving it to chance whether the 128th or 129th write will cross a page boundary and give a segfault...
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: JGM on October 10, 2007, 02:43:42 pm
So you look at the code and find that wxExecute stores them in a static array that's hardcoded to 127 entries... leaving it to chance whether the 128th or 129th write will cross a page boundary and give a segfault...

Well, is good to know the perspective of someone who has a more advanced experience using this function, and knows the resulting problems from different situations.

There should be a fix then or a different way to work with the function to stop or suppress as much possible problems.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: Keyla on October 10, 2007, 04:21:36 pm
Wow thanks for your commitment!
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on October 10, 2007, 05:11:37 pm
Well, is good to know the perspective of someone who has a more advanced experience using this function, and knows the resulting problems from different situations.

I totally agree with that. It will save me a lot of troubles, trying something to get something to work when i already have a working  solution for this problem, ok a windows-only one.

I've written a replacement class with a Windows implementation, and Jonas Thedering contributed the POSIX implementation. Somehow, nobody was really interested in it, and no one would even wager to look at it, so... that thing is still in the attic (for nearly 2 years now).

I didn'h hear about that and would be glad to look at your windows and posix substitutions for wxExecute.


I had implemented a Subversion plugin for RC2 that worked exactly the way Orel described

I would also be glad to look at this.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on October 10, 2007, 05:25:18 pm

I have changed the code to the foillowing which works OK:
Code: [Select]
    // get item data
    SVNTreeItemData * pdata = 0; wxTreeItemData * ptr = this->GetItemData(id);
    if (ptr)
    {
        pdata = static_cast<SVNTreeItemData*>(ptr);
    }
    if (!pdata) return 0;
    [...]
This may make sense, too:
Code: [Select]
    // get item data
    SVNTreeItemData * pdata = 0; wxTreeItemData * ptr = this->GetItemData(id);
    if (!ptr) return 0;
    else
    {
        pdata = static_cast<SVNTreeItemData*>(ptr);
    }
    if (!pdata) return 0;
    [...]

OOps  :lol:  Thank you very much.

Patch to Fix compiling under Windows without using Precompiled Headers.
Also, fixes some rules that killerbot has passed on to me.

killerbot inspired ones.
1. If possible, headers should use forward declarations instead of includes.
2. Headers should never include pre-compiled headers like [sdk.h] or [wxprec.h].
    Do not include sdk.h in headers
    Do not include wxprec.h in headers
    Do not use WX_PRECOMP in headers
    Do not use CB_PRECOMP in headers

Ones I decided on by myself.
3. Used system includes in plugins for C::B SDK and wxWidgets includes.
   In plugins, use [#include <sdk.h>] instead of [#include "sdk.h"]

4. Do not use [#include <wx/wx.h>] in either production headers or source code.

I will commit all of this as soon as i 'm not at work ;-)

 For Biplab

I thought i had already tried that (casting to cbEditor*), but maybe i hadn't.


Thank you everybody for contributing. As soon as the project is a little bit more robust and featured, i will open my svn team for anybody who wish to contribute, either by porting SVNInside to linux or other platfroms, or by addng new features.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: JGM on October 10, 2007, 08:51:13 pm
I was just reading the wxWidgets wiki and I found these links to be of interest:

http://libexecstream.sourceforge.net/
http://www.netbsd.org/~jmmv/process/

This was the url for reference:
http://www.wxwidgets.org/wiki/index.php/WxExecute
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on October 10, 2007, 09:32:03 pm
Thank you for the links.

For information, i had tried wxExecute synchronously : no problem.
and asynchronously too : the coupling with a wxProcess could be a great thing in order to, for example, run a command taking a long time and using the wxProcess::OnTerminate() inherited function to refresh the GUI when that command end.  All my tries worked.

But, given the bad feedback about wxExecute from Thomas, i will keep for the moment my old windows C code in the SVN repository and will change it to something else if needed. I'll keep my wxExecute tries closer in case of...

For the moment, i will concentrate my effort into other aspects and features of the projects, making the code more robust, etc.

And for wxExecute, the question stays open !!
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: dmoore on October 10, 2007, 10:10:25 pm
IMO, you should use wxExecute (and wxProcess when needed) as your standard implementation (Despite the justified misgivings of Thomas). That way your code will *mostly* work on all platforms with minimal changes (my Shell Extensions plugin and Python Debugger plugin work on both Linux and Win32 and both use asynchronous processes with redirected output courtesy of wxProcess).  The best way to do this would be to write a class wrapper around wxExecute/wxProcess or extend the incomplete Process implementation in the C::B SDK. Then if you feel the need, you can later add platform specific implementations for process handling without having to modify the SVN specific code in your plugin.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on October 10, 2007, 10:53:38 pm
EditorBase::Undo() is an empty virtual function which has been implemented in cbEditor. Try the following code.
Code: [Select]
// Code to catch cbEVT_EDITOR_MODIFIED event
void foo::OnEditorModified(CodeBlocksEvent& event)
{
    cbEditor* ed = (cbEditor*)event.GetEditor();
    ed->Undo();
}

Or

Code: [Select]
cbEditor* ed = Manager::Get()->GetEditorManager()->GetBuiltinActiveEditor();
ed->Undo();

HTH. :)

No one of those code snippets is working. I simply don't understand how to do that.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: stahta01 on October 11, 2007, 03:53:39 pm
Patch to for building under windows without pre-compiled headers.

Tim S

Code: [Select]
Index: src/Dialogs/wxSVNTreeCtrl.cpp
===================================================================
--- src/Dialogs/wxSVNTreeCtrl.cpp (revision 8)
+++ src/Dialogs/wxSVNTreeCtrl.cpp (working copy)
@@ -1,6 +1,7 @@
 #include <sdk.h> // Code::Blocks SDK
 #ifndef CB_PRECOMP
     #include <configmanager.h>
+    #include <cbeditor.h>
     #include <cbproject.h>
 #endif
 #include <wx/menu.h>
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: MortenMacFly on October 12, 2007, 08:16:26 am
Patch to for building under windows without pre-compiled headers.
Reminds me: Stahta01: What compiler config do you use to get these results? I tried installing GCC 3.3.1 but it never was able to link C::B with it (although I have compiled everything from scratch, including wx with 3.3.1).
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: stahta01 on October 12, 2007, 08:34:08 am
Patch to for building under windows without pre-compiled headers.
Reminds me: Stahta01: What compiler config do you use to get these results? I tried installing GCC 3.3.1 but it never was able to link C::B with it (although I have compiled everything from scratch, including wx with 3.3.1).

MinGW GCC 3.4.5, note I tried it with 3.3.1, but more work is needed on it.

You need to remove the defines of CB_PRECOMP and WX_PRECOMP in the Code::Blocks project file.
Then add the define of NOPCH.

Tim S
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on October 12, 2007, 10:41:28 am
As some of you may have see, i commited all patches posted on this topic, and made a little effort in the source code to translate french comments to english, not all of them for the moment are but they will soon.

I am also reorganizing my code to let it be more readable and changins some interfaces, specially CSNComand class and inheriteds ones.

Fot the moment, that works :
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: MortenMacFly on October 12, 2007, 10:46:07 am
You need to remove the defines of CB_PRECOMP and WX_PRECOMP in the Code::Blocks project file.
Then add the define of NOPCH.
Oh - that way... nice catch. Thanks! :-)
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on October 14, 2007, 09:22:52 pm
Interfaces of CSVNCommand and inherited classes have been redesigned to be clearer and more understandable. All classes named CSVN...Result and CSVN...Params no more exist. Everything is done in  CSVN... classes.

Next step will be the integration of wxExecute and wxProcess in the execution of svn commands, in order to have 2 choices when executing one command :
     -synchronous execution for commands executing fastly
     -asynchronous execution for slower commands, with a notification of the end of the process by sending a wxEvent to an wxEventHandler, the event being given to the CSVNCommand at runtime.

I have made some tests with both, and everything is OK, no problem when getting the command line output.

I will keep my windows implementation of this, but it won't be the default, even for windows users. This code will be compiled only if something like WINAPI_IMPLEMENTATION is defined.

This is the only step tobe coded for SVNInside to be cross compiled. When this will be done, i would be glad if a linux user can try it on his PC, just to see if there are problems. The coding won't be finished at all at this time, but at least it will take place on solid bases.

If some of you have ideas for this plugin, it's time to give them, before other choices have been made and so it's more difficult to reimplement.

Thank eveybody for your interest, ideas, patches and programming advises!! :D

orel
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on October 19, 2007, 12:38:45 am
A bunch of modifications have been commited into SVNInside repository (accessible for everyone)
Now, code should compile and work also for linux users, there isn't a windows line anymore.

Note that i don't have a linux platform for the moment, so maybe i'm wrong with something, please tell me if you try it.
Note also that this is always a work in progress. I would appreciate anyone experience on my wxWidgets programming, the way i parse svn command line, or anything else


If you fall on an bug and want to help, please copy (if possible)  and paste what is on the 'Debug Log' message Pane of CB. If you build a debug version of SVNInside, every svn command line stdin, stdout and stderr will be printed on this pane.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: JGM on October 19, 2007, 04:37:30 am
A bunch of modifications have been commited into SVNInside repository (accessible for everyone)
Now, code should compile and work also for linux users, there isn't a windows line anymore.

Thats great news! Finally somebody made the job  :D
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: wvdakker on October 21, 2007, 10:17:48 pm
When does this plug-in make it into the CB nighties? I cant compile it because I have the SDK not available...

Thanks,
Willem
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on October 23, 2007, 11:05:29 pm
When does this plug-in make it into the CB nighties?

First, as i have told, this plugin is under construction, no planning has been made about its release... Also i began to develop it 6 weeks ago, alone, to learn wxWidgets and CB API, when i thank it would be great to share it to the cstart a new topicommunity, while i could get feedback and ideas from other users/developers, that's why i started a new topic.

I began a new job some weeks ago in software development which takes me a big part of my time, as almost anybody here, and try to find time for my personal developments.

Second, i am not part of the official CB staff, so, even if my plugin was released, i don't know at all if one day it would be included in the official CB plugins list or in the nightlies, though it would be great... ;-)

Today, the only thing i can tell you is that i work almost everyday on SVNInside and i always try get to the end of something i begin.

I cant compile it because I have the SDK not available...

That's a problem i met when i first wanted to test a CB plugin. The only solution i found was to compile CB and use the plugin with this cb version. CB doesn't have many dependencies (only wxWidgets if i remember) so that's made a relatively easily task, if you RTFM and maybe ask some help after.

For the moment, if you really need a working svn plugin in CB, there is cbTortoiseSVN, try it.

sincerely,

orl
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on October 26, 2007, 01:36:10 am
For those who are expecting a SVNInside release, i must tell you that i am changing the behaviour of tree tab. It was a bad idea to sort the files in folder, in respect to their svn status. Though it's easy to use with small projects, it begins to be annoying and not very instinctive when you have to deal with larger projects.

So, the tree will totally reflect the directory structure of your working copy, with differents icons for files having different status, the directories icons will also reflect their svn status.

I added a new tab in the 'messages pane' where svn command line input, normal and error output are printed. I also use it for the moment to print debug infos, can be useful to get user feedback about bugs.

The changes have not yet been commited to the repository (on Assembla) but they will be this weekend.
I will inform you of that and for any new features added.

Features that will be added soon are :

-possibility to see the difference between one file and another in the repository (any revision), the result will be viewable in a diff viewer of your choice (by using its command line parameters) or in C::B(the unified diff file given by 'svn diff' command)

-something like a property grid under the tree to watch properties of files like current revision, lock owner, date, url in repo, etc.

-the new 'messages pane' SVNInside tab will, like the squirrel script one, give the user the possibility to send suversion commands within C::B,  and see the output. Can be useful for 'subversion gurus' or those who want instant access to 'more exotic commands' not featured in SVNInside.

- A 'Refresh' buton for the SVNInside tree : in order to reflect some changes made from 'the outside' to the working copy, or by using the command line within C::B.

-what YOU think can be useful to a plugin like this one...
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: dmoore on October 26, 2007, 03:28:17 pm
orel: have you played around with my ShellExtensions plugin? looking at your latest changes, we have some feature overlap. feel free to borrow ideas/code.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on October 26, 2007, 05:43:50 pm
orel: have you played around with my ShellExtensions plugin? looking at your latest changes, we have some feature overlap. feel free to borrow ideas/code.

I am currently looking at it with a lot of interest, especially FileExplorer class. Thanks.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: stahta01 on October 28, 2007, 12:47:53 am
wxDIALOG_MODAL has been removed from wxWidgets 2.8 (when 2.6 compatible mode is off)
IIRC, wxDIALOG_MODAL does nothing in wxWidgets 2.6.

To backup my memory I found this in wxWidgets 2.6.4 wx/toplevel.h file has "#define wxDIALOG_MODAL 0"

Since "x | 0 = x", removing wxDIALOG_MODAL should not affect 2.6 builds in this instance.

Tim S

Index: src/Dialogs/SVNFileSelect.h
===================================================================
--- src/Dialogs/SVNFileSelect.h   (revision 21)
+++ src/Dialogs/SVNFileSelect.h   (working copy)
@@ -41,7 +41,7 @@
 
 ////@begin control identifiers
 #define dlgFileSelect 10017
-#define SYMBOL_FILESELECT_STYLE wxCAPTION|wxSTAY_ON_TOP|wxCLOSE_BOX|wxDIALOG_MODAL
+#define SYMBOL_FILESELECT_STYLE wxCAPTION|wxSTAY_ON_TOP|wxCLOSE_BOX
 #define SYMBOL_FILESELECT_TITLE _("File Selection Dialog")
 #define SYMBOL_FILESELECT_NAME dlgFileSelect
 #define SYMBOL_FILESELECT_SIZE wxSize(400, 300)

Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on October 29, 2007, 02:29:31 am
svn status command is now in realized in a background thread
the tree now reflects the real directory structure of your working copy, new folder icons that don't exist in CB and for the all others icon, we will now use the ones existing in CB images directory

made the patch from stahta01 to compile in wx 2.8... thanks

everything comitted to the repo

this is not yet finished, but it goes on!

due to big changes in some source files, the popup menu appearing by clicking the LMB on tree files/folders are not not active anymore, so this is not yet usable but this code exists and it's just waiting to be copied/pasted.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: MortenMacFly on October 29, 2007, 10:34:34 am
everything comitted to the repo
The latest changes in C::B's SVN trunk render compilation of this plugin impossible. If you have time, please do the following:
- remove the TIXML_USE_STL compiler switch
- in SVNInside::ReadConfigFromExtensionNode:
  - make sElement and sValue of type const char*
  - remove any .c_str() and ->c_str() for these two variables.
Done. ;-)
With regards, Morten.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on October 30, 2007, 12:31:58 am
everything comitted to the repo
The latest changes in C::B's SVN trunk render compilation of this plugin impossible. If you have time, please do the following:
- remove the TIXML_USE_STL compiler switch
- in SVNInside::ReadConfigFromExtensionNode:
  - make sElement and sValue of type const char*
  - remove any .c_str() and ->c_str() for these two variables.
Done. ;-)
With regards, Morten.

Done. Thank you very much.

Today commits are :

old config dialog tidied and is now used for project configuration, later a environement settings dialog will permit to set more globals properties of the plugin.

Now the plugin tree works on a per project basis, you can now have more than one project in the SVNInside tree, under a workspace icon This feature will permit a 'project/workspace commit'

Clicking the LMB on a project in SVN tree will show up a menu, clicking it will allow you to configure login, password and 'connect status' of the project. Connect status will be useful when you will be able or not to modify a locked file.ico


Commit is now possible on one file.

I think i can now continue coding, having a working foundation for managing workspace/projects/folder/files and that more "everyday features" will now be coded. Soon SVNInside will be usable, for the moment what works is :

-loading and configuring your project in the SVNInside tree, saving this config in the .cbp file.
-looking at the commands sent to, and the input from svn.
-files and folders icons relate to their status in the working copy.
-commiting one modified/added/deleted file to the repo.

what is here, but not working for the moment
-login/password


here a screenshot
(http://img153.imageshack.us/img153/1655/screenshotkq2.png)
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on November 01, 2007, 06:08:34 am
New features :
 - Commit one file or multiple folder (recursively or not)
 - Add one File to repository (not yet for folder)
 - Add a new file icon to repo (for file without status) useful when a new file is added to the CB project (though this is not yet implemented)
 - folder popup menu are now ordered into submenus for different action
 - the .cbp CB project file is now displayed in the tree, have a status and is now treated like any other file
 - FileSelection Dialog is bigger for better display of filenames
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: MortenMacFly on November 07, 2007, 11:27:27 am
New features :
I updated the plugin from SVN but now I'm having issues: It seems the plugin doesn't get activated at all suddenly. The constructor is run through but OnAttach never gets called. Do you experience the same? Am I missing something? Very strange... :shock:
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on November 08, 2007, 12:33:39 am
New features :
I updated the plugin from SVN but now I'm having issues: It seems the plugin doesn't get activated at all suddenly. The constructor is run through but OnAttach never gets called. Do you experience the same? Am I missing something? Very strange... :shock:
As SVNInside is still under development, it is possible to fall on some big problems, as the one you encountered, but what a strange thing!! Sorry i'm really not aware of something like that, can you give me the number of the revision from which you updated (or when did you update) ?

The development is going on, i am currently re-introducing the first folder icons SVNInside had, but not to categorize the tree by status, like before! No i'm just introducing the notion of 'folder status', a folder will have more possibilities than only being OK, modified or not-under-control. 
A folder will also be added, deleted, etc... a lot of things can be also happen to a directory with svn!

And for the more curious of you, those who have looked inside the code, you maybe saw that i am thinking of a way to manage svn properties in SVNInside, with the help of wxPropertyGrid control, well suited for that!!!
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: MortenMacFly on November 09, 2007, 08:49:02 am
revision from which you updated (or when did you update) ?
I am currently using revision 33 - same problem. :-(
This is really strange. The object gets instantiated but doesn't seems to receive the notifications although the plugin is properly registered. I know from other users (and you, obviously) that it works... so it must be an issue with my environment...?! Hence all the other plugins work. Very, very strange...
Anyways - don't worry too much, it seems it's just me.
With regards, Morten.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: mandrav on November 12, 2007, 02:20:44 pm
Here's a patch against trunk that makes this plugin work with the latest changes in our repository.
As a side bonus, there's also a unix project file and post build steps script.

[attachment deleted by admin]
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: mandrav on November 12, 2007, 02:40:03 pm
I have some constructive criticism to make, if I 'm allowed to do so.

Please do NOT save the user's password in the project file, not at least without asking first. If the user later sends this project file to someone else, all of the sudden the rest of the world knows his secret password. This can be very bad...

I see two solutions to this problem:


Other than that, nice job :).
Although I got a couple of crashes because of double-freeing variables but these things happen and I guess you 'll eventually fix them.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on November 12, 2007, 10:41:22 pm
Here's a patch against trunk that makes this plugin work with the latest changes in our repository.
As a side bonus, there's also a unix project file and post build steps script.

I was 2 days out of there, and then, you post a patch to fix this strange problem i couldn't reproduce. As a bonus, i get all my project need to get it compile and work on unix : Thank you very much Mandrav.

I have some constructive criticism to make, if I 'm allowed to do so.
For sure, that's what i'm expecting from people !

Please do NOT save the user's password in the project file, not at least without asking first. If the user later sends this project file to someone else, all of the sudden the rest of the world knows his secret password. This can be very bad...

I see two solutions to this problem:
  • If you must save the password, at least save it in encrypted form and, in all cases, ask the user for his consent FIRST.
I was thinking of that, but i found this to be not so secure because people can always crack it...

  • Do not save the password. Save the other options if you want but not the password. Ask the user for the password on first connection and keep it in memory until the project is closed. I believe this would be the better course of action.
That's the solution i found to be the best. When you open a project needing a passowrd, you set it in the project options.As long as it is opened, you won't need to retype it. That will be implemented this way.


Other than that, nice job :).
Although I got a couple of crashes because of double-freeing variables but these things happen and I guess you 'll eventually fix them.
Thanxs. Obviously, when i get one, i fix it. But in order to help me, maybe you can tell me when you see one.


So have you try it on linux-unix ? Did you find something wrong, did it work ?
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: mandrav on November 13, 2007, 09:51:42 am
Quote
So have you try it on linux-unix ? Did you find something wrong, did it work ?

Obviously I did try it but didn't do much with it because it crashed twice on me.

The reproducible crash is:
1. open a project which is under svn control (but you haven't configured svninside for it yet - I chose the codeblocks.cbp for that).
2. in the svn tree, right-click on the project root and select properties.
3. don't change anything in the dialog
4. press connect
5. press ok
6. pooof :)

The other crash occurred when I clicked refresh on the project root (another project). I had also clicked refresh on one of the files in it before, don't know if that matters.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: MortenMacFly on November 13, 2007, 03:43:00 pm
Hehe... I guess Yiannis has broken this plugin "successfully" again. ;-)
But it's easy: Just add those two lines on the beginning of SVNInsideLogger.cpp:
Code: [Select]
template<> SVNInsideLogger* Mgr<SVNInsideLogger>::instance = 0;
template<> bool  Mgr<SVNInsideLogger>::isShutdown = false;
(Just like in the other managers, too - see modifications in r4629.)
With regards, Morten.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on November 13, 2007, 08:53:59 pm
Code: [Select]
template<> SVNInsideLogger* Mgr<SVNInsideLogger>::instance = 0;
template<> bool  Mgr<SVNInsideLogger>::isShutdown = false;

Thanx for that
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: darthdespotism on November 17, 2007, 04:22:02 pm
I'm trying to get this Plugin working on my Ubuntu/Linux box.

Although compiling is not posible with the -dev packages and an $cb pointing somewhere in /usr/include/codeblocks is not posible (but isn't that the purpose of the -dev Packages?) I finally got it compiling (rev4640) but when starting C::B I only get the following Message:

Code: [Select]
Scanning for plugins in /home/darthdespotism/.codeblocks/share/codeblocks/plugins
/home/darthdespotism/.codeblocks/share/codeblocks/plugins/libSVNInside.so: not loaded (missing symbols?)

Can anyone point me to the solution for this?
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on November 17, 2007, 08:20:47 pm
I'm trying to get this Plugin working on my Ubuntu/Linux box.

Although compiling is not posible with the -dev packages and an $cb pointing somewhere in /usr/include/codeblocks is not posible (but isn't that the purpose of the -dev Packages?) I finally got it compiling (rev4640) but when starting C::B I only get the following Message:

Code: [Select]
Scanning for plugins in /home/darthdespotism/.codeblocks/share/codeblocks/plugins
/home/darthdespotism/.codeblocks/share/codeblocks/plugins/libSVNInside.so: not loaded (missing symbols?)

Can anyone point me to the solution for this?

This plugin should worl on linux, although i'm developing it no a Windows platform.
That's why Mandrav smartly brought a linux CB project you can find on the svn repository.

A silly question! did you use it?
I'm sorry i can't help you with your problem
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: stahta01 on November 17, 2007, 08:25:18 pm
Patch I applied to help compiling under windows.

Note, I have not ran it and did anything with it yet.

Tim S.

Code: [Select]
Index: SVNInside.cbp
===================================================================
--- SVNInside.cbp (revision 34)
+++ SVNInside.cbp (working copy)
@@ -71,7 +71,7 @@
  <Add library="codeblocks" />
  <Add library="wxscintilla" />
  <Add directory="$(#cb)\devel" />
- <Add directory="$(#cb)\sdk\propgrid" />
+ <Add directory="$(#cb)\plugins\contrib\wxSmith\propgrid" />
  <Add directory="$(#wx.lib)\gcc_dll" />
  </Linker>
  <ExtraCommands>
Index: src/Dialogs/SVNInsideLogger.cpp
===================================================================
--- src/Dialogs/SVNInsideLogger.cpp (revision 34)
+++ src/Dialogs/SVNInsideLogger.cpp (working copy)
@@ -16,6 +16,9 @@
 #include <wx/settings.h>
 #include <wx/ffile.h>
 
+template<> SVNInsideLogger* Mgr<SVNInsideLogger>::instance = 0;
+template<> bool  Mgr<SVNInsideLogger>::isShutdown = false;
+
 // static members instantiation
 int             SVNInsideLogger::m_LoggerId = -1;
 TextCtrlLogger* SVNInsideLogger::m_Logger   = 0;
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: darthdespotism on November 17, 2007, 10:53:55 pm
A silly question! did you use it?
I'm sorry i can't help you with your problem

Are you referring to the *-unix.cbp? I built it with this one, but as I said it doesn't load.

I'm getting the following warnings, perhapes it helps:
Code: [Select]
Linking dynamic library: libSVNInside.so
Output size is 3,85 MB
Running project post-build steps
sh post_build_step
post_build_step: 2:
: not found
zip warning: name not matched: resources/*.xrc
updating: manifest.xml (deflated 52%)
cd: 4: can't cd to resources
zip error: Nothing to do! (../SVNInside.zip)
cd: 6: can't cd to ..
zip warning: name not matched: SVNInside.zip
updating: libSVNInside.so
cp: reguläre Datei „../../../devel/share/codeblocks/plugins/\r“ kann nicht angelegt werden: No such file or directory
 (deflated 75%)
cp: reguläre Datei „../../../devel/share/codeblocks/\r“ kann nicht angelegt werden: No such file or directory
Process terminated with status 1 (0 minutes, 32 seconds)
0 errors, 4 warnings
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: MortenMacFly on November 17, 2007, 11:07:27 pm
cp: reguläre Datei „../../../devel/share/codeblocks/plugins/\r“ kann nicht angelegt werden: No such file or directory
 (deflated 75%)
Do a dos2unix on this file and it'll work. BTW: Are you sure you grabbed that from SVN? Because usually SVN handles such things correctly. Very strange...?!
With regards, Morten.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: darthdespotism on November 18, 2007, 01:13:50 am
Yes, I do have an svn checkout for this.

I think I manually got those \r s (VIM displays them quite visible ;) ) but also installed dos2unix.

Actually it builds without any warning but still does not load (Codeblocks is at r4640 SVNInside at r34)
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: skwo on November 23, 2007, 04:56:42 pm
Anyone got binaries for windows please?
Thanks.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: stahta01 on November 24, 2007, 12:29:32 am
Anyone got binaries for windows please?
Thanks.

I can try to make an Binary, but can not really test it without a lot of work.
( I am using the SVN 1.5 Beta )

Which Nightly are you using?
I would test it; that it installs, enables and disables in your nightly, but that all I can test.

NOTE, this plug-in is still a alpha level code right now. The developer is still adding major features and there may be major bugs it it. DO NOT use on code you can not afford to lose.

Tim S
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: skwo on November 24, 2007, 12:42:35 am
Anyone got binaries for windows please?
Thanks.

I can try to make an Binary, but can not really test it without a lot of work.
( I am using the SVN 1.5 Beta )

Which Nightly are you using?
I would test it that it installs, enables and disables in your nightly, but that all I can test.

Tim S

I'm using the last nightly from 15 November. I tried to compile my self but I don't have defines of wx and cb.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: stahta01 on November 24, 2007, 01:53:00 am
NOTE, this plug-in is still a alpha level code right now. The developer is still adding major features and there may be major bugs it it. DO NOT use on code you can not afford to lose.


I have uploaded the Windows binary plug-in to
http://www.savefile.com/projects/1039215

Direct link is http://www.savefile.com/files/1216969

Filename is SVNInside.7z

Tim S
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: skwo on November 24, 2007, 11:50:55 am
stahta01 Thanks a lot.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on November 26, 2007, 12:33:31 pm
Hi everybody, sorry for absence of features addition those last couple of weeks. I was very busy with other things and i have also redesigned some classes in SVNInside because i was not fully statisfied by my code.

I am going in the direction of more robust code, reimplementing with my new API the features that worked before.

Expect a major commit on svn in a few days !!
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: darthdespotism on November 26, 2007, 07:06:26 pm
Cool, I'll test it again on linux then (Debian Lenny for now) ;)
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: MuteSpirit on November 28, 2007, 02:02:42 pm
Hi everybody.
I think that SVNInside is very usefull.
I have made some bug fix.
Bug: If you change properties of project on SVNInside panel from "Disconnected" to "Connected" and then try to change properties of the same project the C::B will crash.
Fix:
    File: src\Dialogs\wxSVNTreeCtrl.cpp
    Function: void wxSVNTreeCtrl::OnProjectProperties (wxCommandEvent& event)
    Original code:
...
            if (OldConfig != NewConfig)
            {
                ...
                // is status has been modified and is now connected ?
                if (false == OldConfig.m_bConnectStatus && NewConfig.m_bConnectStatus)
                {
                    this->Delete(pProjectItem->GetId());

                    // it project is created, add it to the list
                    if (m_pCurrProject = CreateProjectTree (project, &NewConfig))
                        m_pWrkspcFile->m_Files.push_back(m_pCurrProject);
                }
            }
...
   Fixed code:
...
            if (OldConfig != NewConfig)
            {
                ...
                // is status has been modified and is now connected ?
                if (false == OldConfig.m_bConnectStatus && NewConfig.m_bConnectStatus)
                {
                    this->Delete(pProjectItem->GetId());

                    // it project is created, add it to the list
                    if (m_pCurrProject = CreateProjectTree (project, new svniProjectConfig(NewConfig)))
                        m_pWrkspcFile->m_Files.push_back(m_pCurrProject);
                }
            }
...

Problem takes place because NewConfig is local object, but new svniFile object m_pCurrProject save pointer on this object and tries delete it in destructor.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on November 28, 2007, 02:10:12 pm
Thank you very much MuteSpirit for this bugfix and thank also for you comment, i also think that svn integration in Code::Blocks is a very useful feature!!
As you may have read, i am reorganizing the API once again to get SVNInside more robust. I am working on that but don't want to commit my work until i come with as much features as current version.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: ludug3r0 on December 02, 2007, 06:37:22 am
Well.. Exactly the same problems darthdespotism had happened here too. Except that I'm with rev 4681.  :(
I couldn't see your plugin working yet but I'm anxious to see it working here.  I will keep trying to run it later.

Keep the good work!  :D
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: darthdespotism on December 02, 2007, 10:50:00 am
Well.. Exactly the same problems darthdespotism had happened here too. Except that I'm with rev 4681.  :(
I couldn't see your plugin working yet but I'm anxious to see it working here.  I will keep trying to run it later.

Keep the good work!  :D

What Operating System are you on?
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: ludug3r0 on December 02, 2007, 07:56:26 pm
Ubuntu 7.10

I can build the codeblocks source and the plugin too. Even the same erros in the post_build_step happende here. For the later I used dos2unix and it's now alright.

The only strange think that happened at compile time was two warnings about diferent -fpic settings between the Code::Blocks build files and the SVNInside build files... They happened at the plugin compilation.

Here is the warning that happens. It's the same warning in both times.
Quote
/home/rafael/Temp/CodeBlocks/src/include/sdk.h:12:26: aviso: /home/rafael/Temp/CodeBlocks/src/include/sdk_precomp.h.gch: created and used with different settings of -fpic
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on December 02, 2007, 09:05:26 pm
Here is the warning that happens. It's the same warning in both times.
Quote
/home/rafael/Temp/CodeBlocks/src/include/sdk.h:12:26: aviso: /home/rafael/Temp/CodeBlocks/src/include/sdk_precomp.h.gch: created and used with different settings of -fpic

I really don't know what this is about? But as is said before, i am now working on a more robust version of SVNInside and my work is going on every day. So, if you can be a little more patient ,you should wait until i come with a new release, though i don't think it would resolve those warning you got!

Regards,
orl
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: MortenMacFly on December 02, 2007, 09:09:39 pm
though i don't think it would resolve those warning you got!
Don't worry, we can settle this easily then. The reason is most liekely a wrong parameter in the build setup... no prob. ;-)
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: MortenMacFly on December 22, 2007, 01:43:31 pm
...minor bug that causes a crash on exit on Windows Vista:
int void wxSVNTreeCtrl::OnProjectClosed(CodeBlocksEvent& event)
The line:
this->Delete(pLoadedPrj->GetId());
should better be inside the if (pLoadedPrj) (...) switch yard. Otherwise you are accessing a null pointer there possibly... ;-)
With regards, Morten.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on December 23, 2007, 12:56:45 am
Thank you Morten for reporting me this bug, but the current code of SVNInside is nearly not at all the same as the one i commit to svn on assembla a long ago (some weeks). I am not commiting my current work until i come with a more stable version and with the minimum features one need. i am sure i will have some bugs but my api is now better designed.

Why i am taking longer than i thought is because i really had some big problems with ::wxExecute in asynchronous mode, and i decided for the moment to totally removes the asynchronous code, so all function calls are sequential and CB can be freezed when calling some svn commands taking a long time to return.

The problems i had with ::wxExecute called asynchronously had really no sense, sometimes everything worked like a charm, then next time i sent wxExecute a longer command line and it won't return, leaving my plugin anc CB hanging and freezing. I hope they will improve that or i will be obliged to do everything synchrously or maybe use another API for executing commands which is more stable, any ideas?

I am also looking ()at using subversion in a static or dynamic library to deal directly with the svn API : no command line, no pipes, more speed, more informations, more control. But sv is really a nightmare to compile and build on mingw, so it's not for tomorrow.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: MortenMacFly on December 23, 2007, 06:42:06 am
any ideas?
The issue you have described could be the "well-known" wxExecute bug that limits the command line to a (???) 255 characters. If you provide a longer command line you are corrupting memory without notification / exception. Thomas once discovered that issue but so far we were just lucky when creating compiler command lines. Thomas also worked on a cbExecute due to that that removes this (stupid) limitation. But AFAIK it is not yet finished.
With regards, Morten.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: eranif on December 23, 2007, 07:45:53 am
The issue you have described could be the "well-known" wxExecute bug that limits the command line to a (???) 255 characters. If you provide a longer command line you are corrupting memory without notification / exception. Thomas once discovered that issue but so far we were just lucky when creating compiler command lines. Thomas also worked on a cbExecute due to that that removes this (stupid) limitation. But AFAIK it is not yet finished.
With regards, Morten.

You got me curios there, so I went and read wxExecute source code (MSW), I cant seem to see the limitation you mentioned of 255 characters.
The command for wxExecute is of type of wxString, and it passed to ::CreateProcess() method like this command.c_str() - so no limitation here.

Maybe you are talking of Linux?
On Linux, for executing a synchronous commands, I dont use wxExecute, but this (it works very well on Linux & Mac):
Code: [Select]
void ExecuteCommand(const wxString &command, wxArrayString &output, long flags)
{
#ifdef __WXMSW__
wxExecute(command, output, flags);
#else
FILE *fp;
char line[1024];
memset(line, 0, sizeof(line));
fp = popen(_C(command), "r");
while ( fgets( line, sizeof line, fp)) {
output.Add(_U(line));
memset(line, 0, sizeof(line));
}

pclose(fp);
#endif
}

EDIT: Forgot to mentioned, that my wx version is 2.8.4 on windows, 2.8.6 on Linux
Eran

Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: MortenMacFly on December 23, 2007, 08:26:16 am
I cant seem to see the limitation you mentioned of 255 characters.
That's why I placed the "???" there. I don't recall exactly what the limitation was - but Thomas can tell.

Maybe you are talking of Linux?
It was on Linux, yes - definitely. (And I thought we are at Linux in this discussion as I saw /home/rafael/Temp/......?!). But IMHO this affected Windows, too. If not than this was my faulty assumption. ;-)

With regards, Morten.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on December 23, 2007, 04:01:45 pm
I cant seem to see the limitation you mentioned of 255 characters.
That's why I placed the "???" there. I don't recall exactly what the limitation was - but Thomas can tell.

Maybe you are talking of Linux?
It was on Linux, yes - definitely. (And I thought we are at Linux in this discussion as I saw /home/rafael/Temp/......?!). But IMHO this affected Windows, too. If not than this was my faulty assumption. ;-)

With regards, Morten.
Not only linux, the problem i had with ::wxExecute which seem to deal with command line length sometimes, and something else the other times!!!??? happens to me on windows, so it may not be a platform problem but a wx one, IMHO!!

I am currently thinking of reimplementing my svniCommand classes with my old windows only implementation, someone could provide a working linux implementation, and the compiler will switch those regarding to the platform...
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: darthdespotism on December 26, 2007, 11:46:47 am
When can we expect your new code? I'm very interested in this plugin ;)

Trying to figure out why the plugin won't load for me I compared it to the Plugins provided with Codeblocks and noticed that these all provide an .la but SVNInside doesn't. So I tried to produce one for it but couldn't make it work up to now. Is this an necessary step for Gnu/Linux? Can anyone provide me help in how to produce one?
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on January 04, 2008, 12:09:54 am
For those of you who were waiting the new SVNInside code, i just updated the repository on Assembla with it. Sorry for linux users, i didn't update for the moment the linux CB project and the 'post_build_step' file.

Note that this is not a final release, and even a release at all, but this code is much robust than the old one.

Due to the fact i reverted to synchronous execution the svn commands, maybe CB can and will hang a little when loading a large project like CodeBlocks for example.

Many features are missing but the present ones are working.

Note also that for the moment repository needing a password/login to act on are not supported, but it is the next feature i am currently developing.
Try to play with it and continue giving me some feedback, advises, and patches :D thank you

I will make a longer post this weekend to explain the features this revision has

(http://img147.imageshack.us/img147/8738/screen1ag1.jpg)
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: darthdespotism on January 04, 2008, 11:44:13 am
After changing the #include in svniTreeItem from cbProject.h to cbproject.h I could build your plugin for Linux the usual Way (replacing the sources)

There seems to be no need to modify post_build_steps.

Patch for the above and Projectfile for Unix is in my attachment if it is useful for anyone.

I still can't load the plugin but that's no news. (Debian Lenny but was already there in Ubuntu Feisty)

[attachment deleted by admin]
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on January 17, 2008, 01:42:19 am
Code::Blocks is crashing when i go in 'Manage Plugins' dialog, then i choose to uninstall my plugin, svninside
The svninside notebook page is removed from CB management notebook, the plugin is removing its log window, all of that without any problem. I then close the Manage plugins tab.

After that, i do nothing more than closing CB and i experiment a crash. CB does'nt crash if i don't uninstall my plugin or if i just disable it, the crash happens only after SVNInside uninstallation.

What am i doing wrong? any ideas


the plugin is in its 58th revision when this is hapening, while CB is in its 4807th rev
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: stahta01 on January 17, 2008, 02:31:06 am
I will try to see if I can duplicate the problem when using an debug build of wxWidgets.
I just duplicated it with an release build of wxWidgets.

Note: The error message implied it was an MinGW Compiler error to me.

Edit: Decided to try it with MinGW GCC 3.4.5 before doing an debug build of wxWidgets.

Crashed with wxWidgets and Code::Blocks complied with MinGW GCC 3.4.5, too.

Now, trying wxWidgets debug complied with MinGW GCC 3.4.5.

Take a while to compile it all.

Tim S
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: JGM on January 17, 2008, 03:14:14 am
That problem happened to me also on windows only
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: stahta01 on January 17, 2008, 07:21:46 am
Can someone out there see if on windows; if you get the about the same issue un-installing wxSmith MIME plugin.

I also had if Crash un-installing Code Snippets and To Do List plugins.

Note, the crash of Code Snippets and To Do List plugins look to be more like the SVN Plugin crash.

Both mention PluginManager::Configure


The message running under debug implies issues loading an library; the message imply it was already loaded.
I am guess it might be the wxPropertyGrid library.

Tim S

Part of Code-Snippet Crash report.

Code: [Select]
Call stack:
6CD6E304  F:\SourceCode\Projects\IDEs\CodeBlocks\codeblocks\src\nightly\wxmsw28u_gcc_cb.dll:6CD6E304  _ZN9wxAppBase14SendIdleEventsEP8wxWindowR11wxIdleEvent
6CD6E342  F:\SourceCode\Projects\IDEs\CodeBlocks\codeblocks\src\nightly\wxmsw28u_gcc_cb.dll:6CD6E342  _ZN9wxAppBase14SendIdleEventsEP8wxWindowR11wxIdleEvent
6CD6E4A8  F:\SourceCode\Projects\IDEs\CodeBlocks\codeblocks\src\nightly\wxmsw28u_gcc_cb.dll:6CD6E4A8  _ZN9wxAppBase11ProcessIdleEv
6CD90AD1  F:\SourceCode\Projects\IDEs\CodeBlocks\codeblocks\src\nightly\wxmsw28u_gcc_cb.dll:6CD90AD1  _ZN17wxEventLoopManual3RunEv
6CD33CC7  F:\SourceCode\Projects\IDEs\CodeBlocks\codeblocks\src\nightly\wxmsw28u_gcc_cb.dll:6CD33CC7  _ZN8wxDialog9ShowModalEv
618628B7  F:\SourceCode\Projects\IDEs\CodeBlocks\codeblocks\src\nightly\codeblocks.dll:618628B7  _ZN13PluginManager9ConfigureEv
00422DA9  F:\SourceCode\Projects\IDEs\CodeBlocks\codeblocks\src\nightly\codeblocks.exe:00422DA9
6CCCA4AE  F:\SourceCode\Projects\IDEs\CodeBlocks\codeblocks\src\nightly\wxmsw28u_gcc_cb.dll:6CCCA4AE  _ZN12wxEvtHandler21ProcessEventIfMatchesERK21wxEventTableEntryBasePS_R7wxEvent
6CCCBA89  F:\SourceCode\Projects\IDEs\CodeBlocks\codeblocks\src\nightly\wxmsw28u_gcc_cb.dll:6CCCBA89  _ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler
6CCCBFBF  F:\SourceCode\Projects\IDEs\CodeBlocks\codeblocks\src\nightly\wxmsw28u_gcc_cb.dll:6CCCBFBF  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  F:\SourceCode\Projects\IDEs\CodeBlocks\codeblocks\src\nightly\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent

Part of To Do

Code: [Select]
Call stack:
6CDE18E4  F:\SourceCode\Projects\IDEs\CodeBlocks\codeblocks\src\nightly\wxmsw28u_gcc_cb.dll:6CDE18E4  _ZN12wxWindowBase14UpdateWindowUIEl
6CD14C72  F:\SourceCode\Projects\IDEs\CodeBlocks\codeblocks\src\nightly\wxmsw28u_gcc_cb.dll:6CD14C72  _ZN8wxWindow14OnInternalIdleEv
6CD6E30A  F:\SourceCode\Projects\IDEs\CodeBlocks\codeblocks\src\nightly\wxmsw28u_gcc_cb.dll:6CD6E30A  _ZN9wxAppBase14SendIdleEventsEP8wxWindowR11wxIdleEvent
6CD6E342  F:\SourceCode\Projects\IDEs\CodeBlocks\codeblocks\src\nightly\wxmsw28u_gcc_cb.dll:6CD6E342  _ZN9wxAppBase14SendIdleEventsEP8wxWindowR11wxIdleEvent
6CD6E342  F:\SourceCode\Projects\IDEs\CodeBlocks\codeblocks\src\nightly\wxmsw28u_gcc_cb.dll:6CD6E342  _ZN9wxAppBase14SendIdleEventsEP8wxWindowR11wxIdleEvent
6CD6E4A8  F:\SourceCode\Projects\IDEs\CodeBlocks\codeblocks\src\nightly\wxmsw28u_gcc_cb.dll:6CD6E4A8  _ZN9wxAppBase11ProcessIdleEv
6CD90AD1  F:\SourceCode\Projects\IDEs\CodeBlocks\codeblocks\src\nightly\wxmsw28u_gcc_cb.dll:6CD90AD1  _ZN17wxEventLoopManual3RunEv
6CD33CC7  F:\SourceCode\Projects\IDEs\CodeBlocks\codeblocks\src\nightly\wxmsw28u_gcc_cb.dll:6CD33CC7  _ZN8wxDialog9ShowModalEv
618628B7  F:\SourceCode\Projects\IDEs\CodeBlocks\codeblocks\src\nightly\codeblocks.dll:618628B7  _ZN13PluginManager9ConfigureEv
00422DA9  F:\SourceCode\Projects\IDEs\CodeBlocks\codeblocks\src\nightly\codeblocks.exe:00422DA9
6CCCA4AE  F:\SourceCode\Projects\IDEs\CodeBlocks\codeblocks\src\nightly\wxmsw28u_gcc_cb.dll:6CCCA4AE  _ZN12wxEvtHandler21ProcessEventIfMatchesERK21wxEventTableEntryBasePS_R7wxEvent
6CCCBA89  F:\SourceCode\Projects\IDEs\CodeBlocks\codeblocks\src\nightly\wxmsw28u_gcc_cb.dll:6CCCBA89  _ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler
6CCCBFBF  F:\SourceCode\Projects\IDEs\CodeBlocks\codeblocks\src\nightly\wxmsw28u_gcc_cb.dll:6CCCBFBF  _ZN12wxEvtHandler12ProcessEventER7wxEvent
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on January 17, 2008, 10:54:40 pm
Those plugins are crashing CB just after having clicked on Uninstall in Manage plugins dialog :


These plugin is crashing CB just after having clicked on Uninstall (unhandled exception thrwn message)

No problem with :


I tried removing all code using wxPropertyGrid in svnInside -> same problem occurs (uninstallation works but CB crash on closing app)
I also tried removing SVNInside logger creation and deletion --> same problem
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on January 18, 2008, 10:37:30 pm
When can we expect your new code? I'm very interested in this plugin ;)

Trying to figure out why the plugin won't load for me I compared it to the Plugins provided with Codeblocks and noticed that these all provide an .la but SVNInside doesn't. So I tried to produce one for it but couldn't make it work up to now. Is this an necessary step for Gnu/Linux? Can anyone provide me help in how to produce one?

Hi darthdespotism and thank you for your interest in SVNInside, have you check the repo recently, the new code you were expecting is here and SVNInside begins to be fully working. For the moment you can't do too special things but it's useful for everyday use of svn like :


But, as i don't develop it on linux, i am sorry i can't help you with your question, as i know some users have tried it on linux and it is working. A silly question from myself : are you trying to use with a downloaded nightly or from a 'built yourself from the sources' CB?

Because the only for the moment to use it is from a own built CB.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: JGM on January 19, 2008, 12:27:29 am
Because the only for the moment to use it is from a own built CB.

I don't know if I'm wrong (i do it), but you can also link against the nightly libcodeblocks.dll and the wxwidgets*dll that uses the nightly just by linking directly to the dll.  :) May be I should write an article about this on the wiki.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on January 19, 2008, 01:05:55 am
I don't know if I'm wrong (i do it), but you can also link against the nightly libcodeblocks.dll and the wxwidgets*dll that uses the nightly just by linking directly to the dll.  :) May be I should write an article about this on the wiki.

I was not aware of that way to link a plugin with Code::Blocks, and i really would have know it before : when i spent hours trying to understand why the plugin i was building was not loaded by CB nightly, saying that symbols were missing in the plugin dynamic library.

I will try that as soon as possible and come back here. Because if you are true, it will be really easier for users to test/use my plugin (and other ones), not being obliged to compile CB before...

Thank you for that very useful hint, at least for me!! :D

Best regards,
orl
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: JGM on January 19, 2008, 02:30:01 am
I was not aware of that way to link.

You're not alone that happened to me also  :), for that reason i wrote a quick howto, really incomplete, but for programmers it should be enough to understand the concept, but I will update it later, here it is:

http://wiki.codeblocks.org/index.php?title=Linking_the_plugin_to_a_Nightly_Build
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on January 19, 2008, 05:17:53 pm
You're not alone that happened to me also  :), for that reason i wrote a quick howto, really incomplete, but for programmers it should be enough to understand the concept, but I will update it later, here it is:

http://wiki.codeblocks.org/index.php?title=Linking_the_plugin_to_a_Nightly_Build

Really cool!! this gonna be helpful !!
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: Wavesonics on January 19, 2008, 08:55:22 pm
Orel, what state is your plug-in in? Is it functional?
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on January 19, 2008, 09:57:56 pm
Orel, what state is your plug-in in? Is it functional?
Wavesonics, if you mean by 'functional' that you can use it to manage your working copy from inside CB, i would say yes. But as i said it, it's for the moment intended for 'everyday use', i  mean not for creating a repo, or cheking out a working copy. It will be in the future.

But if you use it, try to give me the maximum feedback about what you think is OK, what is not and the bugs you may have, in rder to me t improve it.

Note also that i have added a new tab in CB settings/environment dialog to modify some options. Today those settings doesn't do nothing, so svn executable must in your PATH in order for SVNInside to run svn.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: stahta01 on January 20, 2008, 02:25:34 am
Patch needed under Windows XP when not using Pre-Compiled Headers (PCH)

Tim S

Code: [Select]
Index: src/dialogs/svniTreeCtrl.cpp
===================================================================
--- src/dialogs/svniTreeCtrl.cpp (revision 59)
+++ src/dialogs/svniTreeCtrl.cpp (working copy)
@@ -13,6 +13,8 @@
     #include <configmanager.h>
     #include <cbeditor.h>
     #include <cbproject.h>
+    #include <cbworkspace.h>
+    #include <projectmanager.h>
 #endif
 #include <wx/menu.h>            // for "class wxMenu"
 #include <wx/imaglist.h>        // for "class wxImageList"
Index: src/svniPlugin.cpp
===================================================================
--- src/svniPlugin.cpp (revision 59)
+++ src/svniPlugin.cpp (working copy)
@@ -10,8 +10,11 @@
 
 #include <sdk.h> // Code::Blocks SDK
 #ifndef CB_PRECOMP
+    #include <wx/dir.h>
+
     #include <projectmanager.h>
     #include <cbproject.h>
+    #include <configmanager.h>
 #endif
 
 #include <wx/wxFlatNotebook/wxFlatNotebook.h>
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: Wavesonics on January 20, 2008, 02:34:00 am
Sounds great, when I get a chance I'll compile it and start using it and let you know how it goes :)
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on January 20, 2008, 03:19:36 am
Sounds great, when I get a chance I'll compile it and start using it and let you know how it goes :)

As soon as you wish, you can get the latest source from a svn repository here : http://tools.assembla.com/svn/SVNInside (http://tools.assembla.com/svn/SVNInside)
Maybe you missed it because it was on the 1st page of this topic

Note that the cb project file runs a post_build_step.bat after linking the plugin in order to pack the necessary for CB to run it. If you want SVNInside to compile and work 'out of the box' the best is to checkout the repository into a directory called 'svninside' alongside the other plugins in CB directory structure (not the contribs one), that way :

YOUR_CB_DIR/src/plugins/svninside

If you test it on windows, the post_build_step.bat file is uptodate.

For linux users, you'll have to update 'post_build_step' a little, and maybe also the project file svninside_linux.cb
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on January 20, 2008, 03:23:58 am
Patch needed under Windows XP when not using Pre-Compiled Headers (PCH)

Tim S

Just applied !!
Thank you very much for that new pch patch, i have to be more careful with that in next commits.

Best regards

Orl
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: branleb on February 29, 2008, 12:51:23 pm
I tried to compile the Plugin SVN Rev. 69, but first I had problems with some missing librearies:
wxScintilla and wxPropGrid.
After I installed them (wxCode[wxScintilla] CVS Rev.  723 & wxPropGrid SVN Rev. 615)
I got other compile errors.

I am using CB SVN Rev. 4898

Here is the build log. Can someone help me?
Code: [Select]
-------------- Build: release in SVNInside - Linux ---------------

Compiling: src/commands/svniAdd.cpp
Compiling: src/commands/svniCommand.cpp
Compiling: src/commands/svniCommit.cpp
Compiling: src/commands/svniDiff.cpp
Compiling: src/commands/svniInfo.cpp
Compiling: src/commands/svniLock.cpp
Compiling: src/commands/svniStatus.cpp
Compiling: src/commands/svniUpdate.cpp
WARNING: Can't read file's timestamp: /home/shade/code/sources/svninside-svn/trunk/src/dialogs/svniConfigDlg.cpp
Compiling: src/dialogs/svniFileSelectDlg.cpp
Compiling: src/dialogs/svniLogger.cpp
Compiling: src/dialogs/svniTabPnl.cpp
/home/shade/code/sources/svninside-svn/trunk/src/dialogs/svniTabPnl.cpp: In constructor »svniTabPnl::svniTabPnl(wxWindow*)«:
/home/shade/code/sources/svninside-svn/trunk/src/dialogs/svniTabPnl.cpp:56: Warnung: »AppendCategory« ist veraltet (deklariert bei /usr/local/include/wx/propgrid/propgrid.h:3864)
/home/shade/code/sources/svninside-svn/trunk/src/dialogs/svniTabPnl.cpp:57: Fehler: keine passende Funktion für Aufruf von »wxPropertyGrid::Append(wxStringProperty)«
/usr/local/include/wx/propgrid/propgrid.h:3861: Anmerkung: Kandidaten sind: wxPGProperty* wxPropertyContainerMethods::Append(wxPGProperty*)
/home/shade/code/sources/svninside-svn/trunk/src/dialogs/svniTabPnl.cpp:58: Fehler: keine passende Funktion für Aufruf von »wxPropertyGrid::Append(wxStringProperty)«
/usr/local/include/wx/propgrid/propgrid.h:3861: Anmerkung: Kandidaten sind: wxPGProperty* wxPropertyContainerMethods::Append(wxPGProperty*)
/home/shade/code/sources/svninside-svn/trunk/src/dialogs/svniTabPnl.cpp:59: Fehler: keine passende Funktion für Aufruf von »wxPropertyGrid::Append(wxStringProperty)«
/usr/local/include/wx/propgrid/propgrid.h:3861: Anmerkung: Kandidaten sind: wxPGProperty* wxPropertyContainerMethods::Append(wxPGProperty*)
/home/shade/code/sources/svninside-svn/trunk/src/dialogs/svniTabPnl.cpp:60: Fehler: keine passende Funktion für Aufruf von »wxPropertyGrid::Append(wxStringProperty)«
/usr/local/include/wx/propgrid/propgrid.h:3861: Anmerkung: Kandidaten sind: wxPGProperty* wxPropertyContainerMethods::Append(wxPGProperty*)
/home/shade/code/sources/svninside-svn/trunk/src/dialogs/svniTabPnl.cpp:61: Fehler: Aufruf des überladenen »wxIntProperty(const wxChar*)« ist mehrdeutig
/usr/local/include/wx/propgrid/props.h:360: Anmerkung: Kandidaten sind: wxIntProperty::wxIntProperty(const wxString&, const wxString&, const wxLongLong&)
/usr/local/include/wx/propgrid/props.h:357: Anmerkung:                  wxIntProperty::wxIntProperty(const wxString&, const wxString&, long int)
/home/shade/code/sources/svninside-svn/trunk/src/dialogs/svniTabPnl.cpp:63: Warnung: »AppendCategory« ist veraltet (deklariert bei /usr/local/include/wx/propgrid/propgrid.h:3864)
/home/shade/code/sources/svninside-svn/trunk/src/dialogs/svniTabPnl.cpp:64: Fehler: keine passende Funktion für Aufruf von »wxPropertyGrid::Append(wxStringProperty)«
/usr/local/include/wx/propgrid/propgrid.h:3861: Anmerkung: Kandidaten sind: wxPGProperty* wxPropertyContainerMethods::Append(wxPGProperty*)
/home/shade/code/sources/svninside-svn/trunk/src/dialogs/svniTabPnl.cpp:65: Fehler: Aufruf des überladenen »wxIntProperty(const wxChar*)« ist mehrdeutig
/usr/local/include/wx/propgrid/props.h:360: Anmerkung: Kandidaten sind: wxIntProperty::wxIntProperty(const wxString&, const wxString&, const wxLongLong&)
/usr/local/include/wx/propgrid/props.h:357: Anmerkung:                  wxIntProperty::wxIntProperty(const wxString&, const wxString&, long int)
/home/shade/code/sources/svninside-svn/trunk/src/dialogs/svniTabPnl.cpp:66: Fehler: keine passende Funktion für Aufruf von »wxPropertyGrid::Append(wxStringProperty)«
/usr/local/include/wx/propgrid/propgrid.h:3861: Anmerkung: Kandidaten sind: wxPGProperty* wxPropertyContainerMethods::Append(wxPGProperty*)
/home/shade/code/sources/svninside-svn/trunk/src/dialogs/svniTabPnl.cpp:68: Warnung: »AppendCategory« ist veraltet (deklariert bei /usr/local/include/wx/propgrid/propgrid.h:3864)
/home/shade/code/sources/svninside-svn/trunk/src/dialogs/svniTabPnl.cpp:69: Fehler: keine passende Funktion für Aufruf von »wxPropertyGrid::Append(wxStringProperty)«
/usr/local/include/wx/propgrid/propgrid.h:3861: Anmerkung: Kandidaten sind: wxPGProperty* wxPropertyContainerMethods::Append(wxPGProperty*)
/home/shade/code/sources/svninside-svn/trunk/src/dialogs/svniTabPnl.cpp:70: Fehler: keine passende Funktion für Aufruf von »wxPropertyGrid::Append(wxStringProperty)«
/usr/local/include/wx/propgrid/propgrid.h:3861: Anmerkung: Kandidaten sind: wxPGProperty* wxPropertyContainerMethods::Append(wxPGProperty*)
/home/shade/code/sources/svninside-svn/trunk/src/dialogs/svniTabPnl.cpp:72: Warnung: »AppendCategory« ist veraltet (deklariert bei /usr/local/include/wx/propgrid/propgrid.h:3864)
/home/shade/code/sources/svninside-svn/trunk/src/dialogs/svniTabPnl.cpp:73: Fehler: keine passende Funktion für Aufruf von »wxPropertyGrid::Append(wxStringProperty)«
/usr/local/include/wx/propgrid/propgrid.h:3861: Anmerkung: Kandidaten sind: wxPGProperty* wxPropertyContainerMethods::Append(wxPGProperty*)
/home/shade/code/sources/svninside-svn/trunk/src/dialogs/svniTabPnl.cpp:74: Fehler: keine passende Funktion für Aufruf von »wxPropertyGrid::Append(wxStringProperty)«
/usr/local/include/wx/propgrid/propgrid.h:3861: Anmerkung: Kandidaten sind: wxPGProperty* wxPropertyContainerMethods::Append(wxPGProperty*)
Process terminated with status 1 (0 minutes, 18 seconds)
30 errors, 0 warnings
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: MortenMacFly on February 29, 2008, 01:11:18 pm
After I installed them (wxCode[wxScintilla] CVS Rev.  723 & wxPropGrid SVN Rev. 615)
[...]
Here is the build log. Can someone help me?
Please don't use any (wx) components other than the C::B SDK. Within the C::B sources you will find the propgrid version we are using as well as the wxscintilla version we are using. Your's are most likely not compatible.

If you want to develop for C::B / compile for C::B you should always use the C::B sources/SDK and wxWidgets (that's the only exception).

With regards, Morten.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: Fasser on March 06, 2008, 01:33:20 pm
Hi, I think this plugin is very interesting. Have you considered releasing a try-at-your-own-risk version, compiled against the new 8.02 C::B release? I'm sure many people will have a look at it then.

Also, as you took the command line approach to SVN, I think it shouldn't be too difficult to add suport to CVS as well (maybe others too!), so this plugin could evolve to be a general interface to version systems for C::B, at least covering the very basic functions. What do you think?

Thanks for your work!
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: branleb on March 13, 2008, 10:02:33 pm
thanks MortenMacFly.
I got the SVNInside Plugin compiled.
But now, I habe another Problem:
Codeblocks doesn't load the plugin with teh error message "missing symbols?"
So i looked with ld at the compiled .so
Code: [Select]
{-shade@bumbleblee-} => [~/code/sources/svninside-svn/trunk]
(21:53:50) ld libsvninside.so
ld: warning: cannot find entry symbol _start; not setting start address
libsvninside.so: undefined reference to `svniPrjConfigDlg::svniPrjConfigDlg(wxWindow*, svniProjectConfig*, bool, bool)'
libsvninside.so: undefined reference to `svniSettingsDlg::svniSettingsDlg(wxWindow*, svniPlugin*, svniConfig*)'
libsvninside.so: undefined reference to `vtable for svniPrjConfigDlg'
libsvninside.so: undefined reference to `svniSettingsDlg::SvnPathCorrect(wxString const&)'

Can anyone help me?
(ah, before i forget that: i had to "touch" src/dialogs/svniConfigDlg.cpp because g++ claimed about not beeing able to read its timestamp an so the linking process was canceled.)

Branleb
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on March 14, 2008, 01:05:53 am
Can anyone help me?
(ah, before i forget that: i had to "touch" src/dialogs/svniConfigDlg.cpp because g++ claimed about not beeing able to read its timestamp an so the linking process was canceled.)

Branleb

Your problem can be solved and has been solved, have you read the page 7 of this thread, here is the link ...!
http://forums.codeblocks.org/index.php/topic,7063.90.html (http://forums.codeblocks.org/index.php/topic,7063.90.html)

And for all the persons who are interested inmy plugin, sorry for this long time of silence without updates. I am very busy at work for he moment but this plugin is not at all over, i have a quite good version to commit. But i am waiting a bit in order to test more and provide you a working-version, not one for beta-testers only ;-)
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: branleb on March 14, 2008, 04:38:45 pm
sorry, but i see no solution on page 7 of this thread.
or at least, noen worked for me.

But may you explain the part with "copy the source to C::B src dir/plugins/svninside" and "linux users have to modify post_build_step" ?

I am using linux, butthis didn't worked for me( the post build script worked only if I c&p'ed each line to the cmdline end executed it

Can you explain, what you meant?

regards,
Branleb
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: JGM on April 23, 2008, 06:12:27 pm
Hey! any news about the plugin, does it's ready to be added to the codeblocks contrib repo?
Title: Getting output from a console
Post by: Alexis on April 23, 2008, 06:38:14 pm
Quote
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.

Maybe the code snippet linked below can help :
http://www.wxdev.fr/snipp24-wxExecute-Recuperer_resultat_ligne_commande.html (http://www.wxdev.fr/snipp24-wxExecute-Recuperer_resultat_ligne_commande.html)

It's in french, but as you are from France, it shouldn't be that difficult to understand  :)
Title: Re: Getting output from a console
Post by: orel on April 23, 2008, 09:49:19 pm
Quote
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.

Maybe the code snippet linked below can help :
http://www.wxdev.fr/snipp24-wxExecute-Recuperer_resultat_ligne_commande.html (http://www.wxdev.fr/snipp24-wxExecute-Recuperer_resultat_ligne_commande.html)

It's in french, but as you are from France, it shouldn't be that difficult to understand  :)
Thank you man (merci beaucoup!!) but this has been already solved some time ago.

Hey! any news about the plugin, does it's ready to be added to the codeblocks contrib repo?
I am not sure it is possible for the moment, i didn't update the repository those times because i can't work on the plugin as often as i would like to.

But i think what i am doing will save time later for those who want to develop other source control plugins.
I have designed a Code::Blocks souce control plugin interface and i am currently redesigning SVNInside, implementing this interface .
So with that work done, it should be easier for someone to develop a CVS (or whatever source control system) plugin for Code::Blocks. The advantage of this solution is to have homogenous source control on CB, whatever system you use.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: JGM on April 24, 2008, 04:14:27 am
Thats great, you're making a great job  :D
Keep up the good work!
Title: Re: Getting output from a console
Post by: Alexis on April 24, 2008, 10:17:32 am
Thank you man (merci beaucoup!!) but this has been already solved some time ago.

Just after posting, I saw that this issue was on top of a very long thread and so might have been already solved... Sorry :oops:
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: denk_mal on May 09, 2008, 10:48:53 am
Hello,

I've been using this plugin and it works quite well for me (good work) but a friend has checked out the svn repository for my project and got my svn username on the next start of c::b.
I found out that my svn username has been saved in the c::b project file that is also checked into the svn repository.

IMHO it should not be saved into the project file but anyway;
Is there a way to type in the username and password on c::b start or when an svn action is triggered so that there is no need for the username to be saved into the project file?

thanks
denk_mal
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on May 09, 2008, 10:59:21 pm
Hello,

I've been using this plugin and it works quite well for me (good work) but a friend has checked out the svn repository for my project and got my svn username on the next start of c::b.
I found out that my svn username has been saved in the c::b project file that is also checked into the svn repository.

IMHO it should not be saved into the project file but anyway;
Is there a way to type in the username and password on c::b start or when an svn action is triggered so that there is no need for the username to be saved into the project file?

thanks
denk_mal

Thank you very much man, gld to hear from users some time...
You are totally right with this issue, SVNInside should ask for the login and the password as soon as a command needs authentification in current Code:Blocks session, then it would be saved until the next CB session or until the user changes by himself the login and/or password. The only thing saved inside the Code::Blocks project file would be the fact that the repository need (or not) some authentification.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: dmoore on May 10, 2008, 05:58:50 pm
Why do you keep any svn info in the project files? There isn't a 1:1 correspondence between projects and repositories. why not just save the svn info you need in a separate config file (or, my preference, in the global user config)?
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on May 13, 2008, 09:01:06 pm
Why do you keep any svn info in the project files? There isn't a 1:1 correspondence between projects and repositories. why not just save the svn info you need in a separate config file (or, my preference, in the global user config)?

You are probably right, i think i will save the info about repositories in global user config file.
Thank you for that good proposition dMoore ;-)

orel
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: branleb on May 26, 2008, 10:42:31 am
Your problem can be solved and has been solved, have you read the page 7 of this thread, here is the link ...!
http://forums.codeblocks.org/index.php/topic,7063.90.html (http://forums.codeblocks.org/index.php/topic,7063.90.html)
You meant http://wiki.codeblocks.org/index.php?title=Linking_the_plugin_to_a_Nightly_Build ?
There is a solution for nightly build, and may it works with them, but this doesnt works for me.
I have codeblocks SVN rev5081 and wxGTK 2.8.7.1-r1 on a gentoo machine...
And i always get the missing symbols error - is there a solution for me ?

greets Branleb


Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: orel on May 26, 2008, 08:23:06 pm
Your problem can be solved and has been solved, have you read the page 7 of this thread, here is the link ...!
http://forums.codeblocks.org/index.php/topic,7063.90.html (http://forums.codeblocks.org/index.php/topic,7063.90.html)
You meant http://wiki.codeblocks.org/index.php?title=Linking_the_plugin_to_a_Nightly_Build ?
There is a solution for nightly build, and may it works with them, but this doesnt works for me.
I have codeblocks SVN rev5081 and wxGTK 2.8.7.1-r1 on a gentoo machine...
And i always get the missing symbols error - is there a solution for me ?

greets Branleb

Hi man, i am really sorry i can't help you with this, i don't have a gentoo machine to test that, and, even on my win32 machine i haven't tried it because i don't need to do it. I am compiling my plugins (and the other ones as well) myself and linking with my own compiled version of Code::Blocks too.

What you are trying to do is not specific to SVNInside but to every plugins you would like to link to a nightly build.
I hope for you that the writer of the wiki article you mentioned can help you, maybe try creating a special thread for this.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: gmclachl on July 12, 2008, 10:51:48 am
It seems to me that having good SCM from within code::blocks is one of the major features it is still missing, and something I really miss.

I have been reading this thread as I was interested in writing a plugin, it strikes me that rather than implement different SCM tools integration we (as a community) should perhaps think about abstracting many operations away from concrete cases, and provide an SCM framework into which people can easily hook into. This way we can provide support for different tools. In my case I want to use git, other have mentioned bzr and mecurial.


George 
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: undergraver on July 12, 2008, 04:44:47 pm
I agree that a SCM plugin needs to be integrated into CodeBlocks.
One solution would be to have something completely XML based - actions[commands] because I imagine that integrating with git, svn, cvs and others will be done via command line. We can create based on that XML a menu that can be added to the current menu.

Probably it can be done also from the API (if the SCM has one) but involves more code to be written and also if the SCM API changes we need to change our code too.

This is just my thought, I don't know if it fits all the cases (though it should fit many of them).

Sorry if this was already discussed (didn't found anything related to that).

Iulian
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: darthdespotism on July 15, 2008, 07:13:52 pm
I was thinking about write something for hg so if you need help for your all SCM plugin ...
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: killerbot on July 15, 2008, 08:23:31 pm
this will be done time, but first some other refactorings need to be carried out, or have higher priority.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: acinfo64 on September 08, 2008, 12:35:15 pm
Dear All,

Can someone explain in more detail how to compile and integrate the SVNInside.

When I compile the code I get the error that the library -lpropgrid is missing. In a post I saw that wxPropGrid etc is missing and that I should use the source SDK. But how can I do that?

Normally I use the C::B installer with mingw (v8.02). But I also tried to download C::B from SVN and then compile it. This is not a problem, but when I copy the files from the devel directory to my C::B my C::B works fine but I can't still compile and wxSmith is gone. So the wxPropGrid is then still not integrated.

Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: Ekinoks on November 11, 2008, 12:25:53 pm
Hi !

I have a problem :?

I can't compile SVNInside's project but C::B not find this files :
- cbproject.h
- globals.h
- cbplugin.h
- tinyxml.h

Where I can find this files ?

Thanks for help.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: cgarcia109 on November 11, 2008, 02:16:38 pm
acinfo64 youre missing libwxpropgrid library thats a wxWidget plugin/addon
you need Codeblocks sources from svn and get them compiled.

Ekinoks youre missing codeblocks SDK, get codeblocks source from svn and compile it that will give you required headers and libraries needed to compile codeblocks plugins.

You will need wxWidgets libraries and headers in order to get codeblocks compiled from sources, you can get wxwidgets dev packages if youre using linux, or you can get wxWidgets sources, compile them. see http://www.wxwidgets.org for more info
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: AIL on May 13, 2009, 05:32:33 pm
Hi.

I try to install SVNInside into Code::Blocks as plugin, but something wrong happens:

---------------
One or more plugins were not loaded.
This usually happens when a plugin is built for
a different version of the Code::Blocks SDK.
Check the application log for more info.

List of failed plugins:

svninside.dll
---------------

Plugin was built using

MinGW-5.1.4  http://dfn.dl.sourceforge.net/sourceforge/mingw/MinGW-5.1.4.exe
wxMSW-2.8.7  http://biolpc22.york.ac.uk/pub/2.8.7/wxMSW-2.8.7.zip  (official mirror)
codeblocks-8.02-src  http://switch.dl.sourceforge.net/sourceforge/codeblocks/codeblocks-8.02-src.tar.bz2
SVNInside  http://tools.assembla.com/svn/SVNInside/trunk

Used version of Code::Blocks to install plugin is 8.02 (wxWidgets 2.8.7) - binary package from official site.
http://switch.dl.sourceforge.net/sourceforge/codeblocks/codeblocks-8.02mingw-setup.exe


What happens? why it does not work? And where I can "Check the application log for more info."?


And, to autor - Please, write normal build manual, human-readable, not everybody borns with knowledge, where to get components to build, which version to use, how exactly build it and so on.

Thanks.

[attachment deleted by admin]
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: ollydbg on May 13, 2009, 06:25:44 pm
To my knowledge, this is the steps you should build a plugin.

http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows




You should build both the IDE and plugins and they can work together. 

Do Not add plugin to the used codeblocks from official site, the codeblocks itself should be build either. :D
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: AIL on May 13, 2009, 06:57:47 pm
First, thanks for link.

Do Not add plugin to the used codeblocks from official site, the codeblocks itself should be build either. :D

Yeah? And for what button "Install new" placed to "Manage plugins" dialog?
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: dmoore on May 13, 2009, 07:02:53 pm
you can link against the 8.02 binaries BUT

when you link -- don't link against your own copies of the dlls, link against the CB 8.02 binary packages dlls (including any packaged wx widgets libs). see this: http://wiki.codeblocks.org/index.php?title=Linking_the_plugin_to_a_Nightly_Build
(the instructions assume you are building against a nightly build but it is the same for building against the actual release)
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: AIL on May 13, 2009, 07:34:59 pm
It works now!!! Yeah!!! Thanks a lot!
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: ollydbg on May 14, 2009, 03:48:49 am
you can link against the 8.02 binaries BUT

when you link -- don't link against your own copies of the dlls, link against the CB 8.02 binary packages dlls (including any packaged wx widgets libs). see this: http://wiki.codeblocks.org/index.php?title=Linking_the_plugin_to_a_Nightly_Build
(the instructions assume you are building against a nightly build but it is the same for building against the actual release)

@dmoore

Actually, I have build follow these steps, I say I had tried to link to a codeblocks' distribution DLL(this can avoid building the IDE), but failed.  :(
The IDE still report the inconsistent version conflict. I'm still confused about these problems.

So, finally, I built both the IDE and plug-ins together myself.

 
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: AIL on May 14, 2009, 01:26:14 pm
Actually, I have build follow these steps, I say I had tried to link to a codeblocks' distribution DLL(this can avoid building the IDE), but failed.  :(
The IDE still report the inconsistent version conflict. I'm still confused about these problems.


Just place path to your binary distributuion on the top of the paths list (as described in "Step Four - Link Everything Together") and replace library wxmsw28u with wxmsw28u_gcc_cb in linker settings.
That`s all. Now you can use plugin with your binary package.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: dmoore on May 14, 2009, 05:54:50 pm
Actually, I have build follow these steps, I say I had tried to link to a codeblocks' distribution DLL(this can avoid building the IDE), but failed.  :(
The IDE still report the inconsistent version conflict. I'm still confused about these problems.

So, finally, I built both the IDE and plug-ins together myself.

If you have the link libs right, the problem might be the headers. you should use the actual 8.02 headers to be on the safe side.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: mattn2 on June 01, 2009, 06:51:28 pm
can someone please attach a dll here?
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: Killertester on June 02, 2009, 06:06:29 pm
Help!
I try compile plugin on linux:
src/dialogs/svniTreeItem.h|37|warning: 'typedef' was ignored in this declaration|
src/dialogs/svniTreeItem.h|37|warning: 'typedef' was ignored in this declaration|
src/dialogs/svniTreeCtrl.h|31|warning: 'typedef' was ignored in this declaration|
svniCommand.cpp||In member function 'size_t svniCommand::AddFilterMask(int, bool)':|
svniCommand.cpp|104|error: 'remove_if' was not declared in this scope|
||=== Build finished: 1 errors, 3 warnings ===|
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: stahta01 on June 02, 2009, 06:48:52 pm
Help!
I try compile plugin on linux:
src/dialogs/svniTreeItem.h|37|warning: 'typedef' was ignored in this declaration|
src/dialogs/svniTreeItem.h|37|warning: 'typedef' was ignored in this declaration|
src/dialogs/svniTreeCtrl.h|31|warning: 'typedef' was ignored in this declaration|
svniCommand.cpp||In member function 'size_t svniCommand::AddFilterMask(int, bool)':|
svniCommand.cpp|104|error: 'remove_if' was not declared in this scope|
||=== Build finished: 1 errors, 3 warnings ===|


Guess on my part try adding algorithm include to top of svniCommand.cpp

Code: [Select]
#include <algorithm>
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: Killertester on June 03, 2009, 05:17:43 am
OK i build plugin but not install:

One or more plugins were not installed succesfully:
/home/igor/svninside.cbplugin

Please somebody tell us ready for rapidshare.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: stahta01 on June 03, 2009, 06:41:15 am
OK i build plugin but not install:

One or more plugins were not installed succesfully:
/home/igor/svninside.cbplugin

Please somebody tell us ready for rapidshare.

You do realize the problem is that the plugin needed is different for each version of Code::Blocks used.
If you, don't post the version or SVN of your Code::Blocks then it is not possible to known what version or SVN is in most demand. Also, is it an self compile or Nightly Download?
What operating System?
What version and build type of wxWidgets?

These are just the options I know about.

Tim S

PS: I am a Windows user, I have no idea how many different builds would be added for different Linux setups.

Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: jens on June 03, 2009, 06:52:52 am
remove non-existent svniConfigDlg.* and add svniPrjConfigDlg.* and svniSettingsDlg.* (both from src/dialogs).

With this changes it is installable on my linux-box (debian 64-bit experimental/unstable).

(64-bit also needs -fPIC as compiler-option.)


It has several bugs (localization not found, svn executable not found, often crashes on exit), but that's another thing.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: Killertester on June 03, 2009, 04:36:34 pm
System: Slackware-current
wxWidgets: 2.8.10
Code:Block: 8.02
SVNInside: 85

Please somebody tell us ready for rapidshare. For linux.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: ignotion on June 17, 2009, 07:43:27 pm
Hello, i've just downloaded the last codeblocks (5650) and svninside svn version, and i've run into a few problems:
1st) for some reason the project contains 2 files in dialogs that are missing (svniConfigDlg.cpp and .h).
2nd) Once you remove those files the project doesn't link(in ubuntu jaunty 64), raising this error:
Code: [Select]
/usr/bin/ld: .objs/src/commands/svniAdd.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
.objs/src/commands/svniAdd.o: could not read symbols: Bad value

3rd) finally once you get these issues resolved, you get a link error because for some reason -lpropgrid is not avaliable. I havent found it in my subversion copy (it's not in sdk either). Where can i find this lib, or how can I solve this last issue?

Thanks in advance,

Toni
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: jens on June 17, 2009, 08:25:45 pm
Did you read my post just two posts above yours ?

Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: ignotion on June 21, 2009, 01:32:20 am
Did you read my post just two posts above yours ?
No I didn't, thank you jens.
Do you know anything about that -lpropgrid problem?
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: stahta01 on June 21, 2009, 03:03:57 am
Do you know anything about that -lpropgrid problem?

Look for propgrid inside the wxSmith Contrib plugin it is built by wxSmith.

I find libpropgrid.a under src\plugins\contrib\wxSmith\propgrid on windows.

Tim S
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: GeO on July 09, 2009, 06:11:45 pm
Patch for "wxAuiNotebook introduction in TRUNK"
Code: [Select]
Index: src/commands/svniCommand.cpp
===================================================================
--- src/commands/svniCommand.cpp (revision 85)
+++ src/commands/svniCommand.cpp (working copy)
@@ -16,6 +16,7 @@
 #include "svniLogger.h"
 
 #include <string>               // for "class std::string"
+#include <algorithm>
 
 using namespace std;
 
Index: src/dialogs/svniFileSelectDlg.cpp
===================================================================
--- src/dialogs/svniFileSelectDlg.cpp (revision 85)
+++ src/dialogs/svniFileSelectDlg.cpp (working copy)
@@ -20,6 +20,7 @@
 #endif
 
 #include <list>
+#include <algorithm>
 
 #include "svniFileSelectDlg.h"
 
Index: src/svniPlugin.cpp
===================================================================
--- src/svniPlugin.cpp (revision 85)
+++ src/svniPlugin.cpp (working copy)
@@ -9,7 +9,7 @@
  ******************************************************************************/
 
 #include <sdk.h>                // Code::Blocks SDK
-#include <wx/wxFlatNotebook/wxFlatNotebook.h>   // part of Code::Blocks SDK
+#include <wx/aui/auibook.h>   // part of Code::Blocks SDK
 
 #ifndef CB_PRECOMP
  #include <projectmanager.h>
@@ -164,18 +164,15 @@
             ShowLogger(false);
 
         // remove svni tree tab from CB management notebook
-        int tab = 0;
-
-        // walk through all tabs to find svninside one
-        for (; tab < Manager::Get()->GetProjectManager()->GetNotebook()->GetPageCount(); ++tab)
+        if (m_psvniTabPnl)
         {
-            if (_T("SVNInside") == Manager::Get()->GetProjectManager()->GetNotebook()->GetPageText(tab))
-            {
-                Manager::Get()->GetProjectManager()->GetNotebook()->DeletePage(tab, true);
-                m_psvniTabPnl = 0;
-                break;
-            }
+
+            int idx = Manager::Get()->GetProjectManager()->GetNotebook()->GetPageIndex(m_psvniTabPnl);
+            if (idx != -1)
+                Manager::Get()->GetProjectManager()->GetNotebook()->RemovePage(idx);
+            m_psvniTabPnl->Destroy();
         }
+        m_psvniTabPnl = 0L;
     }
 }
 ////////////////////////////////////////////////////////////////////////////////
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: ajaywazir on September 03, 2009, 04:51:45 am
Hi
Can some one please post a working DLL for windows for rev 8.02;
That would be a great help and save others time
Ajay

Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: gup on November 19, 2009, 12:48:04 pm
Hello *,

what is the status of SVNInside development, is it stalled? Is it possible --without pain-- to build and use this with a current code::blocks version (say 5925)?

(I tried to build that plug-in with code::block rev. 5925 plus  SVNInside rev. 85 ...)

Thank you for any hint on that matter,
  gup
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: MortenMacFly on November 19, 2009, 02:24:45 pm
what is the status of SVNInside development, is it stalled?
I think so, yes.

Is it possible --without pain-- to build and use this with a current code::blocks version (say 5925)?
Probably not. I did maintain this a bit in my own copy and have a generally working plugin at runtime with current SVN trunk, but it's also my #1 crash candidate. That's why I've disabled it by default.

It's better to use the FileManager plugin I'd say.
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: erotavlas on March 03, 2011, 08:57:36 am
Hi all,

I would like to try the SVNinside plug-in. Can you tell me, how can I install it and how it works?

Thank you
Title: Re: SVNInside : development of another SVN plugin for CodeBlocks
Post by: ZinnJonas on June 28, 2011, 05:49:10 pm
Hey,

i found the plugin, sometimes ago. But  it crashes all the time and was configuring the .cbp files. 
If u close the editor sometimes it doesn't clean all, so u has to shut the task your sell down etc...

So currently i'm rewriting the plugin, but i also have much to do for my studies, so if u like i can put a pre pre alpha
online.

The status is:

The Layout is compatible with the current versions of C::B it has a xml data base, with your login data, so it doesn't need to
mod your .cbp file.
and the start of the svn commands. Where the rest has to follow.

There are a lot of TODOS :D

but if someone has interest to help or some new idea, i'm happy to hear.

Maybe it can be compatible with cbvcs and cbdiff, that would be great:D

best regards
Jonas