SVN for GEDI

Discussion about recent product features & solutions!
10 posts • Page 1 of 1
tmalone
Posts:192
Joined: Mon Nov 22, 2010 11:21 pm

SVN for GEDI

Post by tmalone »

I am working with some older models for SVN from the Netherlands. None worked initially with 3.11 so I had to change them to make them work in the latest version of WinCC OA.

There are 2 approaches to using SVN inside GEDI. One approach is to launch the GUI interface that is part of SVN inside of GEDI when you right-click on some file like a script or panel. The other approach is like the old CVS, to run the SVN command line calls in the background and just update the status when done.

I have started to look at this solution as a hybrid of both the GUI and the background command line options. The user must be able to see the status of the file in the GEDI tree, but for things like committing a change to the repository, it seems useful to popup the GUI and let the user put in comments and use all of the features that SVN can do. For other things, like downloading the most up-to-date (update function) file from the repository to your project would be best to just click-and-go without the GUI to select?

I see 3 ways to present this hybrid concept. One is the provide the user with both options in the right-click menu (the menu already has 14 SVN items)? The other is to make an educated guess which the user wants by default? The third is to let the user set a keyword in the config file that switches the interface from all command line to all GUI?

I post this to the forum for discussion. I am interested in people who have used the CVS feature of WinCC OA and want to use SVN. I am also interested in hearing from people who use SVN because GEDI does not support it, and what parts you really use for WinCC OA?

Todd Malone
HMI CoC USA Image
Attachments
SVNicons.JPG

kdroog4pvss
Posts:15
Joined: Wed Sep 22, 2010 10:17 am

Re: SVN for GEDI

Post by kdroog4pvss »

Hello Tod,
What do you mean with 'some older models'?

We use SVN for almost all development of WinCC OA, starting around 2005 with PVSSII 3.1 Everything is stored in SVN repo except the RTDB.

We find TortoiseSVN practical enough, although integration into the IDE of WinCC OA is a nice option.

Kind regards,
Kees Droogendijk

tmalone
Posts:192
Joined: Mon Nov 22, 2010 11:21 pm

Re: SVN for GEDI

Post by tmalone »

"Older models" was ment to say that they did not work "out of the box" with the new 3.11 version. I found 2 different solutions from the Netherlands, one was only command line, much like the original CVS. The other was only graphical SVN extensions.

The "new model" uses the graphical SVN extensions for most of the interactions, but uses the command features for status updates in the projectView tree and when a file is saved or deleted. I find that seeing the status of the file is a key feature for customers who want to use a version control system.

Todd Malone
Siemens USA
HMI CoC

kdroog4pvss
Posts:15
Joined: Wed Sep 22, 2010 10:17 am

Re: SVN for GEDI

Post by kdroog4pvss »

I agree with you that the status of a file is a key feature.

To give you an idea how things could be done take a look at http://ankhsvn.open.collab.net/ankhsvn/screenshots
Would a AnkhSvn plugin be a solution?

Another approach is using http://doc.qt.digia.com/qtcreator/creat ... ntrol.html but this seems more complicated.

However in any solution, in order to properly deal with a project which contains several proj_path keywords, it is necessary to enable/force the IDE to save a file in its original location. Now it has to be moved back manually before you can do a commit.

Kind regards,
Kees Droogendijk

tmalone
Posts:192
Joined: Mon Nov 22, 2010 11:21 pm

Re: SVN for GEDI

Post by tmalone »

sorry, can't open that ankhsvn.* URL.

I have the file status working. The only part is when a file is saved, I am not getting the update.

kdroog4pvss
Posts:15
Joined: Wed Sep 22, 2010 10:17 am

Re: SVN for GEDI

Post by kdroog4pvss »

Todd Malone wrote:
sorry, can't open that ankhsvn.* URL..
I have modified the URL, no dot at the end now.
I have the file status working. The only part is when a file is saved, I am not getting the update.
So you need a callback when file is saved from gedi?

mwerksma
Posts:19
Joined: Fri Jul 01, 2011 1:21 pm

Re: SVN for GEDI

Post by mwerksma »

Hello,

I just saw the screenshot of the right click GEDI menu in the first article @ the beginning of this post.

It is a almost 100% lookalike of the menu I have created in PVSS, did you create this all by yourself?
I use Tortoise SVN, which is free, so the user can give feedback before committing.
Tortoise SVN website

I cannot see the status of the items.

Marcel

tmalone
Posts:192
Joined: Mon Nov 22, 2010 11:21 pm

Re: SVN for GEDI

Post by tmalone »

Yes, I was successful in putting the version info as well. I am having trouble with the save event not being about to update the status. Image
Attachments
SVNstatus.JPG

mwerksma
Posts:19
Joined: Fri Jul 01, 2011 1:21 pm

Re: SVN for GEDI

Post by mwerksma »

Looks cool, is it a lot of work/code to get the extra information?

Marcel

aleksandar.postolov
Posts:19
Joined: Thu Sep 05, 2013 3:51 pm

Re: SVN for GEDI

Post by aleksandar.postolov »

I've tested today the SVN for GEDI. It's a cool feature!

Because my panel path contains spaces I needed to add quotes (see below).
To see the new Status, a reload was also needed.

Code: Select all

void SVN_command(string cmd, string fileName, string tmpFile, bool forceDirname = false)
{
//path contains space -->  "\\""
   string SVNcommand = "TortoiseProc.exe /command:" + cmd + " /path:\\"" + fileName + "\\"";
   //Optioneel commando loggen
    system(SVNcommand);

  SVN_status(fileName);                                                      // something changed, update visual status  
  

//reload to display the new status in the project tree
reload();  
}

It would be also cool if the following features would be supported:
- display status with an Icon in the Project tree, like in tortoise
- update the panel status in the project tree when a panel is saved (modified), commit etc.

Kind regards
Aleks

10 posts • Page 1 of 1