Next: Checking out a version, Previous: Adding version commentary, Up: Basic Use
To check in a new project version of project P1, use the command
% prcs checkin P1
If there is only one .prj file in the current directory, you may
even leave off the P1
argument. This command looks at the file
P1.prj to find out the major version of P1 from which the current
working files were copied and adds a new minor version to it. In this
case, since P1.prj records no major version name, prcs uses
the default major version name, `0'. Thus, this check-in will create
version 0.1 (minor version 1 of major version 0) of P1. The command
prcs checkin
modifies P1.prj, before checking it in, to
look something like this:
;; -*- Lisp -*- (Created-By-Prcs-Version 0 13 8) (Project-Description "Sample PRCS Project") (Project-Version P1 0 1) (Parent-Version P1 0 0) (Version-Log "checkin main.c and doc/foobar.1") (New-Version-Log "") (Checkin-Time "Sun, 31 Dec 1995 02:10:24 -0700") (Checkin-Login jmacd) (Populate-Ignore ()) (Files (main.c (P1/0_main.c 1.1 644)) (doc/foobar.1 (P1/0_foobar.1 1.1 644)) ) (Merge-Parents) (New-Merge-Parents)
As you can see, prcs has added the version identification, a timestamp, a record of the account performing the checkin, and some internal identification information about the two files now in the project. It has also changed the New-Version-Log declaration to the Version-Log (which is removed when you modify this version and check-in a new one).
Your working directory now contains copies of the files in version 0.1 of P1. You might now add a new working file, say header.h, and modify main.c. You add the line
(header.h ())
to the Files list. You will also want to create a New-Version-Log entry and perform another checkin. The new version (0.2) of P1.prj might now contain
;; -*- Lisp -*- (Created-By-Prcs-Version 0 13 8) (Project-Description "Sample PRCS Project") (Project-Version P1 0 2) (Parent-Version P1 0 1) (Version-Log "") (New-Version-Log "") (Checkin-Time "Sun, 31 Dec 1995 02:13:00 -0700") (Checkin-Login jmacd) (Populate-Ignore ()) (Files (main.c (P1/0_main.c 1.2 644)) (doc/foobar.1 (P1/0_foobar.1 1.1 644)) (header.h (P1/0_header.h 1.1 644)) ) (Merge-Parents) (New-Merge-Parents)
The files of version 0.2 of P1 have now been saved; you may destroy
the working directory and later restore it with prcs checkout
.
It is not necessary to check in all your working files. By providing a list of files and directories after the project specifier, you can limit the working files considered to those listed:
% prcs checkin P1 doc
copies only the working files in doc into the new version of P1; for other files listed in P1.prj, prcs uses the versions identified by the internal file identifiers in the Files list of P1.prj. Thus, if these identifiers are unchanged in your working P1.prj file since it was checked out, the same files versions that they identify will be used in the new version of P1 (the working versions, however, may differ in the values of certain keywords. See Keywords.)