Introduction to CVS

xiaoxiao2021-03-06  22

* What is CVS? CVS is a version control system. What is the version control system? Simply said that he can record the process of modifying the program code, there is a complete history. If you are modifying the code code, I accidentally wrote a bug, but you may have discovered more this bug for a long time. At this time, CVS can help you, find out which change in the modification, there is this bug. Perhaps You will say, then I have a program code every time, Tar is not good, of course, you can do this, but this is too wasteful! CVS change room in version, only store their DIFF file This can save a lot of space very effective. In another occasion, you can display the benefits of CVS - multiple people develop software together. CVS Support Remote Access, User and you can modify the archives he want to modify Edit's Flag, let others know that he wants to modify this file. However, a large development team must need a mailing list to communicate. Because, CVS is just a tool for managing Project, he does not Playing the role of communication. * Noun repository: Means a warehouse. In the CVS, it is the place you really store the version history. PSERVER: This is CVS used to accept the transote CVS Command. CVS has two modes, one is Local, a Remote. cvsroot: When you use CVS, you must set the cvsroot to specify, or use -d this option to specify. * Simple example - Local CVS Now I am writing CVS files, I want to use CVS to maintain these files. First, I set a cvs root. Of course, you have MKDir setenv cvsroot "/ home / clkao / cvsroot /" CVS init CVS init will initialize CVSROOT, as for what to initialize, Later, then, then open a directory to put the file mkdir / home / clkao / cvsroot / cvsdoc cd / home / clkao / work cd / home cvsdoc you will see the following message: CVS Checkout: Updating Cvsdoc CVS ​​Checkout will send the current version to your current directory. When you get the above instruction, CVS will help you build a cvsdoc directory. Remember, don't mkdir / Home / CLKAO / WORK / cvsdoc, each CVS work directory will have some other information about CVS reference. Next, enter the cvsdoc this directory, edit the file of cvs.doc, write these there is no. CVS add cvs.txt cvs commit - M "Initial Revision." CVS Add will add cvs.txt to CVS in maintenance File List. CVS Commit will send all things (cvs.txt) under the directory to Repository. -m means this Commit log message. Now modify cvs.txt, just like I continue to edit now, continue to add new content to cvs.txt, and, in the uppermost shape of the file, add / $ ID / $, after finishing, then Commit once (Note, no '/' 喔, here Slash's purpose is to avoid CVS to replace this ID. CVS commit -m "adding new stuff."

CVS log cvs.txt You will see when you change, you add Message. Think about this for the writer, the people who develop big Project, is it a great tool? CVS Diff - R 1.1 -r 1.2 cvs.txt will display the 1.1 and 1.2 version of DIFF. If you have a 1.1 version, you just need this PATCH! ? Added a generation of string text, which shows some of this version. - Remote CVS, I have to do a big project now, the Tai Children who talks, and I have to let many people develop this together. A task! Here, I will start the XCIN-2.5 CVS establishment and use of XCIN-2.5 CVS now as an example. Su root check / etc / services Do not join: CVSPSERVER 2401 / TCP #CVS Network Server CVSPServer 2401 / UDP #CVS Network Server /etc/inetd.conf Add: CVSPServer Stream TCP NOWAIT ROOT / / USR / BIN / CVS CVS -B / USR / BIN - Allow-Root / Export Pserver Mkdir / Export Adduser Anoncvs, this It is necessary to give Anonymous CVS. Group is NOGROUP. New A XCIN's Group. Adduser participates in the XCIN account, of course, set their group to XCIN CVS -D / EXPORT INIT CD / TMP / XCIN-Alpha, this is Originally existing version, now put it in the CVS. CVS IMPORT XCIN-2.5 RXP XCIN_2_5_ALPHA This will put Xcin-alpha's thing Import into /export/xcin-2.5. The following RXP is vendor tag, XCIN_2_5_Alpha It is Release Tag, Tag's use is very large, but we will say later. Note that a user wants from the remote AC CESS file, he must have appropriate permissions here. For example, the group of /export/xcin-2.5 should be XCIN, and Group Writable (this is cvs default). Now give a file from the remote access CVS maintenance file First, build a working directory on your machine, such as / home / clkao / work cd / home / clkao / work cvs -d "server: clkao@cirx.org: / export" login will appear ProMpt ask you Password , Playing. Cirx.org is the machine where Repository is located. When you get the CVS login instruction, this group of cvsroot and Encrypted passwd will be present ~ / .cvspass inside. CVS -D "Server: CLKAO@cirx.org: / export "Checkout XCIN-2.5 This will take the entire CVS MAINTAIN's things Checkout on your machine. CD XCIN-2.5 East looks at the west, found a bug. After modifying, you will go out Let's search all his maintain's entry, see which needs commitain, which requires Commit. This will probably have a narrow shape! More delicate is still behind! (Http: //www.fanqiang.com)

转载请注明原文地址:https://www.9cbs.com/read-39948.html

New Post(0)