CVS believes everyone has heard of it, but there are a number of issues with this widely used version control tool, including Chinese support and binary file processing, which are more or less problematic.
Well now, the CVS author has developed SVN for us. The GNOME and KDE development teams have already swapped svn, why don't you try it. The most basic usage
Build code base svnadmin create/path/to/repos
Import data svn import/path/to/project file::///path/to/repos-m "initial imp ORT "
Export data svn checkout File::///path/to/repos
submit Update svn commit filename
Add File svn add
Delete file SVN delele
Copy files svn copy
Mobile files svn move
query status SVN status
check different svn diff
with Step working Directory SVN update
merge code SVN merge;svn resolve
SVN's related resourcesThis is the SVN project site.
<<version control with Subversion>> ebook.
This is a traditional Chinese svn document (only partially translated). CVs that cannot be mentioned
Although I've moved to SVN, CVS is still one of the most widely used version control software. Here's a collection of resources for CVS.
Installation and configuration of CVSD CVS usage Introduction
(Note: This is oscargreat collation of information, I take it to believe he will not mind:) what is CVS CVS (cocurrent version Systems, Concurrent edition system) is a C/S mode version control system, used in software development process to record the file version, coordinate the developer to ensure the synchronization of the files, so that the project is properly parallel development, and support version rollback, bug Tracing and patch generation. CVS can be used to effectively manage and organize the source code and development documentation for software development.
The working mode of CVS: The basic working mode of CVS is as follows:
CVS Server (Code document Library)
/| /
(version sync)/| /Developer
1 developer 2 Developer 3
CVS maintains the Code document library on the server side, and different developers build the corresponding code tree on the local machine and use CVS to keep the local code document consistent with the Code document library. CVS reports and assists in resolving conflict code consolidation issues when multiple developers are simultaneously modifying a file to cause a local conflict with a code file in the library. The use of CVS by ordinary developers (not administrators) is as follows:
Check out (get) --------------------Merge (merge) | | ^ v v
Conflict (conflict) | Modify (Modify)-> update (update) ----------------
^ | | | No Conflict (no conflict) | v Update (update) <- Commit (Submit)
|
v Export (export)
The check out command only needs to be used once when the local code tree is started, and then the local code is updated with the update command. The update command compares the differences between the server and the local code base and updates the outdated files in the local code tree automatically. Once you have finished modifying your code, you will need to use the Update command to get code that someone else is modifying in parallel before submitting the code. If there is a conflict (that is, the same file has been modified at the same time), CVS will keep both in the local code and mark them out, requiring the developer to handle the conflict. Use the commit command to update the server code to local code in cases where the conflict does not exist or has been resolved. CVS requires that you provide comments for the changes and automatically process the version number for the updated file. When the software needs to be officially released, export the source code tree that does not contain the CVS settings information.
The CVS administrator also uses commands such as INIT, import, admin, and so on to configure and set up the server and code base. CVS use of clients under Linux
A variety of ide/editor under Linux, such as Emacs,eclipse, provide support for CVS, but the command line based CVS operations are the most basic and flexible. The following describes the use of the CVS command line. Environment Variables
cvsroot Specify the location of the code base if the CVS code base is on the local machine, You can specify the path to the code base directly, such as: export cvsroot=/path/to/ Cvsroot If the CVS code base is on the server, you need to specify the server location, how to communicate and user information, in the form of: Cvsroot=:method:username@cvs.server.address#port:/path/to/cvsroot For example: export cvsroot=:ext:
Horn@166.111.55.119:/cvs/horn where ext specifies that the SSH protocol is used, horn is authorized to access the corresponding directory of the server
users. The value of cvsroot can be redefined on the command line with the-D option, such as:
cvs-d/cvs/horn Update
Cvs_rsh the protocol that specifies the client Access server
uses the SSH protocol, you can set the following:
export cvs_rsh=ssh
Basic Commands
The CVS command line format is:
CVS [options] command [options] filename
Specific parameters can refer to info CVS
The CVS command always takes the current directory as the object of operation if it is not with parameters.
The following describes the basic commands:
Initialization of the Init CVS code base, which is used by administrators.
cvs-d/cvs/horn Init
initializes/cvs/horn to a code base
import Import a project/module that the administrator uses. CVS import-m "comments" project_name Vendor_tag Release_tag after execution, All files and directories under the current directory are imported into the
/path/to/cvsroot/project_name directory. Vender_tag: Developer Logo Release_tag: Initial version Mark
If the -m parameter is not added, CVS will automatically start VI, requiring a comment to be entered. such as: cd/home/horn/blob-2.05/ CVS import blob hornworks initversion
Checkout/co gets code from the server, builds the code tree locally,
CVS checkout project_name
Update/up Sync local files to the latest version of
CVS update filename
does not specify a filename, CVS will file all subdirectories under the current directory. As mentioned earlier,
you should update before and after you commit each day to ensure that the
local code is always up to date and that there is no conflict with the server's code.
commit/ci synchronize the changes to the CVS repository CVS Commit-m "write some comments here" file_name &
Many of the actions of nbsp; CVS were finalized and modified by CVS commit. before confirmation, users are also required to fill in the revision notes to help other developers
understand the reason for the change.
add Add files/directories to the project CVS Add new_file before adding files, you should first create the files before you add them using CVS Add. Add file operations are actually added to the code base only after a CVS commit in. For items that are not plain text, such as pictures, Word documents, you need to use the CVS add-kb options are imported in binary file mode (
K indicates extended options, B indicates binary), otherwise the file may be corrupted.
remove/rm Remove files from Project CVS Remove file_name Delete, you should first delete a source file after physical deletion,
Use the Remove command again. For example: RM file_name CVS remove file_name
then commit to confirm deletion. can also be combined with the-f parameter to combine two steps: CVS remmove-f file_name CVS commit-m "Why delete file" CVS does not allow deletion of directories, and empty directories are automatically ignored by options when you update.
Log/history View modify history
CVS log file_name
Diff View the difference between different versions of a file
CVS diff-r1.3-r1.5 file_name
View 1.3 version 1.5 version of the difference
CVS diff file_name
View the differences between local and library files
tag tag version number CVS Tag release_version CVS automatically maintains the version number of each file, each time the file is modified, its version The number automatically increases. This version number cannot be used as a staged release.
The tag command marks a uniform release number for all files in the current directory. such as: CD blob/ CVS Tag 2.1.0-hornworks
Tag command shall be assigned and used uniformly by the project leader.
Export project release, exporting each directory of the source file local code tree without a CVS directory
, CVS creates a cvs/directory to record
the corresponding information between the current directory and the CVS repository. Export can derive
a code tree that does not contain a CVS directory.
CVS export-r release project_name
export version number is marked with code
CVS export-d 2 0021023 PROJECT_NAME
Exports the latest files as of 2002.10.23