Author Topic: Research for a Subversion plugin that works in windows and Linux.  (Read 20338 times)

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Research for a Subversion plugin that works in windows and Linux.
« Reply #15 on: May 03, 2007, 03:12:19 am »
What I really do care about is that the GUI frontend of the plugin is separated from the SVN interface, so that frontend can be accessed by other version control interfaces (be they command line wrappers or API calls).

Now that is a topic worth discussion ;).  It is a much more difficult one as well because while many verioning systems are similar they have quite a few differences.  It's quite a design project to figure out the underlying API that abstracts away the differences between different systems and allows one GUI frontend to be used for them all.  It seems me the easiest way to do it would be make separate components out of the pieces that can be shared, like the diff viewer, conflict resolver, and repository browser, merge history browser.

Offline Gagh

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Research for a Subversion plugin that works in windows and Linux.
« Reply #16 on: May 22, 2007, 10:31:33 pm »
You got a nice thread going here.

I'm really new here but just a few points after reading the rest of the thread. The points made about the way subclipse looks and feels is a valid one and I'd love to see something like it for C::B. A common interface to a number of commonly used SCM packages.

What you need is a map of all the functionality that is available in the current, often used SCM packages. Than you can provide a full API in the plugin and make a system that uses plugins or a factory with classes for all the different SCM packages. The specific SCM plugin or class could specify which functions it supports and then you can create the correct menus in C::B. What I'm getting at here is that you want to map all the add/remove/commit/lock/whatever options to a common interface within C::B.

Don't know how difficult it is to create a plugin framework, never have done it, but in my opinion it is the best option, as they can be written and maintained outside the main C::B SCM plugin. If you are going to use a class factory with a common interface to all the SCM packages, you need to write and maintain them.

Had a very quick look at the mentioned svncpp api included with the RapidSVN tool, but I don't like the looks of it. I think that you should keep the dependency list for the plugin as short as possible, i.e. only require the standard SCM client installation for that specific SCM system.

Svncpp calls into RapidSVN, so that needs to be installed for it to work. Just as the Tortoise plugin uses the commandline tool to call into Tortoise. I had to get the whole RapidSVN svn repository, because you are missing almost all the header files of you just get the svncpp part.

Well, big write-up, planned to make a short comment :P

Don't know what is planned atm for SCM support, just let me know what is happening, I might join in.
« Last Edit: May 22, 2007, 10:33:24 pm by Gagh »
OS: winXP sp3 | FreeBSD 7.0-stable | Ubuntu
Compiler: mingw 5.1.3 | gcc 4.2.1 | gcc 4.2.1
IDE: Code::Blocks SVN (on all) WX: 2.8.7 | 2.8.0 | 2.8.8

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5267
Re: Research for a Subversion plugin that works in windows and Linux.
« Reply #17 on: May 22, 2007, 10:35:29 pm »
after the release of 1.0 I might also work on a general api for SCM.
I have for example a ClearCase plug-in (build/tested and used on Windows), but probably can be used with little modification on linux too.

Offline Gagh

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Research for a Subversion plugin that works in windows and Linux.
« Reply #18 on: May 23, 2007, 12:14:36 am »
after the release of 1.0 I might also work on a general api for SCM.
I have for example a ClearCase plug-in (build/tested and used on Windows), but probably can be used with little modification on linux too.

Sounds nice, only question now is, when do we get 1.0?

Concerning my first post, is it hard to make a plugin framework within a plugin? As I stated in that post, to make a SCM plugin with a general API, adding the specific SCM as a seperate plugin to the C::B plugin would be the best approach. That way the C::B SCM plugin can be easily extended and you can load the specific SCM client module only when it is needed for the projects loaded in the workspace.

Only problem is that although I've been a paid programmer for 10+ years, I haven't seen the plugin problem before and don't even know how to approach it. But I guess that can be figured out and learned too. Guess that is is just a list with function pointers into the library that is loaded :D

Could you give a short description of your CC plugin? I mean what it does within C::B, like update the icons in the open file and project manager windows, extra context menu's etc.

I'll make a start for myself to get the hang of writing a C::B plugin. The CBTortoise plugin gave me a good idea how to do a couple of things.

I'll start with making the basic framework and api of the plugin, but will not create the pluggable SCM part, but just hook up a class to manage svn. All the SCM functions that should be available within C::B I'll try to figure out and and try to create them.

