Committing Changes to the Repository
Files are edited in the sandbox, but
changes to the sandbox have no effect on the repository until they
are committed. The cvs commit
command uploads
changes from the sandbox to the repository. After determining which
files need to be changed in the repository, cvs
commit
opens an editor and expects you to enter a log
message.
Tip
Section 3.1.3 earlier in this chapter explains how to change the default editor.
The syntax of cvs commit
is:
cvs [cvs-options
] commit [command-options
] [filename
]
cvs commit
has only a few options:
-
-l
Perform a local, nonrecursive commit operation on the current working directory only.
-
-R
Perform a recursive commit operation on all subdirectories, as well as the current directory (default).
-
-m
message
Provide a log message.
-
-F
filename
Provide a log message from the specified file.
-
-r revision
Set an updated revision number (not recommended for novice users).
Example 3-3 shows a typical cvs
commit
. The vertical ellipsis denotes the point at which
CVS normally calls the editor. Example 3-4 shows the
default text displayed in the editor and the log message for this
commit.
Example 3-3. Using cvs commit
/home/jenn/cvs/wizzard$ cvs commit
cvs commit: Examining . cvs commit: Examining doc cvs commit: Examining lib cvs commit: Examining man cvs commit: Examining src . . . RCS file: /var/lib/cvs/wizzard/src/main.c,v done Checking in src/main.c; /var/lib/cvs/wizzard/src/main.c,v <-- main.c initial revision: 1.1 done RCS file: ...
Get Essential CVS now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.