Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic Rhapsody (steve huntington)
Decrease font size
Increase font size
Topic Title: Regular experssions for SubVersion
Topic Summary:
Created On: 9-Feb-2006 08:28
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 9-Feb-2006 08:28
User is offline View Users Profile Print this message


Jesper Gissel

Posts: 88
Joined: 20-Jul-2005

I'm trying to adapt the configuration management tool 'SubVersion" to Rhapsody, and I'm now stuck at some regular expressions.
I'm very new to these, so I'm hoping for some help.

I need the regular expressions for my [FONT=Courier New]ListArchiveItsWorkingFile[/FONT] property, which is to extract the file- or foldername, and my [FONT=Courier New]ListArchiveItsVersion [/FONT] property, which is to extract the revision number.

My output is as the following listing shows:

[CODE] 215 mafmathi 1379 feb 02 16:08 BootLoader/hmi/Startup.hpp
215 mafmathi 4244 feb 02 16:08 BootLoader/hmi/pwb.ini
206 JeGissel feb 01 11:15 Doc/
206 JeGissel 8770 feb 01 11:15 Doc/DoxyCfg.dox
128 JeGissel nov 29 12:01 Doc/ReporterPlus/
128 JeGissel 104960 nov 29 12:01 Doc/ReporterPlus/Frontpage.doc
128 JeGissel 104448 nov 29 12:01 Doc/ReporterPlus/UNISAB III RhpReporter.dot
128 JeGissel 10492 nov 29 12:01 Doc/ReporterPlus/UNISAB III.tpl
4 JeGissel mar 29 2005 Doc/Template Descriptions/
4 JeGissel 141 mar 29 2005 Doc/Template Descriptions/Actor.rtf
4 JeGissel 194 mar 29 2005 Doc/Template Descriptions/Basic.rtf
4 JeGissel 312 mar 29 2005 Doc/Template Descriptions/UseCase.rtf
128 JeGissel 1549812 nov 29 12:01 Doc/UNISAB III.tpl[/CODE]
- where the first number is the revision number.

Can anybody help me?

-------------------------
Jesper Gissel
Johnson Controls Denmark, Marine Controls
Report this to a Moderator Report this to a Moderator
 10-Feb-2006 10:56
User is offline View Users Profile Print this message


Simon Morrish

Posts: 127
Joined: 17-May-2005

Hi Jesper

[SIZE=3]First, the quick answer: [/SIZE]

The svn list command is problematic, because Rhapsody has a defect where it can't split records according to start/end line delimiters. Instead, use:
[CODE]svn info --recursive --revision <label>[/CODE]

Then set the following properties under ConfigurationManagement::Subversion :
[CODE]Property ListArchiveItsWorkingFile String "([0-9a-zA-Z:_/\\.\\\\]+)"
Property ListArchiveItsVersion String "Last Changed Rev: ([0-9]+)"
Property ListArchiveItsMode String "(Lock)"
Property ListArchiveItsLockedBy String "Lock Owner: ([a-zA-Z0-9_]+)"
Property MultiRecordDelimiter String "Path:"[/CODE]

A similar problem exists to extract the revision number from your repository files. For this, set the following properties:
[CODE]Property HeaderFile String "$OMROOT/cm/SVNHeader.txt"
Property CMHeaderItsVersion String "\\$Revision: +([0-9]+)"
Property CMHeaderItsLockedBy String "\\$Locker: +([A-Za-z0-9_\\.]+)"[/CODE]
...and add a file ../Share/cm/SVNHeader.txt as follows:
[CODE]$URL$
$Id$
$Revision$
$Locker$[/CODE]
Note: $Locker$ is not yet supported by Subversion. I've put it in because I'm hoping it will be in the future, and once you've got CM headers into your repository files, there's no easy way to replace them!


[SIZE=3]Next, a bit of context:[/SIZE]

We've just done a full Subversion adapter for Rhapsody. We're aiming to release this adapter onto the Customer Community.

