CVS is a C / S system that guarantees the purpose of file synchronization. Working developers pass a central version control mode as follows: System system to record file versions,
CVS server (file repository)
Developer entry can mainly introduce some integration issues for Windows. Choose 2, 6, you can use the CVS client of CVS, remote user-employed, more need to understand more, the final certificate, and the BUG tracking system
CVS Environment Initialization: Construction Administrators in CVS Environment
CVS daily use: the most common CVS command in daily development, developer administrator
CVS branch development: Items in accordance with different progress and goals
CVS user authentication: remote user authentication, security, simple administrator through SSH
CvsWeb: The web access interface of CVS greatly improves the efficiency administrator of the code version comparison
CVS Tag: Take the $ header $ joined in the code annotation to facilitate the development process
CVS VS VSS: Comparison Developer Administrator for CVS and Virsual SourceSafe
WinCVS: WinCVS certification settings certified by SSH
CVSTRAC-based group development environment Construction: tracking and Wiki communication. CVS user management and integrated bugs for web interfaces through CVSTRAC
A system 20% of the function is often able to meet 20% of the 80% of its total command options, more often, look back, see if there is an unexpected gain. Demand, CVS is no exception, the following is the most common function of CVS, which can function in the actual application process, how much do you want to learn,
CVS environment initialization
Environmental Settings: Specify path of CVS library CvsRoot
TCSH
SetENV CVSROOT / PATH / TO / CVSROOT
Bash
Cvsroot = / path / to / cvsroot export cvsroot
The settings of the remote CVS server are also mentioned later:
Cvsroot =: Ext: $ user @ texport cvsroot cvs_rshest.server.address # port: / path / to / cvsroot cvs_rsh = ssh;
Initialization: Initialization of the CVS repository.
CVS init
First import of a project
CVS Import -M "Write Some Comments Here" Project_name Vendor_Tag Release_TAG
After execution: import all source files and directories into / path / to / cvsroot / project_name directory
Vender_TAG: Development Trademark
Release_tag: Version Publishing Mark
Project Export: Export the code from CVS CVS
CVS Checkout Project_name
CVS will create output_na and VirVual SourceSafe is the CVS Update, check me directory, and put the latest version of the source code Check Out is a concept, relative to the CVS Commit. Export to the corresponding directory. This Checkout at the Check of VirVual SourceSafe
Daily use of CVS
Note: After the first export, the checkout project_name is deleted) operation. It is not to make a file in the Project_name directory of CVS Checkout, but to enter the version of the CVS file (add, modify,
Synchronize files to the latest version
CVS Update
Do not develop file names, CVS will synchronize files in all subdirectory, or make a filename / directory for synchronization cvs update file_name
It is best to solve the habit of starting with your work before working every day, and the VirVual SourceSafe is solved until the VirVual SourceSafe. If you have a conflict, you have a conflict, and automatically use the conflict part to use the import to CVS reservoir. And develop "first synchronous post-repair, there is no concept of file lock in CVS, all conflicts are modified by others and" CVS will inform you "
>>>>>>
Content On CVS Server
<<<<<<
Content in your file
>>>>>>
Mark comes out, by your conflict content.
Version conflicts are generally solved in multiple CVS. People modify a file, but this project management problem should not be expected
Confirmation modification to CVS Current
CVS commit -m "Writesome Comments Here" File_Name
Note: Many of CVS are through the CVS C file. Before confirming, you need to fill in the modification to write -m "comments" and directly confirm the `CVS COMM word editor (typically vi) requires you to write a comment. Ommit is finally confirmed and modified. It is best to modify only one annotation to help other developers understand the reason. If not IT file_name`, CVS will automatically call the default text of the system.
The quality of the comment is very important: the developers can understand well in order to not only write, but also write some meaningful content:
Wild comments, it is difficult to let other developers quickly understand: -m "bug mixed" or even -m ""
Good comments, even in Chinese: -m, add an email address check in the user registration process. "
Modifying a version comment: Each time I only confirm an indication of the specified file name, take multiple files with the same version of the CO piece. Note: File to CVS CVS CVS is a good habit, but it is inevitable sometimes MMIT CVS reservoir, the following command can allow you to modify a text
CVS Admin-M 1.3: "Write Some Comments Here" File_Name
add files
After creating a new file, such as: Touch New_File
CVS Add New_File
Note: For the picture, Word document and other non-pure text import (k represents extended options, b represents binary), this project, you need to use the CVS Add -KB option to press the credit party, otherwise it may have file destroyed
such as:
CVS add -kb new_file.gif
CVS Add -kb Readme.doc
Then confirm the modification and comment
CVS CI -M "Write Some Comments"
Delete Files
After deleting a source file, such as rm file_name
CVS RM File_Name
Then confirm the modification and comment
CVS CI -M "Write Some Comments"
The method of combining the top 2 steps above is:
CVS RM -F File_Name
CVS CI -M "why delete file"
Note: Many CVS commands have abbreviations: commit => ci; update => Up; checkout => co / get; remove => rm; add directory
CVS Add Dir_name
View modified history
CVS log file_name
CVS History file_name
View different versions of the current file
CVS Diff -r1.3 -r1.5 file_name
View the current file (may have been modified) and the difference between the corresponding files in the library
CVS DIFF file_name
CVS's web interface provides a way more CVSWEB uses convenient positioning file modifications and comparison versions, for specific installation settings, please
Correctly recovering an old version through CVS:
If you use cvs update -r1.2 file.name
This command is given to file.nam1.2 e plus a stick tag: "1.2", although your original intention just wants to return it to
The correct recovery version is: cvs Update -p -r1.2 file_name> file_name
If you accidentally add Stick Tag: Solve with CVS Update -a
Mobile file / file rename
There is no CVS Move or CVS Rename, Old_File_Name, then cvs add new_file_, because the two operations can be implemented by the first CVS Remove Name.
Delete / mobile directory
The most convenient way is to let the management directory are independent, moving to $ C, can survive independently), moving to Project_name or directly with CVS User, deleting the CVSRoot in the vsroot directory can be used as a new single directory After the modification, it is required to develop PDATE -DP synchronization. Should be a directory (because of the sub-project under the CVS project: like a tree, in fact, the person who cuts the item to re-export the project CVS Checkout
Project release export source file without cvs directory
When doing development, you may notice that each piece is used to record the corresponding CVS directory between the current directory and the CVS library. This time is derived for a TAG or date, such as: Development Directory, CVS All created a CVS / directory. There is a message in it. But when the project is released, you generally don't want to use the cvs export command to use the CVS Export command to the export process of the file directory, but Export can only
Cvs export -r release1 project_name
CVS EXPORT -D 20021023 Project_name
CVS export -d now project_name
CVS Branch: Project multi-branch synchronous development
==============================
Confirmation version milestones: Multiple files are set to a stage milestone version, which is convenient to follow the basis for branch development. Different, the project to a certain stage, you can give all the documents to the project number export project, and it is also a project.
CVS Tag Release_1_0
Start a new milestone:
CVS commit -r 2 tag all files start entering 2.x development
Note: The version number of the REVSI version of the CVS is more helpful and the published version of the package can not be maintained. Relationship. But all files use and release
Establishment of version branches
When the 2.x version release_1_0 of the development project exports a branch R, it is found that there is a problem, but 2.x and each.
Some people first export Release_1_0_patch in another directory: solve the problem of emergency in 1.0,
CVS checkout -r release_1_0_patch
Other people are still developing on the main branch of the project.
After fixing an error on the release_1_0_patch, mark a 1.0 error correction version number
CVS Tag Release_1_0_patch_1
If 2.0 considers these modifications in RELEASE_1_0_PATCH_1, it is also necessary in 2.0, or it can be modified to the current code in 2: The development directory of .0
CVS Update -j release_1_0_patch_1
CVS remote authentication: Visit CVS remotely via SSH
Using CVS itself based on PSERV code, the remote authentication of ER is cumbersome, you need to define server and user groups, user names, setting secrets.
Common login formats are as follows:
CVS -D: PServer: CVS_USER_NAME@cvs.server.address: / path / to / cvsroot login
example:
CVS -D: PServer: cvs@samba.org: / cvsroot login
Not very safe, so it is generally only authenticated as anonymity and is a better way to pass the SSH transmission. From safe consideration, set the content through the system local account over the client / etc / profile:
Cvsroot =: Ext: $ user @ CEXPORT CVSROOT CVS_RSHVS.SERVER.Address # port: / path / to / cvsroot cvs_rsh = ssh;
All clients all local users can map to the CVS server corresponding to the same name account.
such as:
The CVS server is 192.168.0192.168.0.4 if Tom is 2.3, the CVSROOT path is the / home / C machine has the same name account, then vssroot, another development client is set from 192.168.0.4:
Export cvsroot =: ext: Tom@192.168.0.3: / home / cvsroot
Export CVS_RSH = SSH
TOM can access 192.168.0.0's cvsroot directly in 192.168.0.4 (if there is permission)
CVS Checkout Project_name
CD Project_name
CVS Update
...
CVS commit
If the SSH port of the server where the CVS is not lacking, sometimes it is set: the provincial 22, or the client and CVS server side default port
: ext: $ u er 特est.server.address#port: / path / to / cvsroot
Still not, such as the following error message:
SSH: Test.Server.Address # port: name or service not known
CVS [Checkout Aborted]: End of F) Ile from Server (Consult Above Messages if Any
The solution is to do a script specified port steering (you can't use Alias, you can't find a file error):
Create a / usr / bin / ssh_cvs file: #! / Usr / bin / sh
/ PATH / TO / SSH -P 34567 "$ @"
Then: chmod x / usr / bin / ssh_cvs
And cvs_rsh = ssh_cvs; export cvs_rsh
Note: Port refers to the port of the corresponding server SSH, not the port of CVS PServer
CVSWEB: Improve file browsing efficiency
CvsWeb is the web interface of CVS, which greatly enhances the efficiency of programmers positioning modifications:
Samples can be seen: http://www.freebsd.org/cgi/cvsweb.cgi
CVSWeb Download: CVSWeb From the initial version of the person feels more convenient: Various version of the functional interface has been evolved, this is my
http://www.spaghetti-code.de/software/linux/cvsweb/
Download Unpack:
TAR ZXF CVSWeb.tgz
Put the configuration file CVSWeb.conf to a safe place (such as in the same directory with the same directory with the Apache),
Modify: cvsweb.cgi Let CGI find configuration files:
$ config = $ env {'cvsweb_config'} || '/path/to/apache/conf/cvsweb.conf';
Go to / path / to / apache / confation and modify cvsWeb.conf:
Modify the CVSROOT path settings:
% Cvsroot =
'Development' => '/ path / to / cvsroot', # <== Modify points to local cvsroot
);
By default, you do not display documents that have been deleted:
"hideattic" => "1", # <== default not displayed document
In the configuration file cvsWeb.conf, you can also set the description of the text header, you can modify $ long_intro to you need
CvsWeb can not be open to all users, so you need to use web user authentication:
Mr. is Passwd:
/ path / to / apache / bin / htpasswd -c cvsweb.passwd user
Modify httpd.conf: increase
Authname "CVS Authorization"
Authtype Basic
Authorfile /Path/to/cvsweb.passwd
Require Valid-User
CVS Tags: Who? When?
Raise $ ID $ 加 加 加 注 注 注:: file_name version time user_na2002 / 04/05 04:24:12 Chedong Exp, but a good habit, CVS can automatically explain the format of the inner me, For example: cvs_card.txt, v 1.1 Using this information to understand the final modification and modification time
CVS has no file lock mode, and VSS is simultaneously in Check Out, and the file is logged by the exporter.
CVS Update and Commit, VSS is get_lastest_version and check in
The CVS corresponding to the Check Out / undo check out of VSS is Edit and Udit
In CVS, tag automatic update features The default is how to add a binary file, which is automatically updated in CVS, which also brings a potential problem, which may cause file failure when -kb is not available. $ Header $ DATE $ This mark is closed in Virsu, you need to open through Opition, and * .txt, *. Java, *. Html ... Al SourceSafe is called Keyword Explaination, the default requires the source File Type of File Keyword Scan:
Tags common for Virsual SourceSafe and CVS:
$ Header $
$ Author $
$ Date $
$ Revision $
I suggest trying to use general keywords to ensure that the code can be easily tracked in CVS and VSS.
WinCVS
download:
CVS Windows client: Currently stable version is 1.2
http://www.wincvs.org/
SSH Windows client
http://www.networksimumity.com/openssh/
After installing the above 2 software:
WinCVS client admin ==> preference setting
1 in the general menu
Set cvsroot: username@192.168.0.123: / home / cvsroot
Set Authorization: Select SSH Server
2 port menu
Hook: Check for Alternate RSH Name
And set the path of SSH.exe E, the default is installed in C: / Program Files / NetworksImplicity / SSH / SSH.EX
You can then use WinCVS for authentication passwords for the CVS operation. All operations will jump out of the command line window to enter the server
Of course, if you feel so annoying, it is also a way to use the CVS using the public key / private key SSH certification is to generate a public key / private key pair without a password, (in the general menu).
You can choose DIFF tools: ExamDiff
download:
http://www.prestosoft.com/examdiff/examdiff.htm
Still in the WinCVS menu admin ==> Preference's WinCVS menu
Optional: Externel Diff Program
And set the path to the DIFF tool, such as: C: / Program Files / ED16I / ExamDiff.exe
When the file is sent to the file, the first time you need to select the USE EXTERNEL DIFF in the lower right corner of the window.
CVSTRAC-based group development environment
As a small group-level development environment, the version control is integrated into these systems is a very version of the version control / bug system and bug tracking system, which are very integrated, and the BUG tracking system. If the difficult thing is, after all, we can't expect Linux to have a Source Tracking Integration System.
I personally oppose the development of the household using the PServer mode, generally speaking, using cvsroo is more troublesome. Originally I planked to write a BUG tracking system that used Perl, which hangs the management of the cvsroot / passwd file on the CVS system, and even integrates remote user authentication, but if most group members use Windows guest T / Passwd certification or very It is difficult to avoid, but the CVS itself is a management interface until I discover CvStrac: a web-based bug tracking system, which includes the Wikiwiki discussion group function in the web interface.
Here, I first talk about the user authentication in CVS P: Server mode, CVS user authentication service is based on INETD CVSPSERVER STREAM TCP NOWAIT Nobllow-root = / home / cvsroot pserverody / usr / bin / cvs cvs --a
Generally at 2401 port
CVS user database is based on cvsroot / passwd file, file format:
[username]: [CRYPT_PASSWORD]: [mapping_system_user]
Since the password is used in the unixhtpasswd format extension (than the AP single method can use the standard Crypt encryption, this passwdache's Passwd file multi-a system file format is basically Apache's account mapping field), so this file is the simplest
Apache / bin / htpasswd -b myname mypassword
create. Note: The file created by htpasswd will not map the field of the system user.
E.g:
New: gebvosup / zkl2
Setup: aisqunaavoy3qw
Test: hWEPZ / BX.Redu
Map System User's Purpose In / Home / CVSROOT directory, but develops user account last resident new files for other uses for: You can create a dedicated CVS with permissions to give this user, then read on the PA file Writing permissions are mapped to the CVS user's file read and write permission issues. Service account, such as called CVS, and create different development user accounts in the SSWD file, avoiding multiple development in SSH mode
Further, you can map the user to the group's files to each other. 2 groups of users, use 2 users' permission settings to avoid 2 projects
New: gebvosup / zkl2: Proj1
Setup: AisqunaAoy3QW: Proj2
Test: hWEPZ / BX.Redu: Proj1
Cvstrac is well solved the CVSROOT / PassWwikiki AC function, etc., the D's management problem of the CGI mode, and includes bug tracking reporting system and integrated installation, and based on GNU Public License:
Installation process
Download: You can download from http://www.cvstrac.org
I use it is already compiled on Linux: cvstrac-1.1.1.bin.gz,
% gzip -d cvstrac-1.1.1.bin.gz
% chmod x cvstrac-1.1.1.bin
#mv cvstarc-1.1.1.bin / usr / bin / cvstrac
Initialization Cvstrac Database: Suppose Database Name is MyProj
In / home / cvsroot in / home / cvsroot), on / home / cvsroot, (CVS) should already be initialized, such as: cvs init
% CVSTRAC Init / Home / CvsRoot MyProj
After running, / home / cvsroohome / cvsroot / myproj.db / vsroot / write / home / cvs can be written, on redhat 8, the error in the error is set to have a MyProj.db library in the Apache user transport T, make HOME / CVSROOT / CVSROOT / Readersroot / CVSROOT / Passwd This kind of article is called Apache users and a line Web service: with CVSTRAC services, // Home / CVSROOT / C Run users should be Apache group So I am httpd.conf text
User apache
Group apache, if the Apache on the server is set to Nobody Nogroup, such as: Nobody NogRoup, then the corresponding configuration
Then I set it #chown -r apache: apache / home / cvsroot
-rw-r - r - 1 apache apache 55296 Jan 5 19:40 myproj.db
DRWXRWXR-X 3 Apache Apache 4096 Oct 24 13:04 Cvsroot /
Drwxrwxr-x 2 apache apache 4096 Aug 30 19:47 Some_proj /
Also set in / home / cvsroot / cvsroot:
CHMOD 664 Readers Writers Passwd
Create a script cvstrac in the APCHE / CGI-BIN directory:
#! / bin / sh
/ usr / bin / cvstrac CGI / Home / CVSROOT
Set the script to execute:
CHMOD X / Home / Apache / CGI-BIN / CVSTRAC
From http://cvs.server.address/cgi-bin/cvstrac/myproj to the management interface
By default login name: setup password setup
For general users from:
http://cvs.server.address/cgi-bin/cvstrac/myproj
Modify the login password, perform BUG report, etc.
More use details can be learned in use.
Remarks:
Add CVSPSERVER services in inetd:
CVSPServer Stream TCT = / Home / CvsRoot PSerP NoWait Apache / USR / BIN / CVSCVS - Allow-ROO
XIETD profile:% Cat CVSPServer
Service CVSPServer
{
Disable = no
Socket_type = stream
Wait = NO
User = apache
Server = / usr / bin / cvs
Server_Args = -f - allowow-root = / home / cvsroot pserver
LOG_ON_FAILURE = UserID
}
Note: The user here is set to the Apache purpose of this user's CVSROO under / home / cvsroot /. Yes, all users of / home / cvsroot, and must make this T / PassWD and CVSTRAC initialization generated myproj.db has read rights
For the previously mentioned WinCVS set in Perference:
CVSROOT bar input: username@ip.address.of.cvs: / home / cvsroot
Authenitation Selection: Use Passwd File On Server Side
You can export items from the server.
to sum up:
With CVS (WinCVS / CV system. Sweb / cvstrac), constitutes a relatively complete cross-platform development version of the transfers