资源预览内容
第1页 / 共40页
第2页 / 共40页
第3页 / 共40页
第4页 / 共40页
第5页 / 共40页
第6页 / 共40页
第7页 / 共40页
第8页 / 共40页
第9页 / 共40页
第10页 / 共40页
亲,该文档总共40页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
CVS CommandsCVS Commands數位芝麻網路公司數位芝麻網路公司蔡志展蔡志展.com2001/8/182001/8/18CVS Commands add Add a new file/directory to the repository admin Administration front end for rcs annotate Show last revision where each line was modified checkout Checkout sources for editing commit Check files into the repository diff Show differences between revisions CVS Commands edit Get ready to edit a watched file editors See who is editing a watched file export Export sources from CVS, similar to checkout history Show repository access history import Import sources into CVS, using vendor branches init Create a CVS repository if it doesnt existCVS Commands log Print out history information for files login Prompt for password for authenticating server. logout Removes entry in .cvspass for remote repository. rdiff Create patch format diffs between releases release Indicate that a Module is no longer in use remove Remove an entry from the repositoryCVS Commands rtag Add a symbolic tag to a module status Display status information on checked out files tag Add a symbolic tag to checked out version of files unedit Undo an edit command update Bring work tree in sync with repository watch Set watches watchers See who is watching a fileStarting a project with CVSWhen you begin using CVS, you will probably already have several projects that can be put under CVS control. In these cases the easiest way is to use the import command. An example is probably the easiest way to explain how to use it. If the files you want to install in CVS reside in myproj, and you want them to appear in the repository as $CVSROOT/myproj, you can do this:Starting a project with CVSBuild the myproj directory tree.$ cd myproj $ cvs import -m “Imported sources“ myproj d11e start Starting a project with CVSCongratulations! If you ran that command (or something similar), youve finally done something that affects the repository. Reading over the output of the import command, youll notice that CVS precedes each filename with a single letter - in this case, “N“ for “new file“. The use of a single letter on the left to indicate the status of a file is a general pattern in CVS command output. Well see it later in checkout and update as well. ReminderYou might think that, having just imported the project, you can start working in the tree immediately. This is not the case, however. The current directory tree is still not a CVS working copy. It was the source for the import command, true, but it wasnt magically changed into a CVS working copy merely by virtue of having been imported. To get a working copy, you need to check one out from the repository. Checking Out A Working CopyThe command to check out a project is exactly what you think it is: $ cvs checkout myproj Making A Change Finding Out What You (And Others) Did “cvs update” or “cvs up”cvs updateUsage: cvs update -APdflRp -k kopt -r rev|-D date -j rev-I ign -W spec files.-A Reset any sticky tags/date/kopts.-P Prune empty directories.-d Build directories, like checkout does.-f Force a head revision match if tag/date not found.-l Local directory only, no recursion.-R Process directories recursively.-p Send updates to standard output (avoids stickiness).-k kopt Use RCS kopt -k option on checkout.-r rev Update using specified revision/tag (is sticky).-D date Set date to update from (is sticky).-j rev Merge in changes made between current revision and rev.-I ign More files to ignore (! to reset).-W spec Wrappers specification line.Status of fileU file The file was brought up to date with respect tothe repository. This is done for any file thatexists in the repository but not in your source,and for files that you havent changed but arenot the most recent versions available in therepository.A file The file has been added to your private copy ofthe sources, and will be added to the sourcerepository when you run cvs commit on thefile. This is a reminder to you that the fileneeds to be committed.Status of fileR file The file has been removed from your private copyof the sources, and will be removed from thesource repository when you run cvs commit onthe file. This is a reminder to you that thefile needs to be committed.M file The file is modified in your working directory.M can indicate one of two states for a fileyoure working on: either there were no modificationsto the same file in the repository, sothat your file remains as you last saw it; orthere
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号