![]() |
![]() |
![]() |
|
![]() | |
![]() |
![]() |
![]() |
![]() |
![]() |
Log In | Not a Member? |
Support
![]() |
![]() |
SYNTAX
NameRevisions [name] [revision1 [revision2]…] [-a] [-b] DESCRIPTION NameRevisions creates a symbolic name to represent a set of revisions in a single project. Subsequently, when you use the symbolic name in Projector commands such as CheckOut, the MPW Shell substitutes the set of revisions, revision1 [revision2]…, for name. You can use this command either to create a new symbolic name or to modify an existing one. When creating a new name, you can specify any number of files as long you specify only one revision per file. If you specify a filename with no revision or branch number, NameRevisions assumes you want the latest revision. In modifying an existing symbolic name, you can either change the revision or branch of files already represented in the name parameter, or you can add new files. To do the former, you specify the files (with or without revision or branch numbers) again in the revision parameter. To add new files, you specify the filenames as you would for a new symbolic name. In addition to its default behavior, NameRevisions also allows you to • create private names (-private) instead of public names (-public), which is the default • replace an old definition of a symbolic name entirely (-replace) • name the project for which you are defining the symbolic name (-project) (normally NameRevisions assumes the current project) • retrieve the latest revisions of the files in a symbolic name when the name is used in a Projector command (-dynamic) INPUT None OUTPUT None, unless you omit the name or revision parameter. If you omit both of these parameters, NameRevisions writes to standard output a list of all symbolic names in the current project and their values. If you omit only revision, the command lists the revisions for this symbolic name. In either case, the lists appear in the form of NameRevisions commands. STATUS
NameRevisions can return the following status codes:
PARAMETERS name Specifies a symbolic name for a set of revisions. The name can contain any characters with the following restrictions: the first character cannot be a digit (0-9), and commas, greater than or less than signs (<, ≤, >, ≥ ), and hyphens (-) cannot appear anywhere. Note that names are not case sensitive. See the Output section for the effect of omitting this parameter. revision1 [revision2]… Specifies a set of revisions for files in the current project. Note that NameRevisions allows only one revision per file in a symbolic name. See the Output section for the effect of omitting this parameter. OPTIONS -a Represents all files in the current project. This causes the symbolic name to expand to the latest revisions of all files in the current project. -b Writes both private and public names when you omit the name parameter. -cf commentFile Associates a comment with the symbolic name. The comment is contained in the specified file. -comments If a comment is associated with a symbolic name, the comment is included in the output. -cs commentSting Associates the specified comment with the symbolic name. -dynamic Expands the files to the latest revision when you use the symbolic name, as opposed to when you define it. This means that you can define a symbolic name for a file, making it the latest revision (say, revision 7). When you use the symbolic name to check out the file later, it expands to the latest revision at the time of the checkout (for example, revision 10).
Note -expand Expands symbolic names and files to the current revision level if you omit either name or revision. -only Lists every symbolic name defined in the current project but not their associated revisions. -private Creates a private symbolic name. Unlike public names, private names are not stored in the project and last only for the duration of the current MPW Shell session. To create a private name that persists beyond the current session, you can place the NameRevisions command, which creates the name, in one of your UserStartup•name files. -project project Names the project for which the symbolic name is created. This becomes the current project for this command. -public Creates a public symbolic name (the default). This lets everyone in the project use the name. -r Executes the NameRevisions command recursively on the current project and all its subprojects. -replace Replaces the current definition of name with a new definition. -s Writes revision names, one per line, when you omit both parameters or just the revision parameter. -u user Names the current user, overriding the {User} MPW Shell variable. EXAMPLES Assuming the latest revisions of the files file.c and interactive.c are 9 and 13 respectively, this command line defines a symbolic name Work that always expands to the files file.c,9 and interactive.c,13. NameRevisions Work file.c interactive.c By omitting the revision parameter, the command line NameRevisions Work generates the current definition of Work as the NameRevisions command: NameRevisions Work file.c,9 interactive.c,13 The following two examples illustrate the use of the -dynamic option. In the first example, the command line defines a symbolic name myName that expands to the latest revision of file.c at the time of definition. NameRevisions myName file.c The second example expands file.c to the latest revision when you use the symbolic name. Even if revision 7 was the latest revision at the time of definition, myName expands to the current latest revision (for example, revision 10). NameRevisions myName file.c -dynamic The following command creates the symbolic name file.c using the -dynamic option: NameRevisions file.c file.c,1.1a -dynamic In this case, the CheckOut command CheckOut file.c checks out the latest revision on the first branch of revision 1.1 of file.c. In the following example the name BetaRelease is defined recursively for all projects within the Time project: NameRevisions -project Time∫ -r "BetaRelease" -a This performs the same function as executing the following commands individually:
NameRevisions -project Time "BetaRelease" -a SEE ALSO
|