NEWSUBSYSVER creates a new version directory for a subsystem by sharing an existing and labels the old and the new version directories according to AbaPerls label conventions.

   Command-line syntax
   Logical Function
   Physical Implementation

Command-line syntax

newsubsysver [-prefix letter] VC-path oldver newver
‑prefix Prefix letter for the labels. Default value is L. prefix must be a single letter A-Z. If you enter a lowercase letter, NEWSUBSYSVER converts it to uppercase.
VC-path The VC-path for the old version directory.
oldver The name for the old version. This string must be on the form Major.Middle and appear as a component in VC-path.

The name for the new version. This string must be on the form Major.Middle and must numerically be > oldver and have the same number of decimals as oldver. That is, if oldver is 2.10, newver cannot be 2.2 or 2.200. The new version directory must not already exist.

Logical Function

The logical function of NEWSUBSYSVER is best described through an example or two. Say that you enter this command:

newsubsysver C:\SourceSafe/$/test/3.10 3.10 3.20

In this case NEWSUBSYSVER will perform the following actions:

  1. Create the directory $/test/3.20 and make sure all files in $/test/3.10 are also in $/test/3.20.
  2. Label $/test/3.10 with L3.10.1000.
  3. Label $/test/3.20 with L3.20.0001.

Assume this command:

newsubsysver -prefix G tfssrv/$/gadgets/4.80/widgets 4.80 5.00

In this case NEWSUBSYSVER will perform the following actions:

  1. Create the directory $/gadgets/5.00 if it does not already exist.
  2. Create the directory $/gadgets/5.00/widgets and ensure that all files in $/gadgets/4.80/widgets are also in $/gadgets/5.00/widgets.
  3. Label $/gadgets/4.80/widgets with G4.80.1000.
  4. Label $/gadgets/4.80/widgets with G5.00.0001.

As you can see from these examples, the path for the new version directory is derived by replacing oldver in VC-path with newver.

NEWSUBSYSVER checks that there is no label with Minor > 1000 for oldver. If there is, NEWSUBSYSVER aborts.

Physical Implementation

The implementation of NEWSUBSYSVER is quite different between SourceSafe and TFS, and there are also some logical differences due to the different mind-sets of the two products.


After NEWSUBSYSVER has completed, all files in the new version directory are shared with the old directory. In the case when oldver is not in the leaf of VC-path (as in the second example above), the new version directory is created with a direct Share operation in SourceSafe, after first having created any intermediate subdirectories as needed.

In the case oldver is on the leaf of VC-path, NEWSUBSYSVER needs to employ some trickery. Looking at the example above, NEWSUBSYSVER takes these steps:

  1. Create a temporary project with a name like $/test/user-109980980. (user is the name of the current Windows user and the digits are constructed from the current time.)
  2. Share all files in $/test/3.10 to $/test/user-109980980/3.10.
  3. Renames $/test/user-109980980/3.10 to $/test/user-109980980/3.20.
  4. Moves this new project 3.20 to $/test/3.20.
  5. Destroys $/test/user-109980980.

If the operation fails along the way, you may need to complete the steps by hand.

Note: sharing projects takes considerable time. For a project with over 1000 files, you can easily expect an execution time over 15 minutes.


In TFS, NEWSUBSYSVER creates the new version directory as a branch from the old version directory. The comments for the labels include texts that detail the branching.

In Source Control Explorer, the new version directory will have the icon of a branch, in the case the version number is at the leaf of VC-path, but not when the version-number is at intermediate level. This is not because NEWSUBSYSVER handles the two cases differently, but due to how TFS handles this internally.