Author Topic: Import from Subversion  (Read 4220 times)

Samuel Liard

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Import from Subversion
« on: March 21, 2008, 09:49:59 pm »
Hi,

I use Subversion with EA but I didn't find an option "import from Subversion".
I can add my model in subversion but I can't import it in an another project...

Can you help me ?

Thaks

Samuel

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 10460
  • Karma: +345/-31
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Import from Subversion
« Reply #1 on: March 23, 2008, 03:24:46 am »
You have to downloed the xmi file from the svn server manually and use the "import xmi" function in EA.

Samuel Liard

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Import from Subversion
« Reply #2 on: March 25, 2008, 06:48:32 am »
Yes, but we have to configure subversion via "Version control setting" before import !  ;)

Thanks

Guillaume

  • EA User
  • **
  • Posts: 959
  • Karma: +29/-2
    • View Profile
    • www.umlchannel.com
Re: Import from Subversion
« Reply #3 on: April 15, 2008, 01:54:10 am »
Hi

I created a project in SVN and separated some packages which each stored within subfolders like:
\Model.eap
\Model.xml
\package1\packageoverview.xml
\package1\test\test.xml
etc...

When I set this up on another PC, I create a brand new EN project (new.eap) and i can import the model ok which lists all models with the version control (black key)

But the problem I have is that all models are empty - my diagrams/elements/packages are not there.

It's only if I do a check out that the contents are listed.
If I then do an undo check out, I still have my contents.

I tried on my PC doing the same with a new EA project and I get the same issue.

I'm quite confused †:o

Any suggestion? Could it be a bug?

Thanks
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


HowardB

  • EA Administrator
  • EA User
  • *****
  • Posts: 55
  • Karma: +0/-0
  • I love YaBBies!
    • View Profile
Re: Import from Subversion
« Reply #4 on: April 16, 2008, 02:55:14 pm »
Hello,

It is true that for the tasks you are describing, you must first create a working copy folder on your PC and then within EA define the VC configuration that you will use.

Once this is done, you can use either "Import Package from XMI file", or the version control command "Get Package" to import the root package of your model. †If the model packages were added to VC using the option "Save nested VC packages as stubs" (which is on by default), then you will still need to populate the package stubs, by importing their respective package files.

The intended way for you to do this, is by using the "Get All Latest" command, which will recursively populate your entire model.


New functionality, introduced in EA 7.1, allows you to export any VC package as a "model branch". †(For example, the Model Root node, or any one of the View nodes.) †These model branches can then be imported into other projects, or by other users, with the command "Import a Model Branch", which automatically performs the "Get All Latest" after importing the specified root package.

"Import a Model Branch" will also allow you to select a file from disk, without having the VC configuration defined beforehand, although you still need to have the working copy folder present and populated before invoking this command.

regards,
Howard.

Guillaume

  • EA User
  • **
  • Posts: 959
  • Karma: +29/-2
    • View Profile
    • www.umlchannel.com
Re: Import from Subversion
« Reply #5 on: April 16, 2008, 08:57:12 pm »
Hi

Thanks for the info.
I exported a model branch and then imported it from a new EA project. It initiates a Get Latest All when used for the first time which has solved partof my problem.

The remaining issue I have is that I don't have the Get Latest All feature available from Package Control which would be useful when the project is next opened to retrieve all updates from the SVN repository.

EA help mentions that it is "available only for packages that are checked in." which is my case. I'm also using EA v7.1, latest build.

Is there anything I'm doing wrong that explains why Get Latest All is not available?
What I basically need is that when someone has updated the project, everybody else can get the latest version from the repository.
At the moment only doing a Checkout for each package updates its content which is not ideal..

Note that the option Save nested VC packages as stubs is left enabled (default).

Thanks
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


aap

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Import from Subversion
« Reply #6 on: April 16, 2008, 10:01:02 pm »
Have you checked "This model is private" in the version control settings?

Read the help for an explanation of why you have to be careful doing this ...

Andy

Guillaume

  • EA User
  • **
  • Posts: 959
  • Karma: +29/-2
    • View Profile
    • www.umlchannel.com
Re: Import from Subversion
« Reply #7 on: April 16, 2008, 10:51:38 pm »
According to the help about the private models:
If, at this point, user2 performs a Get Latest or Get All Latest on the package, they retrieve from Version Control a package that is now out of date. (User1 has it checked-out and has made changes that are yet to be checked-in.) The out-of-date package would be imported into the model loaded on user2's machine, immediately updating the model database (either the shared .EAP file or the DB repository) and overwriting the modifications that user1 has just made.

I think this problem doesnít apply if you require all users to work on a separate EA project (.EAP file), and not on a shared .EAP.

Consider the following:
- the entire model information is shared through XML files stored on the SVN repository
- when new users wish to use this project, they will create a new EA project on their hard drive (outside the SVN repository) and import the XML files from SVN

Based on the above scenario, when user2 performs a Get All Latest on the package, it will update the local EAP file, thus not affecting user1ís EAP project file which is currently being updated.
User2 will not however be able to update this package until user1 checks in this package.
When user1 checks in the package, all users can get the latest version by doing a Get All Latest.
If instead they had to do a Checkout followed by an undo checkout, this would not allow them all to update their model at the same time (not very shared environment friendly).
Also user1 may check in a new version but keep a check out on the package which woudl prevent anyone getting the latest version ...!

It looks to me that provided each user works on a separate eap file stored on their local hard disk, they can enable this Private model option to have access to the Get All Latest feature. Maybe EA should update the options accordingly to suggest a third option with this condition.

Please let me know if Iím wrong in my understanding of how EA works or if itís ok using EA this way.

Thanks !
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 10460
  • Karma: +345/-31
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Import from Subversion
« Reply #8 on: April 17, 2008, 03:52:35 am »
That is exactly why one would use the "model is private" option. So yes go ahead an set it to private.

Guillaume

  • EA User
  • **
  • Posts: 959
  • Karma: +29/-2
    • View Profile
    • www.umlchannel.com
Re: Import from Subversion
« Reply #9 on: April 18, 2008, 01:40:11 am »
I tried today and this method indeed works.

thanks for everyone's input †:)
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com