qmodhdr (see also)

You use qmodhdr to change header information of a QVCS archive. Modifications can include adding or removing users from an archive's access list, altering the QVCS attributes defined for an archive, and changing various information fields associated with an archive.

All the command line switches that have the m prefix prompt you for further information unless the -comment command switch is used.

Command Template

qmodhdr {-mlabel LABEL}|{-ma}|{-mc}|{-md}|{-mm}|{-mo}|{-forceOnAccessList}|{-defaultbranch {TRUNK|revision_spec}}|{-a ATTRIBUTE={YES|NO}} [-comment "answer value"] filename

*One of the options enclosed in {} must be specified.

where:

-mlabel LABEL

Specifies the label that qmodhdr will change. If the LABEL contains any white space, it must be enclosed in single or double quotes. qmodhdr then prompts you to enter a new label string with which to replace the old one. The new label must be less than 132 characters.

-ma

Indicates that you wish to modify the module access list. qmodhdr prompts you to enter a new access list for the module, or uses the new access list defined by the -comment command line option. Any user on the new access list not already on the module's modifier list will be added to the module's modifier list.

-mc

Indicates that you wish to modify the QVCS archive's comment prefix string. This is the string that QVCS uses to prefix QVCS log information when the $Log$ keyword is expanded. qmodhdr prompts you to enter a new comment prefix string.

-md

Indicates that you wish to modify the QVCS archive's description. qmodhdr prompts you for a new description which replaces the QVCS archive's existing description.

-mm

Indicates that you wish to add a name to the QVCS archive's modifier list. qmodhdr prompts you for the names to add or uses the names given by the -comment command line option. Note that names cannot be removed from the modifier list.

-mo

Indicates that you wish to change the owner associated with the QVCS archive. qmodhdr prompts you for the new owner id. The new owner id must exist in the QVCS archive's current access list.

-forceOnAccessList

Indicates that you wish to add users to the file's access list. qmodhdr prompts you for the user name(s) to add, or uses the user(s) defined by the -comment command line option. The new user(s) will be forced onto the file's access list. If the current user is not on the access list, that user will also be forced onto the file's access list.

-defaultbranch {TRUNK|revision_spec}

Changes the default branch of the QVCS archive to the indicated branch. TRUNK indicates that the trunk is to become the default branch (this is the default when QVCS archives are created). To indicate a non-trunk branch, set the revision_spec to that of a revision on the branch that you wish to be the new default branch. Subsequent qgets and qputs will use the indicated branch by default.

-a ATTRIBUTE={YES|NO}

Indicates that you wish to change the value of the specified attribute to the new value. This switch may be specified multiple times on the same command line to change different QVCS attributes. qmodhdr can modify the following archive attributes: BINARYFILE, CHECKLOCK, DELETEWORK, EXPANDKEYWORDS, JOURNALFILE, PROTECTLOGFILE, and PROTECTWORKFILE.

-comment "answer value" (optional)

The -comment option allows you to provide an answer on the command line for those options which otherwise prompt you for input. For example, if you specify the -ma option to alter the QVCS archive's access list, you can also include a -comment "Jane,Joe" on the command to identify the new access list. If the -comment option is used, qmodhdr gets the required information from the command line, and won't prompt you to supply the answer.

filename (required)

The work file associated with the QVCS archive you wish to modify.

The filename can make use of the wildcard character * in order to perform the operation on all applicable files in the current directory, all files of a certain extension (e.g. *.cpp), etc.

Examples

qmodhdr -mlabel 'Version 1' foobar.c
Indicates that you wish to modify the string associated with the 'Version 1' label. qmodhdr prompts you to enter a new string which replaces 'Version 1' in the QVCS archive.

qmodhdr -ma foobar.c
Indicates that you wish to modify the access list associated with foobar.c's QVCS archive. qmodhdr prompts you to enter a completely new access list for foobar.c. All members of the access list must exist in the modifier list. The new access list completely replaces the old access list.

qmodhdr -a PROTECTWORKFILE=NO foobar.c
qmodhdr alters the attributes of foobar.c's QVCS archive so that QVCS utilities do not write protect QVCS work files after gets or puts.

qmodhdr -a EXPANDKEYWORDS=NO *
qmodhdr alters the EXPANDKEYWORDS attribute of all QVCS archives accessible from the current directory.

qmodhdr <access.list -ma *
qmodhdr alters the access list for all QVCS archives accessible from the current directory to the access list defined in the access.list file.

qmodhdr -ma -comment "John,Mary,George,Sue" *
qmodhdr alters the access list for all QVCS archives accessible from the current directory to "John,Mary,George,Sue". qmodhdr will not prompt for you to enter the access list. This command succeeds only if John, Mary, George, and Sue are already on the QVCS archive's modifier list.

qmodhdr -forceOnAccessList -comment "John,Mary,George,Sue" *
qmodhdr alters the access list (and modifier list) for all QVCS archives accessible from the current directory to add the given users. qmodhdr will not prompt for you to enter the user name(s) to add to the access list. This command succeeds for any user and will add that user to the access list also. This command will only add the user to the access list of a file if that user is missing from the file's access list, so it is safe to add an existing user to the access list of a file. This command is available only from the command line.

qmodhdr -defaultbranch 1.2.1.3 foobar.c
qmodhdr alters foobar.c's QVCS archive to make the 1.2.1 branch the default branch for future QVCS commands. Subsequent QVCS commands will use the 1.2.1 branch by default instead of the TRUNK.


Command Line Utilities
qdelrevqdiffqeditqgetqidentqlockqlogqmergeqmodhdrqmodrevqputqstampqunlockqunstampqrecurse


See also: QWin's corresponding Modify Archive options.