Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: F@lk on July 15, 2013, 11:09:29 pm

Title: How to put Enterprise Architect model under SVN?
Post by: F@lk on July 15, 2013, 11:09:29 pm
Question: How can I setup Enterprise Architect to put my already existing UML model under SVN control of an already existing checkout of my SVN repository.

Situation (on a development machine):


I don't find menu items like 'setup SVN' or 'add model to SVN', and the EA help doesn't help me as it just explains how to install SVN in general but not how to connect EA with my SVN system.

http://www.sparxsystems.com/enterprise_architect_user_guide/projects_and_teams/configureversioncontrolwith.html suggests to use "Project | Version Control | Version Control Settings menu option" but there is no such item there.
Title: Re: How to put Enterprise Architect model under SV
Post by: Geert Bellekens on July 15, 2013, 11:21:29 pm
You probably don't have the full set of menu options.
See View|Workspaces and Commands|Commands and select "Complete"

Geert
Title: Re: How to put Enterprise Architect model under SV
Post by: Helmut Ortmann on July 15, 2013, 11:22:51 pm
Hello Geert,

do you have the EA Corporate Edition?

Helmut
Title: Re: How to put Enterprise Architect model under SV
Post by: F@lk on July 15, 2013, 11:34:57 pm
Quote
You probably don't have the full set of menu options.
See View|Workspaces and Commands|Commands and select "Complete"

Yes, thank you, you're right. I used "Systems Engineering" and "Version Control" was off there.

So how to go on now, what are the next steps? I'm beaten by those terms like "control package" and "unique id" and so on. I expected to see simply something like in Tortoise but it's quite different.
Title: Re: How to put Enterprise Architect model under SV
Post by: Geert Bellekens on July 15, 2013, 11:55:53 pm
No it isn't difficult.
You first need to setup your version control configuration.
The UniqueID is just a name you use to recognize later on, and the working copy path and subversion executable should be familiar.

Then you go to the packages you want to control and right click and select Package Control|Configure.

Either you do that one by one (start at the lowest level in that case) or you add a whole branch of you model using  "Add Branch to Version Control"

Geert
Title: Re: How to put Enterprise Architect model under SV
Post by: F@lk on July 16, 2013, 12:18:43 am
Quote
No it isn't difficult.
... or you add a whole branch of you model using  "Add Branch to Version Control"

I called the adding of the whole branch and an unexpected (not wanted by me!!!) avalanche of SVN commits have happened. And that directory got populated with cryptic subdirs and xml files.

It seems to work step-wise and from time to time an error dialog appears:
Code: [Select]
The following SVN command did not complete within the 30 second time-out interval;
"C:\Program Files (x86)\CollabNet\Subversion Client\svn.exe" add --auto-props --config-dir "C:\PROGRA~2\SPARXS~1\EA\Config\SVN" "ea8\8BxxcutxxD1.xml"
Do you wish to allow it more time to complete?

Now I fear I've messed up the whole thing. Is that error bad? What should I do now?
Title: Re: How to put Enterprise Architect model under SV
Post by: F@lk on July 16, 2013, 12:52:46 am
and what do they mean with "Check in" and "Check out"? Is this Sparx EA language and they actually mean "svn commit" and "svn update"?

Why is there a "key" icon displayed on my model and packages in the model tree now? Does it mean it's locked now? Why is lock/unlock necessary at all? I've used that the last time with ancient CVS many years ago.

Why does clicking "Check Out..." in the "Package Control" submenu of the context menu over the model tree raise this error dialog now?:

Code: [Select]
svn: E175002: Server sent unexpected return value (400 Bad Request) in response to LOCK request for '......my local path.../F032xxxxxx33w.xml'
I haven't expected it ends up in such a ...  :-/
Title: Re: How to put Enterprise Architect model under SV
Post by: Helmut Ortmann on July 16, 2013, 01:00:23 am
Hello,

EA locks the *.xml file during Checkout. It unlocks it during checkin.

Helmut

Title: Re: How to put Enterprise Architect model under SV
Post by: F@lk on July 16, 2013, 01:12:08 am
Now I can't edit my model anymore. Everything is read-only. The model tree shows a lot of key icons. On "Package Control"->"Check In Branch..." I just get a messagebox telling me "There are no packages checked out to you in the selected branch."

Any help is highly appreciated.  :o
Title: Re: How to put Enterprise Architect model under SV
Post by: Helmut Ortmann on July 16, 2013, 05:47:57 am
Hello,

timeout problem:
Project, Version Control, Version Control Settings
Change timeout time
This failure is uncritical. Redo the operation will also work.

Make Sure:
- The SVN rights for lock for the current user are available

Check:
Usually EA outputs the command to svn which causes the trouble. Try the command in a cmd window.

Start with just two packages and without branch
Make a simple project with just two packages.  

My experiences with SVN
Besides from the uncritical timeout most if not all problems occurs from settings within SVN. That are only a few issues. By typing the command you'll quickly find out.

EA paradigm
Be aware of the EA paradigm. You may like it or not but you can't change it:
This paradigm is the cause that EA don't work with GRIT.

Resynchronize VC package state
If you are confused about the current state just right click on the package, Version Control, Re-sync Status with VC provider

Be aware of
In my experiences with a lot of different VC tools is that the technical aspects works quit seamless after some starting problems.

There are a lot of pros and cons about VC. You can find these in this forum with a lot of personal experiences and emotions.

To summarize it: You get something but usually you have to pay for it.

My personal view is:
In an environment with strict processes or safety requirements I would use VC after I'm sure I've found the right package structure. If you have no special requirements according to VC other than 'I'm used to it' I would think carefully about it. Some remarks:
Don't be worried but make a conscious decision. This forum may help you.


Helmut
Title: Re: How to put Enterprise Architect model under SV
Post by: F@lk on July 17, 2013, 06:56:38 pm
Quote
Make Sure:
- The SVN rights for lock for the current user are available
Helmut

Helmut, thank you for your great reply. Now I found out svn lock/unlock does not work without EA either. So EA's problem is more that it's unable to clearly show the operation has failed, and a newbie cannot see in which state we remain (Checked in or out). I just see such pretty "key" icons on all my packages and it's not explained what that means. I suspect it means they are still not available because not checked out (?). And thank you for making the paradigm of "check in" and "check out" clear, I reckon it's the least common denominator with all those VC systems, you know CVS is supported as well.
Title: Re: How to put Enterprise Architect model under SV
Post by: KP on July 18, 2013, 09:04:41 am
Quote
a newbie cannot see in which state we remain (Checked in or out). I just see such pretty "key" icons on all my packages and it's not explained what that means.
Would these two help pages help?

Project Browser Icon Overlays (http://www.sparxsystems.com/enterprise_architect_user_guide/10/navigate_search_and_trace/projectbrowseroverlays.html)
Locked Element Indicators (http://www.sparxsystems.com/enterprise_architect_user_guide/10/projects_and_teams/locked_element_indicators.html)
Title: Re: How to put Enterprise Architect model under SV
Post by: F@lk on July 18, 2013, 05:25:35 pm
Quote
Project Browser Icon Overlays (http://www.sparxsystems.com/enterprise_architect_user_guide/10/navigate_search_and_trace/projectbrowseroverlays.html)
Locked Element Indicators (http://www.sparxsystems.com/enterprise_architect_user_guide/10/projects_and_teams/locked_element_indicators.html)

Great! Thank you. Would be cool if you mentioned them in the version control help pages. Furthermore, please, clearly separate docs about common VC basics from documentation how to use it in the EA. This way I could quickly skip the parts I already know.