Topics
Prev Next

Version Control

This topic provides answers to frequently-asked questions when using Version Control on models in Enterprise Architect.

Question

Answer

See also

Why do I get the message "Out of Memory during 'Get latest' / 'Get All Latest'"?

This error is likely arising because the XMI file being imported during the 'Get All Latest' operation is too large.  If you have not done so already, we recommend reducing the size of your XML files by applying Version Control to all Packages in the model hierarchy. Using the 'Apply Branch to Version Control' option is the simplest way to do this; see the Apply Version Control To Branches Help topic.

This should improve the performance of Version Control functions, as well as reduce the degree of 'lock out' experienced when sharing a model, by allowing users to check out only the required Packages.  You can find this recommendation, amongst others, in the Version Control Best Practices white paper.

Version Control Best Practices white paper Apply Version Control To Branches

Why do I get the "svn: '.' is not a working copy" error when saving Version Control settings?

This error is passed on from the SVN command line client. It suggests that SVN does not recognize the 'Working Copy Path' you have specified as an actual SVN Working Copy directory.

Please ensure your Version Control is configured as described in the Create a Subversion Environment Help topic.

In particular, please ensure you can perform the commands mentioned in the Verify the SVN Workspace Help topic, then try configuring Enterprise Architect's Version Control settings again.

Verify the SVN Workspace Create a Subversion Environment

Why do I get the message "A 'Get All Latest' command, invoked on this model by user 'UserName', is not yet complete"?

The 'Get All Latest' command can take a significant amount of time to run and complete. Because of this, Enterprise Architect sets a flag to indicate that the command is in progress. When the process is complete, the flag is cleared. If you know that the 'Get All Latest' process is not actually running at this time, then it is safe to proceed with the check-out (that is, click on the Yes button).

The next time that the 'Get All Latest' command is run (and completed) by any user, the flag will be reset, so the message will no longer appear for any Packages. When performing a 'Get All Latest', ensure you use the 'Import changed files only' option.

Update to the Latest Revision of All Packages

What happens if a user has left a Package checked out and is not available to check it in?

If a user leaves a Package checked out and they are not available to check it in, you could clear the lock on the XMI file using your Version Control software (such as TortoiseSVN), then use the 'Re-synch Status With VC Provider' option in Enterprise Architect to give you access to the Package.

See the Resynchronize the Status of Version Controlled Packages Help topic. As noted, this could cause some data loss.

Resynchronize the Status of Version Controlled Packages

Can I include alternate images in exported version controlled Packages?

If all users enable the 'Export Alternate Images' option ('Start > Workspace > Preferences > Preferences > XML Specifications') then alternate images are included in the exported and imported XMI files.

XML Specifications

How can I avoid corruption of my version controlled Sequence Diagrams?

To avoid issues with Sequence diagrams in Version Control, ensure that the Lifelines are created as Object elements in the same Package as the diagram.

Refer to the Sequence Diagrams and Version Control Help topic.

Sequence Diagrams and Version Control

How can I remove Version Control from a Project?

The choices at the present time are: disconnect Packages one at a time (as described in the Remove Package from Control Help topic), or run a model script.

This is an example VBScript that you could use. While this tests properly for Sparx Systems, we recommend making a backup of your model in case there are unforeseen issues. For information on using scripts, see the Scripting Help topic.

VBScript - VB_Remove_AllPkgs

--------------------------------------------------------------------------------------------------------

option explicit

'

' Related APIs

' =================================================================================

' Package API - http://www.sparxsystems.com/uml_tool_guide/index.html?package_2.htm

' Element API - http://www.sparxsystems.com/uml_tool_guide/index.html?element2.htm

' Repository API - http://www.sparxsystems.com/uml_tool_guide/index.html?repository3.htm

dim g_pkg as EA.Package

dim g_lvl

sub RemoveVersionControlledPackageAll()

Session.Output( "VBScript RemoveVersionControlledPackageAll" )

Session.Output( "==========================================" )

dim i, n

g_lvl = 0

n = Repository.Models.Count - 1

for i = 0 to n

  set g_pkg = Repository.Models.GetAt(i)

  RemoveVersionControlledPackage

next

Repository.Models.Refresh()

Session.Output( "Done!" )

end sub

sub RemoveVersionControlledPackage()

dim i, n

dim p as EA.Package

on error resume next

if g_pkg.IsVersionControlled then

  Session.Output( g_lvl & "-" & g_pkg.Name )

  g_pkg.VersionControlRemove

  Repository.Models.Refresh

  Session.Output( g_lvl & "-" & g_pkg.Name )

end if

g_lvl = g_lvl + 1

set p = g_pkg

n = p.Packages.Count - 1

for i = 0 to n

  set g_pkg = p.Packages.GetAt(i)

  RemoveVersionControlledPackage

next

set g_pkg = p

g_lvl = g_lvl - 1

end sub

RemoveVersionControlledPackageAll

--------------------------------------------------------------------------------------------------------

Scripting Remove Package from Control

Can I use Version Control Branching in Enterprise Architect?

Enterprise Architect's Version Control integration does not support branching. When using Version Control integration (that is, integrating with external providers such as SVN and CVS) a specific Package can only be checked out by a single user at a given time.

If you do require branching/merging you could consider the 'Branching using Baselines' approach, which is described in the Branching using Baselines section of the Deployment of Enterprise Architect white paper.

Deployment of Enterprise Architect whitepaper

Does Enterprise Architect support Git Version Control integration?

Enterprise Architect does not support integration with Git for Version Control.

You can use the 'Controlled Packages' function of Enterprise Architect  without explicit Version Control integration. This allows you to pre-set the path for saving and loading the XMI for each Package. If you put this into your Git working directory then you can manually execute the Git commands when using the save and load commands.

See the Controlled Packages Help topic and, in particular, the Manual Version Control with XMI Help topic.

Alternatively:

  • Consider using one of Enterprise Architect's supported products for Version Control integration or,
  • Consider the use of a shared DBMS repository and Enterprise Architect's Package Baseline functionality, in particular the Load Other Baseline feature as is described in the 'Branching using Baselines' section of the Deployment of Enterprise Architect white paper
Controlled Packages System Requirements Deployment of Enterprise Architect Whitepaper Manual Version Control with XMI