Setting Up a VersIC User Workspace

VersIC/Subversion needs a workspace where it can put data that will be checked out of the repository while you are working on it.

1. Create the workarea directory.

% mkdir -p $HOME/WorkAreas/myWorkArea

2. Create the workarea sub-directories

Create the sub-directories for handling data and application output. We recommend that you have separate directories for these as the application output can distract from the actual data making it harder to spot issues that may occur with real data.

% cd $HOME/WorkAreas/myWorkArea
% mkdir cds_run
% mkdir work

3. Setup the cds.lib files

The actual data (when checked out) will reside in the work directory while we will be starting the application from the cds_run directory. So, we need to setup the cds.lib files accordingly.

  1. Setup the cds_run/cds.lib file such that it references (includes) the work/cds.lib file.
    % echo '# Application cds.lib file' > cds_run/cds.lib
    % echo 'INCLUDE ../work/cds.lib'   >> cds_run/cds.lib
    
  1. The work/cds.lib file will be created automatically when the workarea is populated.

4. Setup VersIC to load in your Virtuoso environment

If VersIC has been set up to be auto-loaded via the setup.loc mechanism you can skip this step and goto step 5.

Copy VersIC initialization and environment files from the installation config area to load the versic tool into the cadence environment.

% cp $VSC_INSTALL_DIR/config/cadence/dot_cdsinit cds_run/.cdsinit
% cp $VSC_INSTALL_DIR/config/cadence/dot_cdsenv cds_run/.cdsenv
% cp $VSC_INSTALL_DIR/config/cadence/cdsLibMgr.il cds_run

5. Define Your Managed Libraries

VersIC/Subversion has two modes depending on whether or not VSC_WORKDIR is defined. 

With VSC_WORKDIR

If VSC_WORKDIR is defined, it must point at a Subversion-managed directory, and libraries inside VSC_WORKDIR are seen by VersIC as managed. All managed libraries must exist in a contiguous hierarchy of a single Subversion repository.

% setenv VSC_WORKDIR $HOME/WorkAreas/myWorkArea/work

No VSC_WORKDIR

(Support for multiple repositories, disconnected work areas)

VSC_WORKDIR is optional, and if it is not defined, VersIC considers a library as managed if:

  1. the library is defined in the cds.lib file (or an INCLUDE file)
  2. the library directory is managed by subversion
  3. the library directory is writable

In this mode, VersIC can manage libraries in multiple repositories and/or in different locations in the same repository.

This flexibility comes at the expense of some functionality:

  1. Branches, tags and aliases are not supported
  2. 'Manage Libraries' is not available

Customers with multiple repositories and/or a complex workspace should consider using Percipient to manage IPs and create workspaces.

6. Copy the VersIC/Subversion config file locally

Copy the VersIC/Subversion config file into your default Subversion config directory. This is very important to ensure the correct locking behavior in your VersIC workspace.

% mkdir -p ~/.methodics/versic/subversion
% cp $VSC_INSTALL_DIR/config/subversion/config ~/.methodics/versic/subversion

7. Create your Subversion workarea by checking out from the repository

Create a managed workarea by checking out the project trunk from the repository.

% cd $VSC_WORKDIR
% svn checkout $REPO_ROOT/$PROJECT/trunk/cadence/ .

This will create the library directory myLib and the cds.lib file in the workarea.  
Your workarea is now ready to use with VersIC, Subversion and Virtuoso.

8. Permanently cache your Subversion password

Subversion will prompt you for a password the first time you try to change an item in the repository. This is a problem for VersIC as it assumes batch mode operation (we use --non-interactive by default when we execute svn commands with VersIC). To resolve this, as part of the configuration users should run the following to cache their svn password and avoid any prompting from svn:

% cd $VSC_WORKDIR
% svn lock $REPO_ROOT/$PROJECT/trunk/cadence/<my_lib>/cdsinfo.tag

Subversion will prompt as follows

(Note that this case <my_lib> is the "opamp" library)

Unix> svn ls $REPO_ROOT/$PROJECT/trunk/cadence/cdsinfo.tag 
Authentication realm: <svn://atlantia:3690> 3b3aee30-2e73-4ed7-aca5-dc0042409a9e
Password for 'simon': 
""stores the authentication details for user simon and 
   returns the repository content of the given path""Unix> 

Your svn password is now cached and you can continue with your VersIC work.

Subversion Externals

VersIC does not support svn:externals. We recommend using Perforce IPLM if you need to create workspaces from multiple repositories and/or from multiple locations in a single repository.

Automatically creating user workspaces using the provided vscMakeUser program

Perforce provides scripts for auto-creating user workspaces. The scripts can be found in the $VSC_INSTALL_DIR/install/mdx_versic/scripts/ directory.