Tools: MPW
Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Support

MPW Command Reference


CheckIn

Built-in

SYNTAX

CheckIn ([file1[,rev] [file2][,rev]… | -a] [-b | -new] [-c | -n | -y]
[-cf commentFile | -cs comment] [-delete | -m] [-p] [-project project]
[-t task] [-touch] [-u user] [-verify]) | -close | -w

DESCRIPTION

The CheckIn command allows you to return ownership of one or more files to Projector and save your changes as new revisions. Projector normally leaves you with read-only copies of the files checked in, but you can retain write-privileged copies by using -m.

You can specify the files to be returned in two ways: individually, as file1[,rev] [file2][,rev]… parameters, or by directory, using the -a option. If you use the latter method, Projector checks in all files in the current directory that have been checked out for modification or are modified read-only files.

You do not have to specify which project a file belongs to because Projector keeps track of ownership. When you check out a file, Projector puts the name of the project in the file's 'ckid' resource. This feature allows you to check in files from different projects on a single command line. To check a file into a different project (that is, not the project from which it was checked out), you must use the -project option.

When you check in a file, Projector automatically increments the revision number by one. For example, if you checked out revision 2.17 of a file, Projector makes the new revision 2.18. As with the project name, Projector stores the file's revision number in its 'ckid' resource. This means that it is not necessary to specify the revision number to check in a file.

Note
If you want to override Projector's automatic incrementation and specify a different revision number, you need only specify the revision number. For example, you checked out revision 2.17 of a file and want to check the new revision in as revision 3. The only requirement for doing this is that the new revision number be greater than that of the revision you are checking in. You can use the ProjectInfo command to check the value of the current revision number and then check the file in with its new revision number by using the file,rev notation; for example, MyFile,3. •

For each revision, Projector allows you to check in your comments on what changes have been made to the files or what tasks have been accomplished. To do this, use either the -cf commentFile or -cs comment options. The -t option allows you to supply a task comment, which is separate from the main (-cf/-cs) comment.

INPUT

None

OUTPUT

None, unless you request progress and summary information (-p).

ALIAS RESOLUTION

This command does not resolve Finder aliases that occur at the end of a pathname. If you specify a pathname for a file when you check it in, Checkin resolves any embedded folder aliases. Finder alias files are not resolved by Projector. This allows Projector to act on the Finder alias file itself, rather than its target.

STATUS

CheckIn can return the following status codes:

0

no errors

1

syntax error

2

error in processing

3

system error

PARAMETERS

file1[,rev] [file2][,rev]…

Specifies one or more files to be checked in, where file represents a filename and rev represents a revision number. If you specify only the filename of a file being checked in, Projector automatically increments the file's revision number by one. If you also specify the file's revision number, the file is checked in as the specified revision (see the note under "Description"). (See also the -a option.)

OPTIONS

-a

Checks in all files in the current directory. If you use this option instead of the file1[,rev] [file2][,rev]… parameter, Projector checks in all files in the current directory that have been checked out for modification or are modified read-only files.

-b

Checks in the file as a branch revision of the revision that was checked out. The entire set of revisions belonging to a file is called a revision tree. Normally, files are checked in as a revision belonging to the sequence of revisions on the main trunk. That is, you might check out revision 4 of a file, modify it, and check it back in at a later date, at which point it becomes revision 5.

However, sometimes you want to create another version of a revision for the purpose of parallel development. In this case, you can check in a file as a branch revision of the revision that was checked out. That is, the first branch of revision 4 is checked in as revision 4a1, the second branch as revision 4b1, and so on.

-c

Prevents the display of any confirmation dialog boxes by automatically responding with Cancel. The CheckIn command can produce confirmation dialog boxes when a file you are attempting to check in has not changed or belongs to someone else or another project.

In either case, the dialog box asks if you would like to check the file in anyway. Specifying this option prevents the file from being checked in.

-cf commentFile

