Branching and version numbers

Version numbers are created when new files are added to a branch or version. This allows you to revert to previous versions if necessary. Version numbers have the form:

major_version.minor_version

As you create new versions, the minor version number increments by one for each new version. You can set the version number for a new version (for instance if you want to increment the major version number) by using the -v version option of the various check in commands. This is done from an MVC command line. For example, mvc ci foo.c -v 3.2 checks in foo.c with version number 3.2. Version numbers are never allowed to decrease. 1.4 -> 1.5 and 1.5 -> 2.1 are allowed, but 2.5 -> 2.4 and 2.5 -> 1.6 are not allowed.

You can create a branch in the version for a file, by adding two more dots "." to the version number. For example, a version sequence might be: 1.1, 1.2, 1.3, 1.4. If you create a version with the number 1.3.1.1, that version is a branch off the main sequence. The version sequence for that branch would be 1.1, 1.2, 1.3, 1.3.1.1. The next version for that branch after 1.3.1.1 would be 1.3.1.2.

To create a branch, you use the -v version option of the various checking commands. The version is of the form of a branch version (with 4 numbers). This needs to be done from on MVC command line. For example, mvc ci foo.c -v 1.5.1.1 creates a branch off of version 1.5. When you work on a branch, you always use the -v version option. If you omit the -v version option, MVC assumes that you are working on the main version sequence. This creates a version on the main sequence instead of on the branch. For example:

mvc co foo.c -v 1.5.1.1

(edit foo.c)

mvc ci foo.c -v 1.5.1.2

NOT mvc ci foo.c, which creates a version on the main branch (1.8, for instance).

Related topic:


Previous

Next



Copyright © 1999, Green Hills Software. All rights reserved.