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).
-
-mmessage Provide a log message.
-
-Ffilename 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: ...Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access