Describes changes to the files in the text file commentFile instead of in a string on the command line (-cs comment). This overrides the comment you specified at checkout time, which is stored in each file's 'ckid' resource along with other information on the revision.

-close

Closes the Check In window. Note that this window remains open until it is explicitly closed. (See also -w.)

-cs comment

Describes briefly the changes made to the files in a string on the command line rather than in their own file (-cf commentFile). This overrides the comment you specified at checkout time, which is stored in each file's 'ckid' resource along with other information on the revision.

-delete

Deletes your copies of the checked-out files after checking the new revisions in.

-m

Keeps a write-privileged copy of the files for further modification.

-n

Prevents the display of any confirmation dialog boxes by automatically responding No. The CheckIn command can produce confirmation dialog boxes when a file you are attempting to check in has not changed or belongs to someone else or another project.

In either case, the dialog box asks if you would like to check the file in anyway. Note that specifying this option cancels the checkout of the file in question just as if the file had never been checked out.

-new

Adds a new file to the project.

-p

Writes progress information to standard output. If you specify -verify in conjunction with -p, Projector confirms that the verification succeeded.

-project project

Checks files into the specified project. This overrides the default in which Projector automatically checks files back into the project under which they were checked out.

-t task

Describes the task accomplished in the revisions. Note that task is a string and, as such, must be enclosed in quotation marks.

This overrides the task you specified at checkout time, which is stored in each file's 'ckid' resource along with other information on the revision.

-touch

Resets the modification date of the files to the current date before checking them in. Projector normally sets the modification date of each file to the date of its most recent modification.

-u user

Identifies the name of the current user. You must use this option if the MPW Shell variable {User} is not set or is a null string. Using this option allows you to override this variable's definition.

-verify

Verifies the checking-in process and alerts you to any loss of data (because of a data transmission error, for example). If you specify this option, CheckIn checks out a temporary copy of each file and compares it with the file that was checked in. If there are any differences, CheckIn writes an error message to diagnostic output and returns a status of 2.

If you specify -p in conjunction with this option, Projector emits a message confirming that the verification succeeded.

-w

Opens the Check In window shown below. You can use this window as an alternative to specifying the file1[,rev] [file2][,rev]… parameters and CheckIn options on the command line.

Note that this window remains open until it is explicitly closed and that it can be resized and moved to any position on the screen. The -close option can be used to close this window from the command line.


-y

Prevents the display of any confirmation dialog boxes by automatically responding Yes. The CheckIn command can produce confirmation dialog boxes when a file you are attempting to check in has not changed or belongs to someone else or another project.

In either case, the dialog box asks if you would like to check the file in anyway. Specifying this option causes Projector to proceed with the check in.

EXAMPLES

The following command line checks in file.c to the project from which it was checked out. Projector creates a new revision of file.c and leaves you with a read-only copy of the file. Because no revision number is specified, Projector simply increases the revision number by one. Projector saves the comment "added some comments" with the new revision.

CheckIn file.c -cs "added some comments"

The next command checks in two files, reading the comment from the file myComments and the task from the string parameter to -t. The new revision for interface.c is revision 5, while the new revision for file.c is the previous revision number incremented by 1.

CheckIn file.c interface.c,5 -t "Added -x option" -cf myComments

The file1.c and file2.c files need to be checked in, but you want to be able to continue modifying the files. The -m option in the command line below allows you to continue modifying your copies of the files after the check in is completed.

CheckIn "{MPW}"file1.c "{MPW}"file2.c -m

To check a new file into the project, you can use the -new option. The command below adds file.c to the current project.

CheckIn file.c -new

The following command sequence illustrates the usefulness of -b. In this case, the user checks out a write-privileged copy of the latest revision of file.c from the current project:

CheckOut file.c -project ProjectSubProjectSources -m

The user then edits the file and, using the branch option (-b), checks in the file as a branch revision of the revision that was checked out:

CheckIn file.c -project ProjectSubProjectSources -b

SEE ALSO

CheckOut

CheckOutDir

 
 


Last Updated July 2000