I found it very challenging to devise CheckIn/CheckOut etc properties that worked well because of these main factors:

1. Subversion versions directories, whereas Rhapsody's CM model is only partially directory-aware.
2. Rhapsody recurses through the model hierarchy in an inconsistent manner, depending on whether operations are performed from the browser or the Configuration Items dialogue, and for the latter whether items are multiply-selected and/or "with descendents" is selected.
3. Subversion's implementation of Lock/Unlock is new, and still has some defects. (We used 1.2.0; 1.2.3 may be better.)

I would be very interested in your experiences!

Incidentally, another problem we found was validating that our Subversion integration works. It's tedious to do this by hand, but tests can't be automated because Rhapsody's COM API doesn't fully implement CM operations.

We're trying to encourage I-Logix to do the following:

[list=1]
[*]Support CM operations via the COM API.
[*]Provide a CM adapter regression test suite.
[/list]

If you agree this would be useful, feel free to add your voice and make a chorus!

best regards,
Simon

-------------------------
Simon Morrish
simon.morrish@eu.panasonic.com
http://panasonic.co.uk
Panasonic ideas for life
Report this to a Moderator Report this to a Moderator
 13-Feb-2006 12:44
User is offline View Users Profile Print this message


Thomas Kurz

Posts: 7
Joined: 11-Apr-2005

Yes Yes Yes !!!

We've been using SVN as our only CM system for years now, but done all Rhapsody related stuff just manually. SVN really should be considered a major and important CM software which is worth to be well supported!

Thomas
Report this to a Moderator Report this to a Moderator
 15-Jun-2006 13:40
User is offline View Users Profile Print this message


Aaron Sher

Posts: 5
Joined: 14-Apr-2006

I'm also interested in integrating Subversion with Rhapsody, and I'm hoping to avoid having to do the work myself. Has anybody completed an integration framework that they're willing to share with the community? Even if it's not ideal, we could evolve it together.

Thanks,
Aaron Sher, Vanteon Corp
Report this to a Moderator Report this to a Moderator
 16-Jun-2006 08:50
User is offline View Users Profile Print this message


Simon Morrish

Posts: 127
Joined: 17-May-2005

Hi Aaron

To follow up on my previous post above, I've had no luck persuading I-Logix>>Telelogic to expand the COM API or provide a CM Adapter test suite.

Despite this, we've decided that there is net benefit to Panasonic for us to release our Subversion Adapter to the customer community, and await authorisation. :rolleyes:

Meanwhile, here's some background on our solution:

[list]
[*]It's not all done via the properties file; most of the work went into a Windows Scripting File (Subversion.wsf) and a "Scripting API" for Subversion (subversion.vbs) which is used by the wsf.
[*]The properties file calls one job in the wsf for each CM operation.
[*]Each job in the wsf calls one or more operations in the vbs.
[*]The operations in the vbs map to "subversion commands"; ie. there is a vbs operation that does "svn status", one that does "svn update", etc.
[*]Each script operation is implemented as execution of the Subversion command line client (svn.exe), followed by parsing of the stdout and stderr.
[/list]

