Skip to content

About Subversion and Enterprise Architect

Tobias Spears edited this page Mar 24, 2020 · 2 revisions

Subversion

"Subversion (SVN) is a free/open source version control system (VCS). That is, Subversion manages files and directories, and the changes made to them, over time. This allows you to recover older versions of your data or examine the history of how your data changed. In this regard, many people think of a version control system as a sort of “time machine.” Subversion can operate across networks, which allows it to be used by people on different computers. At some level, the ability for various people to modify and manage the same set of data from their respective locations fosters collaboration. Progress can occur more quickly without a single conduit through which all modifications must occur. And because the work is versioned, you need not fear that quality is the trade-off for losing that conduit—if some incorrect change is made to the data, just undo that change." (Version Control with Subversion)

Subversion client software

There are several clients available for SVN. For using SVN in Enterprise Architect, you need a client with command line control (svn.exe). One broadly used client with both a GUI and command line control is Tortoise SVN: http://tortoisesvn.net/downloads.html.

An other alternative is the CollabNet Subversion Command-Line Client from http://www.collab.net/downloads/subversion. These two alternatives have been tested and will work with Enterprise Architect. There are other clients available as well, and SVN is a 'standard' so most all clients should work - but you have no guarantees.

Subversion in Enterprise Architect

The use and best practices for SVN in Enterprise Architect is described in this white paper: http://www.sparxsystems.com.au/WhitePapers/Version_Control.pdf

Enterprise Architect supports SVN through version controlled XMI files. All work is done in Enterprise Architect, which communicates with the SVN software. No work on version controlled files and folders should be done outside of Enterprise Architect.

The Harmonized model in SVN

A working client (UML editor) for the Harmonized Model repository has 3 components involved, as follows:

  • The SVN (Subversion) Server at JRC, in Italy.
  • An SVN Client on the editor's machine.
  • A working copy of Enterprise Architect

The SVN Server maintains an organized structure of text files. For the Harmonized model, this includes:

  • One package for each ISO number containing all dated versions
  • One package per document per edition of a standard

See also this article: Structure of the Harmonized Model.

The EA application (UML editor) is the only program that actually interacts with the data; the client and server just move files around. All interactions by the editors with the model should be through the EA application and not any other direct SVN application. Most of the EA editor works the same whether or not the packages are controlled. The differences are the package control operations, most of which are available in the context menu for packages.

The Client at the request of the EA application interacts with the SVN Server at the repository, mostly through SVN-specific XMI exports and imports. During set-up, the client records user-name and password for the repository and uses it whenever called upon by the EA application to interact with the server (usually either writing a newly edited package in XMI that is passed to the server, or checking dates on the server and client and importing updated XMI into the EA file).

When the user checks out a package, the client locks the package on the server, gets a most recent copy of the XMI and EA loads it and allows the editor to modify that package. When the user checks that same package in, the client cascades the current copy of the XMI to the Server and unlocks it. EA locks any package not currently checked-out by the user in the client application’s view of the model.

The final working state of these three software components and the repository is:

    Repository ↔ Server ↔ Client (local XMI copy) ↔ EA (file)

At any given time, there are 3 copies of the current data, the official files in the repository (with all backups), a local copy of the most recent files synchronized by the client, and the current working copy in the EA editor's file. When the editor does a check-in for all locked controlled packages or does a "get all latest," all 3 copies of the model are identical.

NOTE: When doing a “get all latest” you are offered to read-all regardless of date. This will take some time and normally if you do “get all latest” on a regular basis, only a few packages will have been changed recently. If you select the “import changed files only” the update will be quicker.