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
SourceSafe
TFS
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. |
newver |
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. |
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:
Assume this command:
newsubsysver -prefix G tfssrv/$/gadgets/4.80/widgets 4.80 5.00
In this case NEWSUBSYSVER will perform the following actions:
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.
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:
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.
Copyright © 1996-2011,
Erland Sommarskog SQL-Konsult AB.
All rights reserved. AbaPerls is available under
Perl Artistic License
This page last updated 11-05-10 16:40