I'll build the svn client part against the svn client library, as that is imo the correct way. Another place to look at is the svn documentation.

Don't know if there is a better way to start work on it other then just start. We might be able to add something to the C::B wiki and use that space to give an overview of what we want to create.

I'll post a notice when I have something that I think is good enough to share with the C::B ppl.
OS: winXP sp3 | FreeBSD 7.0-stable | Ubuntu
Compiler: mingw 5.1.3 | gcc 4.2.1 | gcc 4.2.1
IDE: Code::Blocks SVN (on all) WX: 2.8.7 | 2.8.0 | 2.8.8

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7056
    • My Best Post
Re: Research for a Subversion plugin that works in windows and Linux.
« Reply #19 on: May 24, 2007, 03:26:37 am »
Svncpp calls into RapidSVN, so that needs to be installed for it to work. Just as the Tortoise plugin uses the commandline tool to call into Tortoise. I had to get the whole RapidSVN svn repository, because you are missing almost all the header files of you just get the svncpp part.

I am currently stuck, I had trouble just getting the Svncpp part of RapidSVN to compile because it depends on so many library. The APR (Apache Runtime) for example was giving me problems. I decided to put the project on hold while thinking about the fact of whether using svncpp is an good idea.

Tim S
 
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 MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9609
Re: Research for a Subversion plugin that works in windows and Linux.
« Reply #20 on: May 24, 2007, 07:10:55 am »
I am currently stuck, I had trouble just getting the Svncpp part of RapidSVN to compile because it depends on so many library. The APR (Apache Runtime) for example was giving me problems. I decided to put the project on hold while thinking about the fact of whether using svncpp is an good idea.
I "only" tried to compile RapidSVN once and had the same problem. I couldn't resolve all dependencies (thus get all the libs to compile and/or download them somewhere)... It's terrible.
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 Gagh

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Research for a Subversion plugin that works in windows and Linux.
« Reply #21 on: May 24, 2007, 09:46:26 pm »
Svncpp calls into RapidSVN, so that needs to be installed for it to work. Just as the Tortoise plugin uses the commandline tool to call into Tortoise. I had to get the whole RapidSVN svn repository, because you are missing almost all the header files of you just get the svncpp part.

I am currently stuck, I had trouble just getting the Svncpp part of RapidSVN to compile because it depends on so many library. The APR (Apache Runtime) for example was giving me problems. I decided to put the project on hold while thinking about the fact of whether using svncpp is an good idea.

Tim S
 

Well, for svn I'm going to try to build the example minimal_client given in a post I found.

Seems there is a way to get client libs and headers in what looks like a client development pack. Must say it is hard to find any info on the subversion site at tigris, but will try to locate some good info on how to use the prebuild libraries and headers.

But I guess that building the subversion client libraries is outside the scope of the basic SCM plugin for C::B.

I have a basic layout that I'm working on atm for adding the menu's and configuration within C::B. The code that creates the menu's query a class that specifies what options are available for the scm type and then displays only the options that are available. The function that is called from the menu then should call the specific client code with a filename and probably some extra configuration info.

My main aim atm is to learn the plugin environment of C::B and figure out if we might be able to modify icons in the project view and open file view to provide status information. What I also need to figure out is how we can create a window in the Messages panel and show progress info when the user activates one of the menu options.

I guess that mandrav might be able to provide some info on that, or at least point where we can find out how to do those modifications.

I have attached a screenhot of my current settings panel, just for fun. (Yes, I stole the icons :P)

Update:
I must be blind! In the downloads section of subversion the development archives with prebuild libraries can be easily found. It even includes documentation.

First version:
For those that want to have a laugh, got an initial version in svn that I use for local development. Doesn't do a lot more than crash your C::B :P

Going to add Tortoise to it for a quick fix and example how you can add support for a specific SCM system. It will be based on the nice CBTortoiseSVN from thomas.

After that it will be a hard look at native svn support through the svn client api. But you need apr/apr-util/apr-iconv and neon builds with mingw to be able to build the svnclient library. They even recommend TortoiseSVN to get the sources of apr if you want to build on MSW on the apache apr site :P

The binary downloads from the subversion site are static libs for MS VC, couldn't get a minimal_client they posted on the subversion site as example linking against them with mingw.

