![]() |
![]() |
![]() |
![]() |
# razor -c new_thread -f <name> -g <group> [-n <list>] \ [-i <issue[<:issue group>]>] [-m]
The new thread will include the files and file versions specified in the <list> file. If the optional -n <list> flag is not used, Razor will expect the list file to be in your current directory with the same name as the new thread. The format of the <list> file must be a single line entry for each file to be included in the thread. It is not necessary to have an entry for excluded files, but you may, if you wish, for completeness. As it is, excluded entries in the <list> file are simply ignored, since this is the initial instance of the thread. Each line must have 3 fields separated by 1 or more TAB characters, and be in the form,
< + | - ><file>
<version>
where '+' indicates inclusion, '-' exclusion and <file> is the filename, with folder path, if appropriate; and <version> is the version of the file to be used in this thread.
You may use the -i <issue> flag to associate an issue with this operation. However, don't confuse this flag with the selection option to "Include [files] based on issues". The "new_thread" command only includes files for the thread based on the entries of the <list> file; there are no blanket, filtered, or associated-issue flags from the command line to select files for the thread. The -m flag, if present, will allow multiple versions of a branched file (trunk/branch) to be included in the new thread.1
The threads program offers a nice mechanism for generating a shell script which will gather the appropriate files together for the sake of a product build or release. Occasionally, it may be handy to generate this script directly from the command line (or more likely, from a controlling script). The following command line will do this for you...
# razor -c thread -f <name> -g <group> [-t <dir>] \ [-v <ver>] [-d <dir>] [-o]
When using this command, the -f and -g flag pairs are required, and they note the name (file) of the desired thread and its related group respectively. Unless specified otherwise with the -t flag, the files will be gathered into the user's $HOME directory. The optional -v flag specifies which version of the named thread will be utilized for the making of the script; the default action is to use the most recent version of the named thread. The script itself will be placed in the current working directory, unless indicated otherwise by the optional -d flag. And, as with other razor commands, the optional -o flag will force the overwrite of any pre-existing script.
(In order for the above command and its various flags to make sense, you must already be familiar and comfortable with what threads are and how they are used.)
To fit into some processes, occasionally it is convenient to be able to duplicate a thread via the command line. The syntax for this operation is as follows:
# razor -c dup -f <name> -g <group> -n <new name> \ -t <title> [-i <issue[:<issue group>]>]
This operation will be treated as a thread creation and will execute any create before and create after script configured in the Actions file. The RAZOR_ACTION environment variable available to these scripts will be set to DUP_BEFORE and DUP_AFTER.2
It is possible to modify a project or thread through the command line interface. A file must exist with the same name as the thread identifying the additions/subtractions. This file (or use -n to specify an alternate file) contains a list of the additions/subtractions in the form:
# razor -c modify -f <name> -g <group> -t <title> \ [-v <ver>] [-p <file>] \ [-n <file> [-i <issue[:<issue group>]>]]
You must specify the <name> of the thread or project that will be modified, and the <group> (a thread or project group). You must also provide a thread title with -t <title>, a quoted text string containing a brief description of this operation that is recorded in the database. Additional comments of this specific operation may be added to the database by using the -p <file> flag; whatever text, or "prose", contained in <file> will be recorded in the history of the thread or project.
The thread or project will be modified by the entries in the <list> or change file. If the optional -n <list> flag is not used, Razor will expect the file to be in your current working directory with the same name as the thread or project to be modified. The <list> file contains a single line entry for each change that will be made. The format of this file varies for threads and projects; a thread change contains 3 fields while a project <list> file contains 4 fields. The list file must be in the following formats:
< + | - ><file>
<version>
... and for projects 4 fields of the form:
< + | - ><thread>
<group>
<version>
where '+' indicates inclusion, '-' exclusion.
Use the -v option to modify the specified version. If no version is specified, the latest version will be modified. You may also use the -i <issue> flag to associate an issue with this operation. However, don't confuse this flag with the selection option to "Include [files] based on issues". The "modify" command updates the thread or project based on entries in the -n file. There are no blanket, filtered, or associated-issue flags from the command line to select files for the thread. The -m flag, if present, will allow multiple versions of a branched file (trunk/branch) to be included in the modified thread.3
From the command line, Razor can compare different versions of a thread, or compare two different threads. The result of the compare will go to stdout, but can be redirected, as needed. To perform a thread compare, run the following command...
# razor -c thread_compare -f <name1> [-f <name2>] \ [-v <v1>] [-v <v2>]
One thread file name ("-f <name1>" parameter) is required, as is the group name. If the optional second file name parameter is included in the command, the compare will be performed on two different threads.
If an optional version parameter ("-v") is used, it will be associated with the first name parameter. The second optional version parameter will be associated with the second name parameter (if used) or the second version of the thread for the comparison. When no version parameter is specified, the latest version of the thread will be used.
![]() |
![]() |
![]() |
![]() |
(Part 9 of 12 for this section) (Generated 09/13/99 at 18:01:58) |
Copyright Tower Concepts http://www.tower.com Voice: 315-363-8000 Fax: 315-363-7488 support@tower.com sales@tower.com |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |