Book a Demo
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.

Create a Subversion Environment Verify the SVN Workspace

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 operation 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 flag can be reset by simply invoking the 'Get All Latest' command, then clicking 'Cancel' when the first prompt message is displayed.  Of course, the flag is also reset whenever the 'Get All Latest' operation is completed. Once the flag has been reset, the message '...not yet complete', 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 Control Packages?

If all users enable the 'Export Alternate Images' option ('Start > Application > Preferences > Preferences > XML Specifications') then alternative 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 JScript 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.

---------------------------------------------------------------------
// ***************************************************
// JScript - Remove VC Settings throughout EA project.
// ***************************************************
var bUpdateProjectData = true;

// While this flag is false, the SQL commands are output to session window,
// but they are NOT run against the model database.
// To actually update the model, simply comment out, or remove the line below that assigns the value false.
bUpdateProjectData = false;

function ClearOptionStringValue(theOptionString, theOption)
{
var posOption = theOptionString.indexOf(theOption);
if( posOption != -1 )
{
var posColon = theOptionString.indexOf(";", posOption);
var length = theOptionString.length
return  theOptionString.substr(0, posOption) + theOptionString.substr(posColon+1, length);
}
return theOptionString;
}

Repository.EnsureOutputVisible( "Script" );
Repository.ClearOutput( "Script" );
Session.Output( "=================================================" );
Session.Output( "     JScript - Clear Version Control Settings    " );
Session.Output( "=================================================" );

if( bUpdateProjectData == false )
{
Session.Output( " " );
Session.Output( " Current script settings will display SQL statements, but will NOT update the model database." );
Session.Output( " To update the model database, please edit the script and remove the line ' bUpdateProjectData = false; '" );
Session.Output( " " );
}

var sXML = Repository.SQLQuery("Select Package_ID, PackageFlags from t_package");

var xml = new ActiveXObject("MSXML2.DOMDocument.4.0");
xml.validateOnParse = false;
xml.async = false;
if(xml.loadXML(sXML))
{
//Session.Prompt(sXML,0);
nodes = xml.selectNodes("//EADATA/Dataset_0/Data/Row");
for (var i=0; i < nodes.length; i++)
{
node = nodes.item(i);
idnode = node.selectSingleNode("Package_ID");
flagsnode = node.selectSingleNode("PackageFlags");

if(idnode != null && flagsnode != null)
{
flags = flagsnode.text;
sStrippedFlags = ClearOptionStringValue(flags, "VCCFG=");
sStrippedFlags = ClearOptionStringValue(sStrippedFlags, "CRC=");
sStrippedFlags = ClearOptionStringValue(sStrippedFlags, "CheckedOutTo=");

if(flags != sStrippedFlags)
{
sqlFlags = sStrippedFlags;
if(sqlFlags != "")
sqlFlags = "'" + sqlFlags + "'";
else
sqlFlags = "null";
sql = "update t_package set XMLPath=null, IsControlled=false, PackageFlags = " + sqlFlags + " where Package_ID=" + idnode.text;

Session.Output(sql);

if(bUpdateProjectData == true)
Execute(sql);
}
}
}

Session.Output( "================================" );
Session.Output( "       JScript Completed.       " );
Session.Output( "================================" );

RefreshModelView(0);
}
else
{
Session.Output("Failed to get packages");
}

---------------------------------------------------------------------
Remove Package from Control Scripting

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
Deployment of Enterprise Architect Whitepaper System Requirements Controlled Packages Manual Version Control with XMI