Author Topic: EA+Subversion out of sync?  (Read 4563 times)

Kelvin Sim

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
EA+Subversion out of sync?
« on: June 21, 2011, 02:50:30 pm »
Hi,

I have two questions that I need some help with:


Question 1:
===========
May I know where can I find some information on how version control works in EA?

It seems a little strange that version controlled version is out of sync with the displayed model when I open EA.

Here is my setup:
EA version: 8.0.858
Model repository: MySQL 5.1.42
Version Control System: Subversion 1.6.6

Once in a while, it appears as if some of our models are missing some packages when we open EA project.  
However, after some experimentation, I've noticed that if I retrieve the latest version again from File Version History popup, those "missing/stuffed" packages are fixed.
(it shows that it is using the latest version, and I have to do this on some packages even after a "Get All Latest").

Doing a Get All Latest will not solve the problem, and sometimes doing a "Get Latest" package by package solves it, but sometimes I have to retrieve the latest model again.

Correct me if I'm wrong, but it seems like EA makes use of 2 copies of the model, one from the MySQL repo while the other one is a "Local Working Copy" from Subversion.  So I assume that EA handles the synchronisation of files for these two copies.  If that is the case, is this issue due to some problem synchronising these two copies?



Question 2:
===========
May I know if EA can be configured to use Git for version control?
If not officially supported, may I know if there is any other workaround that you can point me to so that I can try it out?


Cheers


Kelvin

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: EA+Subversion out of sync?
« Reply #1 on: June 21, 2011, 04:57:52 pm »
Kelvin,

I don't think there's a workaround for GIT at the moment.
One of the difficulties is that EA expects an exclusive lock on files, which is kind of against the whole idea behind GIT.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: EA+Subversion out of sync?
« Reply #2 on: June 21, 2011, 05:04:00 pm »
Regarding the Get All Latest issue: this has been discussed here on the forum. Try a search. However, V9 announced improvements with Get All Latest. I have not been able to test whether it solved the issue. Maybe you give it a try.

However, I always found the solution to Get Latest from the leaf up to the root the best way. Or just running Get All Latest twice (with some risk left).

q.

Bjorn S

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: EA+Subversion out of sync?
« Reply #3 on: March 23, 2012, 01:22:35 am »
Is there any other reason to require locking other than to avoid having to deal with conflicts if two or more people change the content of the same version-controlled file (EA package) at the same time?

If not, then there should be an option not to require such lock and thus also provide Git integration, as such conflicts are easier to deal with in Git and as a last resort can be manually resolved using a text editor.

Bjorn.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: EA+Subversion out of sync?
« Reply #4 on: March 23, 2012, 02:31:27 am »
What do you think git would merge of two conflicting entries in an XMI file? Or just two non-conflicting ones. Just start Winmerge on two different XMI exports of a repository - and have fun.

EA changes "inside" and then exports XMI. For that simple reason it needs to lock.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: EA+Subversion out of sync?
« Reply #5 on: March 23, 2012, 09:00:04 am »
Essentially, if you don't want the locking just make controlled packages without version control and just use GIT externally to control the packages.

You could even add custom tools for the GIT commands. (See http://www.sparxsystems.com/enterprise_architect_user_guide/9.3/getting_started/customtools.html and http://www.sparxsystems.com/enterprise_architect_user_guide/9.3/getting_started/passingparameterstoexternal.html)

However, as previously stated by others automatic merging isn't going to be very helpful and manual merging is nothing short of a pain.

Jerry Gray

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: EA+Subversion out of sync?
« Reply #6 on: April 03, 2012, 11:37:41 pm »
I am experiencing a similar challenge and no amount of "Get All Latest" seems to help.

Running EA 9.2 with Subversion 1.7.2

The challenge is that if I add a note to something in the UML, then check-in the change.  It appears that if the note is added to an element like a use case bubble, we're good, if we add a note to a message in a sequence diagram we're screwed.

The EA stores the note.
The local XML file in the working directory has a timestamp update.
This update is reflected in the repository.
But checking the XML file, no note is stored.

So when another team member gets the data from the repository they "look" like they are synched, but they don't see the note.

 >:(

A very frustrating experience as I have step-by-stepped through this issue to figure out exactly what is going on.

Jerry Gray

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: EA+Subversion out of sync?
« Reply #7 on: April 11, 2012, 12:48:18 am »
I solved my VC problem.  This is covered somewhat in the help regarding packages and sequence diagrams.  Sparx would have you keep the actors under each package and then if you were to resue the actor, instantiate it.  The challenge is that this becomes very messy and hard to find actors in very large models.  

You would have to open every package to see if an actor that you want has been used before.

A better practice is to keep a separate package for actors.  This way you can develop a canonical set of actors with organizational agreement on the roles, descriptions, etc.  Every works from the same set of actors and if a gap is noticed in the actor set, the team can have a discussion around creating a new actor.  This is just good governance.

Anyway the way to fix my problem was that we had:
root -
   - package1
   - package2
   - package3

so if actors were in package 1 and used in package 2, if notes were attached they were not exported in version control.

The ACTUAL fix  ::) is to have a parent package, (no need to instantiate) so the project structure should be:
root -
   - parent package
      -package1
      -package2
      -package3

when this is put under version control notes attached to sequence diagram messages will now export correctly.
 :D