|
You use qput to save a new revision to a QVCS archive for later retrieval using qget. You can also use qput to create a QVCS archive for an uncontrolled file. When first creating a QVCS archive, any default QVCS archive attributes can be overridden on the qput command line. To abort the put, just press the Esc key when prompted to enter the module or revision description.
If CHECKLOCK is enabled, qput will not allow you to add a revision to that QVCS archive unless you have previously locked a revision in that QVCS archive using either Qwin, qget or qlock.
When the revision that you've locked in the QVCS archive is not the newest revision on either the trunk or the default branch, qput will automatically create a new branch when you put your new revision into the QVCS archive. This "automatic" branching only works when lock-checking is enabled.
If lock-checking is not enabled, qput always stores the new revision as the newest revision on the default branch of the QVCS archive (usually as a new trunk revision).
Working with Very Large Files
When working with files of any size, qput displays a message when it's comparing the file that you're inserting into the QVCS archive to the latest revision already in the QVCS archive. For small files, the message isn't displayed for very long, and you may not even notice it. For very large files, depending on the number of differences between the two files, qput may display this "comparing files" message for quite some time. Since qput compares files in memory, there is no disk activity. As qput makes progress it rotates the character at the end of the "comparing files" message so that you'll know that your machine hasn't crashed.
Similarly with large binary files, before the file comparison, qput analyzes the work file. During this operation, it displays an "analyzing filename" message and rotates the character at the end of the message so that you'll know that it's making progress.
Command Template
qput [-forcebranch] [-create] [-l] [-noexpandaftercheckin] [-yes|-no|-proceed] [-i infilename] [-label "label string" [-floatLabel] [-labelOnChange]] [-q] [-comment "revision description"] [-a ATTRIBUTE={YES|NO}] filename
where:
-forcebranch (optional)
Use -forcebranch to create a branch point at the newest revision on the default branch. Normally, the trunk is the default branch, and -forcebranch causes a branch point to be created at the newest trunk revision. If the default branch is not the trunk, -forcebranch creates a branch point at the newest default branch revision. Using this option always creates a revision one branch further from the trunk than its parent revision. For example, if the newest trunk revision was 1.3, and the trunk was the default branch, using the -forcebranch option would cause qput to create the 1.3.1.1 revision (assuming there were no other existing branches at the 1.3 revision).
-create (optional)
Required if you want qput to create a QVCS archive for the file(s) identified by filename. If -create is omitted, qput will look for a QVCS archive associated with the specified file.
-l (optional)
The 'lock' flag allows you to immediately check out an archive (when used with -create), or to check-in your changes and keep the archive locked (when used with an existing archive).
-noexpandaftercheckin
Setting this flag will cause qput to skip the expansion of keywords in the work file after storing the new revision in the archive. This is useful if you don't want the timestamp of the work file to change after you have added the new revision.
-yes|-no|-proceed (optional)
If qput finds the revision being stored identical to the existing tip revision in the QVCS archive, these command line options provide qput with the answer to whether or not qput should create a new revision anyway. Specifying a response on the command line will cause qput not to prompt you for an answer during execution. -yes means to create a new revision anyway; -no and -proceed mean not to create a new revision. In all cases, any existing revision lock will be removed.
-i infilename (optional)
Specifies the name of the source file that will be added as the latest revision to the QVCS archive associated with filename. By default, if you don't use this switch, the name of the input file is assumed to be the same as filename. The infilename can include the wildcard character * if the filename also has the wildcard character.
-q (optional)
This is the quiet flag. It causes qput to suppress its normal informative messages.
-label "label string" (optional)
The label flag allows you to associate a label (label string) with the revision that you are checking in. Using the -label flag automatically forces the creation of a new revision, regardless of whether the revision that you are checking in is different from the previous revision.
-floatLabel (optional)
The floatLabel flag can only be used if you also use the -label flag. It indicates that the label that you are applying should "float" so that it is always associated with the tip revision of the branch containing the revision, rather than being anchored to one particular revision.
-labelOnChange (optional)
The -labelOnChange flag can only be used if you also use the -label flag. It indicates that the label will only be applied if the check-in operation creates a new revision. If there have been no changes since the last revision, the label will not be applied.
-comment "revision description" (optional)
For the creation of QVCS archives, allows you to enter the module description from the command line; for the addition of a revision to an existing QVCS archive, allows you to enter the revision description from the command line. This is especially useful when performing wildcard qput's since you won't have to enter a revision comment for each file. If used with an embedded $Comment$ keyword, the command line revision comment will prefix any embedded $Comment$'s that may be present in the work file.
If the -comment option is absent, qput will prompt you to enter a description for the revision that you are entering. After you've entered the revision description, use CTRL-A to terminate entry of the description.
-a ATTRIBUTE=YES or -a ATTRIBUTE=NO (optional)
For creation of QVCS archives, overrides the current defaults. For QVCS archive creates, qput recognizes all QVCS attributes. When adding a revision to an existing QVCS archive, qput only allows the PROTECTWORKFILE and DELETEWORK attributes to be overridden.
filename (required)
The work file associated with the QVCS archive to which you are adding a revision.
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
qput -create foobar.c
creates the QVCS archive for foobar.c. Prompts you to enter a description for the foobar.c module.
qput foobar.c
uses the work file foobar.c to add a new revision to foobar.c's QVCS archive on the current default branch. qput prompts you for a description of the revision.
qput -i poohbar.c foobar.c
uses the file poohbar.c to add a new revision to foobar.c's QVCS archive on the current default branch. qput prompts you for a description of the revision.
qput -a PROTECTWORKFILE=NO foobar.c
the -a switch keeps qput from write protecting foobar.c after the revision has been added to the QVCS archive.
qput <revision.description foobar.c
adds foobar.c from the current directory to foobar.c's QVCS archive as the latest revision. qput gets the revision description from the revision.description file.
qput <revision.description *.c
for each QVCS archive accessible from the current directory that has a work file name with a .c extension, adds a new revision to that QVCS archive using the associated work file found in the current directory. Reads the revision description from the revision.description file.
qput -forcebranch -comment "A new branch" foobar.c
creates a new branch beginning at the newest revision on the default branch. Uses the "A new branch" string for the revision comment.
Command Line Utilities
See also: QWin's corresponding Check-In and Add tools.
|