The basic reason I went this route is that Subversion expects directories to be revision controlled, but Rhapsody does not provide a comprehensive set of directory CM operation hooks. (For instance, check-in only operates on the unit files; it doesn't issue a checkin-a-directory operation where one is required.) We found subversion quite intolerant if directories are not managed as it expects. Hence, the scripts use some intelligence to decide when to check-in a directory as well as the unit file.

Be aware that testing an adapter is very time consuming. My colleague Matthew Thomas created a Use Case model and test definitions for a CM Adapter, but we had to run the tests manually - very tedious. (This is why we asked Telelogic to make the CM operations fully automatable via the COM API.)

I hope that helps to give some background... Feel free to follow-up...

best regards,
Simon

-------------------------
Simon Morrish
simon.morrish@eu.panasonic.com
http://panasonic.co.uk
Panasonic ideas for life
Report this to a Moderator Report this to a Moderator
 16-Jun-2006 08:53
User is offline View Users Profile Print this message


Simon Morrish

Posts: 127
Joined: 17-May-2005

Hi Aaron/Jesper/Everyone!

Some further information:

At the user group, Walter from [URL=http://www.willert.de/][COLOR=Navy]Willert Software Tools[/COLOR][/URL] mentioned the [URL=http://www.pushok.com/soft_svn.php][COLOR=Navy]SVN SCC Proxy [/COLOR] [/URL] available from [URL=http://www.pushok.com/][COLOR=Navy]PushOK[/COLOR][/URL]. It should allow Rhapsody's SCC interface to be used with Subversion. (ie. no custom development - just install and go.)

We tried it last year with limited success, but it's moved on since then. If you decide to try it, and you have any good (or bad) experience with it, could you post up your conclusions?

They also provide a free [URL=http://www.pushok.com/soft_svncom.php][COLOR=Navy]SVN COM[/COLOR][/URL] interface. If I was developing an adapter again now, I'd definitely have a close look at this - much better than issuing command lines and parsing output!

best regards,
Simon

-------------------------
Simon Morrish
simon.morrish@eu.panasonic.com
http://panasonic.co.uk
Panasonic ideas for life
Report this to a Moderator Report this to a Moderator
 3-Jul-2007 20:15
User is offline View Users Profile Print this message


Atash Mehta

Posts: 5
Joined: 3-Jul-2007

[QUOTE=simon.morrish@eu.panasonic.com]
Despite this, we've decided that there is net benefit to Panasonic for us to release our Subversion Adapter to the customer community, and await authorisation. :rolleyes:
[/QUOTE]

Did you ever get authorization, by any chance? We're interested in your solution as we're about to follow a similar path. SVN integration is very important to our project.
Report this to a Moderator Report this to a Moderator
 13-Jul-2007 20:36
User is offline View Users Profile Print this message


Justin DYER

Posts: 548
Joined: 30-Jun-2004

Hello Simon,
>This is why we asked Telelogic to make the CM operations fully automatable via the COM API

I believe most of the CM operations are supported through the COM API with the exception of "Fetch". Which operations are you reffering to?
Report this to a Moderator Report this to a Moderator
 13-Jul-2007 20:40
User is offline View Users Profile Print this message


Justin DYER

Posts: 548
Joined: 30-Jun-2004

Hello All,
I just started playing with SVN and Rhapsody through the PushOK plugin. I have heard that working with SVN thorugh SCC is weak. That you would be much better off with a batch mode adapter like the one Simon is creating. Can anyone explain the reasoning behind this? What is weak about the SCC approach?
Report this to a Moderator Report this to a Moderator
 20-Jul-2007 21:20
User is offline View Users Profile Print this message


Simon Morrish

Posts: 127
Joined: 17-May-2005

Hi All

First of all, a long overdue update: It has not proven possible to get authorisation to release the Subversion adapter into the customer community. Sorry Mehta, Aaron, Thomas and Jesper!

Justin: Some (not necessarily all) of the CM operations that are unavailable (or at least I cannot find) in the COM API are:
[list=1]
[*]Add to archive
[*]Lock
[*]Unlock
[*]Synchronise
[*]List items (which should return a collection of CM units)
[/list]
The reason these are important to us is because we want to create a CM adapter test suite, for which we obviously need to run ALL possible CM operations under script control.

As far as the SCC interface goes, my experience is a bit old; I know the Pushok product has been updated since. At the time, I experienced general unreliability during testing. I concluded the problems centred around Rhapsody's incomplete support for versioning directories vs Subversion's core feature of versioning directories, but I may have been wrong. Certainly the directory issue was a major problem when writing the batch mode interface, but in this case I at least had some control, by scripting workaround behaviour myself.

regards,
Simon

-------------------------
Simon Morrish
simon.morrish@eu.panasonic.com
http://panasonic.co.uk
Panasonic ideas for life
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic Rhapsody forum.
There are currently 1 users logged in.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.