Author Topic: SVNInside : development of another SVN plugin for CodeBlocks  (Read 141276 times)

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: SVNInside : development of another SVN plugin for CodeBlocks
« Reply #45 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.

Offline orel

  • Multiple posting newcomer
  • *
  • Posts: 96
Re: SVNInside : development of another SVN plugin for CodeBlocks
« Reply #46 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.
windows XP SP2
mingw gcc 3.4.5
svn Code::Blocks and M$ Visual Studio 2005 and .NET to eat!! SVNInside plugin :http://forums.codeblocks.org/index.php/topic,7063.0.html

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: SVNInside : development of another SVN plugin for CodeBlocks
« Reply #47 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)

C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline orel

  • Multiple posting newcomer
  • *
  • Posts: 96
Re: SVNInside : development of another SVN plugin for CodeBlocks
« Reply #48 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.
windows XP SP2
mingw gcc 3.4.5
svn Code::Blocks and M$ Visual Studio 2005 and .NET to eat!! SVNInside plugin :http://forums.codeblocks.org/index.php/topic,7063.0.html

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: SVNInside : development of another SVN plugin for CodeBlocks
« Reply #49 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline orel

  • Multiple posting newcomer
  • *
  • Posts: 96
Re: SVNInside : development of another SVN plugin for CodeBlocks
« Reply #50 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
« Last Edit: October 30, 2007, 12:34:08 am by orel »
windows XP SP2
mingw gcc 3.4.5
svn Code::Blocks and M$ Visual Studio 2005 and .NET to eat!! SVNInside plugin :http://forums.codeblocks.org/index.php/topic,7063.0.html

Offline orel

  • Multiple posting newcomer
  • *
  • Posts: 96
Re: SVNInside : development of another SVN plugin for CodeBlocks
« Reply #51 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
windows XP SP2
mingw gcc 3.4.5
svn Code::Blocks and M$ Visual Studio 2005 and .NET to eat!! SVNInside plugin :http://forums.codeblocks.org/index.php/topic,7063.0.html

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: SVNInside : development of another SVN plugin for CodeBlocks
« Reply #52 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:
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline orel

  • Multiple posting newcomer
  • *
  • Posts: 96
Re: SVNInside : development of another SVN plugin for CodeBlocks
« Reply #53 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!!!
windows XP SP2
mingw gcc 3.4.5
svn Code::Blocks and M$ Visual Studio 2005 and .NET to eat!! SVNInside plugin :http://forums.codeblocks.org/index.php/topic,7063.0.html

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: SVNInside : development of another SVN plugin for CodeBlocks
« Reply #54 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: SVNInside : development of another SVN plugin for CodeBlocks
« Reply #55 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]
Be patient!
This bug will be fixed soon...

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: SVNInside : development of another SVN plugin for CodeBlocks
« Reply #56 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:
  • If you must save the password, at least save it in encrypted form and, in all cases, ask the user for his consent FIRST.
  • 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.


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.
Be patient!
This bug will be fixed soon...

Offline orel

  • Multiple posting newcomer
  • *
  • Posts: 96
Re: SVNInside : development of another SVN plugin for CodeBlocks
« Reply #57 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 ?
windows XP SP2
mingw gcc 3.4.5
svn Code::Blocks and M$ Visual Studio 2005 and .NET to eat!! SVNInside plugin :http://forums.codeblocks.org/index.php/topic,7063.0.html

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: SVNInside : development of another SVN plugin for CodeBlocks
« Reply #58 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.
Be patient!
This bug will be fixed soon...

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: SVNInside : development of another SVN plugin for CodeBlocks
« Reply #59 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