[attachment deleted by admin]
« Last Edit: May 27, 2007, 07:24:47 am by Gagh »
OS: winXP sp3 | FreeBSD 7.0-stable | Ubuntu
Compiler: mingw 5.1.3 | gcc 4.2.1 | gcc 4.2.1
IDE: Code::Blocks SVN (on all) WX: 2.8.7 | 2.8.0 | 2.8.8

Offline Gagh

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Research for a Subversion plugin that works in windows and Linux.
« Reply #22 on: July 14, 2007, 12:55:15 am »
Well, it has been quiet here in my absence....

Just back after a few weeks away in foreign parts for my boss, so nothing has been done on my plugin. Just dropping a note that I'm still working on it. First thing is figuring out what I have written, as I've not seen the code for about 2 months.
OS: winXP sp3 | FreeBSD 7.0-stable | Ubuntu
Compiler: mingw 5.1.3 | gcc 4.2.1 | gcc 4.2.1
IDE: Code::Blocks SVN (on all) WX: 2.8.7 | 2.8.0 | 2.8.8

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Research for a Subversion plugin that works in windows and Linux.
« Reply #23 on: July 14, 2007, 01:17:31 am »
Gagh: take a look at the fileexplorer in my cbilplugin project (follow the link in my Sig for win32 binaries or access to the SVN). this control might provide you with a good base for SCM UI (because all SCMs operate on the principle of maintaining a directory under version control).

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: Research for a Subversion plugin that works in windows and Linux.
« Reply #24 on: July 17, 2007, 03:34:34 am »
Great! I was thinking on making an svn plugin multiplataform too. Nice to read this.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Research for a Subversion plugin that works in windows and Linux.
« Reply #25 on: July 24, 2007, 04:52:35 am »
I played around with parsing the SVN stat command to provide decorators for files (but not dirs) in the file explorer of my newly renamed Shell Extensions plugin. I'm using the default CB version control icons, but if someone wants to contribute prettier graphics, you know the drill...



checkout from the cbilplugins svn (link to project page in my sig). i haven't tested on windows and it runs pretty slowly for now.


PS: has anyone tried bazaar? In my short testing period, it leaves SVN in the dust...

Offline mariocup

  • Developer
  • Lives here!
  • *****
  • Posts: 586
Re: Research for a Subversion plugin that works in windows and Linux.
« Reply #26 on: July 24, 2007, 10:44:07 am »
Hi dmoore,

cool. I will test the new features in the plugin. What about using TortoiseSVN icons?

What program do you use to make the icons and what is the original format (svg)? I will have a look at it and perhaps at the week end I will spend some time on making new icons.


Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Research for a Subversion plugin that works in windows and Linux.
« Reply #27 on: July 24, 2007, 01:15:15 pm »
mario: the icons are somebody elses handy work -- they were already in share/codeblocks/images. I won't use the tortoise icons unless the license allows it. if you do make icons, make the decorators a separate image from the file/folder icon and then just overlay them in the gimp or something.

I don't think you will have success on win32. it looks like svn stat reports the relative path on win32 (it reports the full path on linux). I'll fix sometime today.

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: Research for a Subversion plugin that works in windows and Linux.
« Reply #28 on: July 24, 2007, 01:35:52 pm »
PS: has anyone tried bazaar? In my short testing period, it leaves SVN in the dust...

I have tried pretty much everything in distributed SCMs and my advice is to try Mercurial (hg). It 's blazing fast, python powered and user friendly. Even Linus had a few good words for it (which is rare) and it's the only one he compared to git (his own, used for the kernel, also really fast SCM). I was working with darcs for quite a while, then tried out bzr, git, monotone and stuck with hg. Oh and any distributed system leaves the centralized ones in the dust.
Life would be so much easier if we could just look at the source code.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Research for a Subversion plugin that works in windows and Linux.
« Reply #29 on: July 24, 2007, 08:05:34 pm »
I have tried pretty much everything in distributed SCMs and my advice is to try Mercurial (hg).

my impression was bazaar is being more actively developed (it has Shuttleworth's $ behind it after all). I'm only using bzr for personal use, so my needs are modest. I'm loving the option to make offline commits and bind/unbind a networked repository...

for giggles, if you send me the output of some sample "hg status" commands I'll implement the file decorators for it as well. (I just implemented the decorators for bzr and fixed the svn win32 issues). EDIT: don't worry hg was easy to download and as easy to use as bzr :)
« Last Edit: July 24, 2007, 08:48:08 pm by dmoore »