Author Topic: Difficulties with Subversion integration  (Read 6148 times)

Elliott Bignell

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Difficulties with Subversion integration
« on: September 11, 2008, 08:24:27 pm »
Greetings. We have bought 5 floating licenses for EA and MDG Integration and are attempting to reverse-engineer a large project which is source-controlled using Subversion. The XML file created is already immense - 70MB - and tends to lock Trac for half an hour when anyone clicks on an entry, so we have created a separate repository. Despite EA having specially created an XML version of the model for source control we find that it can only be locked exclusively and edited by one user at a time, effectively invalidating the "floating" aspect of the license. It is very important to us that more than one user be able to work on the model at once. Subversion supports merging of edits on code source, so presumably it would not have a problem with XML. It appears to be EA which is enforcing this restriction. Could someone please advise as to how we can configure our model for multi-user editing?

Best regards...

Elliott Bignell
Micro Innovation
St. Gallen, CH

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: Difficulties with Subversion integration
« Reply #1 on: September 11, 2008, 11:28:49 pm »
Subversion would merge the xml files as text files and possibly produce invalid xml or at least things EA couldn't import. So to support merging Sparx would have to implement some interactive merging thing (interactive in case of conflicts), which can be difficult. On the other hand they have something like this for baselines, so they might as well use it for version control.

Don't know when or if they will.

For the time being it's either shared models or nested packages: you can put your model on a server and allow concurrent editing, or you can split it into packages which only one person needs to edit. There's something in the whitepapers, and a lot in this forum about these two deployment scenarios.

Elliott Bignell

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Difficulties with Subversion integration
« Reply #2 on: September 11, 2008, 11:39:37 pm »
I have been looking into precisely that second alternative, on the presumption that EA probably doesn't support merging at all. Merci vielmal.

Elliott Bignell

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Difficulties with Subversion integration
« Reply #3 on: September 12, 2008, 05:14:29 pm »
This whole source-control implementation, it has to be said, is extremely confusing. I've just been trying to explain to a colleague that he needs to open his local copy of the EAP file and apparently won't get the updates from Subversion without doing a Checkout, and frankly I don't understand it myself. "Get All Latest" does not fetch the changes he checked in yesterday. Going to Tortoise to get the XML does not have any effect on the model when I open it. The only way to get changes seems to be to do a Check Out, which takes several minutes. If EA doesn't support text-based merging and multiple concurrent edits to the XML then just what is the point in generating it at all? Why not just put the EAP file in Subversion and manage it using Tortoise?

Not happy.

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: Difficulties with Subversion integration
« Reply #4 on: September 12, 2008, 05:40:30 pm »
Quote
"Get All Latest" does not fetch the changes he checked in yesterday.

It should, and in my experience it usually does. Which does not mean it's any faster than checkout.

As far as I know, "Get All Latest" checks for each controlled subpackage whether the local working copy is up to date, and if not, updates the xmi from the repository and imports it into the model. Checkout does the same, plus obtaining a lock for the xmi file.

But something seems to be fishy there. I had cases when I had forgotten to check in in the evening, and next morning EA did not recognize my packages as checked out to me (although they definitely were). Haven't filed an official bug report for this though since I still don't know how to reproduce it.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Difficulties with Subversion integration
« Reply #5 on: September 12, 2008, 10:20:27 pm »
Frank,

Was anyone else using a package tree that overlapped yours?
No, you can't have it!

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: Difficulties with Subversion integration
« Reply #6 on: September 13, 2008, 12:09:33 am »
Quote
Was anyone else using a package tree that overlapped yours?

I don't think so, but I can't be sure. But it definitely happened when nobody had done anything with version control in between, as I can tell from the SVN log.

I'll leave a dummy package checked out from now on every night hoping it will happen again.

HowardB

  • EA Administrator
  • EA User
  • *****
  • Posts: 55
  • Karma: +0/-0
  • I love YaBBies!
    • View Profile
Re: Difficulties with Subversion integration
« Reply #7 on: September 15, 2008, 10:27:55 am »
Hello Elliot,

EA stores its model data in a database.  The EAP file is a MS Jet database file.  For this reason, you should not be placing the EAP file under version control.  That would restrict you to having only a sinlge user able to edit the model at any one time.

EA's version control mechanism is to export packages from the database as XMI formatted files and place those files under version control.  The XMI format is an industry standard format used for import and export of UML model data.  However, XMI does not lend itself to merging in the same way that you can with program source code.  Please do a Google search on "merge XMI" for the current state of play in this area.

The EA User Guide explains these issues, as well as providing guidance on how to reduce the impact of these restrictions  --  namely, keep your packages as small as is practical and apply version control at each and every level of the package hierarchy.  EA provides version control commands to help you achieve this with ease.  (Namely, "Add Branch To Version Control".)  

The best approach for you at this stage, might be to disconnect the package(s) that you have currently placed under version control (it sounds as though you have only placed the model root node under VC) and try again, using the "Add Branch..." command at the model root node.

I also recommend that you review the Version Control section of the EA User Guide.

David and Frank - I know you two have been using EA for quite some time.  The Version Control section of the User Guide has been updated over the last few months, so it might be time for another quick browse through...

Of course if you have any further queries, please don't hesitate to send in a Support Request, or make another post.

Best regards,
Howard Britten.

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Difficulties with Subversion integration
« Reply #8 on: September 15, 2008, 11:11:34 am »
When referring to the Help, check the product installer or PDF (in the Resources section) versions for the latest release to ensure that you get the most up to date information. For the moment the web Help lags behind the product at minor releases, because it is a huge task to load up all the separate page files.

Google presents us with a few problems in trying to help people find EA Help information on the web when searching 'out of the blue'. We hope that some investigations we are undertaking will make it easier to find anything you need in the web help, and enable us to update the web Help whenever we release fresh changes to EA. Watch this space!
Best Regards, Roy

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Difficulties with Subversion integration
« Reply #9 on: September 15, 2008, 12:02:16 pm »
Quote
...
David and Frank - I know you two have been using EA for quite some time.  The Version Control section of the User Guide has been updated over the last few months, so it might be time for another quick browse through...
Thanks for the update Howard.

And that's good advice. There is so much to cover that it is easy to become outdated on areas we don't use every day.

David
No, you can't have it!

Elliott Bignell

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Difficulties with Subversion integration
« Reply #10 on: September 22, 2008, 10:43:38 pm »
We've migrated the model to a SQL Server database and are managing user access via a group set up using the Security feature and by enabling "Require User Lock to Edit". Rather than version control we are going to rely on routine backups of the database. This seems to solve all our problems and certainly provides adequate performance. Thanks for your help, everyone.