⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rcsintro.1

📁 早期freebsd实现
💻 1
字号:
.de Id.ds Rv \\$3.ds Dt \\$4...Id $Id: rcsintro.1,v 5.1 1991/04/21 12:00:46 eggert Exp $.ds r \&\s-1RCS\s0.if n .ds - \%--.if t .ds - \(em.am SS.LP...TH RCSINTRO 1 \*(Dt GNU.SH NAMErcsintro \- introduction to RCS commands.SH DESCRIPTIONThe Revision Control System (\*r) manages multiple revisions of files.\*r automates the storing, retrieval, logging, identification, and mergingof revisions.  \*r is useful for text that is revised frequently, for exampleprograms, documentation, graphics, papers, and form letters..PPThe basic user interface is extremely simple.  The novice only needsto learn two commands:.BR ci (1)and.BR co (1)..BR ci ,short for \*(lqcheck in\*(rq, deposits the contents of afile into an archival file called an \*r file.  An \*r filecontains all revisions of a particular file..BR co ,short for \*(lqcheck out\*(rq, retrieves revisions from an \*r file..SS "Functions of \*r".IP \(buStore and retrieve multiple revisions of text.  \*r saves all oldrevisions in a space efficient way.Changes no longer destroy the original, because theprevious revisions remain accessible.  Revisions can be retrieved according toranges of revision numbers, symbolic names, dates, authors, andstates..IP \(buMaintain a complete history of changes.\*r logs all changes automatically.Besides the text of each revision, \*r stores the author, the date and time ofcheck-in, and a log message summarizing the change.The logging makes it easy to find outwhat happened to a module, without having to comparesource listings or having to track down colleagues..IP \(buResolve access conflicts.  When two or more programmers wish tomodify the same revision, \*r alerts the programmers and prevents onemodification from corrupting the other..IP \(buMaintain a tree of revisions.  \*r can maintain separate lines of developmentfor each module.  It stores a tree structure that represents theancestral relationships among revisions..IP \(buMerge revisions and resolve conflicts.Two separate lines of development of a module can be coalesced by merging.If the revisions to be merged affect the same sections of code, \*r alerts theuser about the overlapping changes..IP \(buControl releases and configurations.Revisions can be assigned symbolic namesand marked as released, stable, experimental, etc.With these facilities, configurations of modules can bedescribed simply and directly..IP \(buAutomatically identify each revision with name, revision number,creation time, author, etc.The identification is like a stamp that can be embedded at an appropriate placein the text of a revision.The identification makes it simple to determine whichrevisions of which modules make up a given configuration..IP \(buMinimize secondary storage.  \*r needs little extra space forthe revisions (only the differences).  If intermediate revisions aredeleted, the corresponding deltas are compressed accordingly..SS "Getting Started with \*r"Suppose you have a file.B f.cthat you wish to put under control of \*r.If you have not already done so, make an \*r directory with the command.IP.B "mkdir  RCS".LPThen invoke the check-in command.IP.B "ci  f.c".LPThis command creates an \*r file in the.B RCSdirectory,stores.B f.cinto it as revision 1.1, anddeletes.BR f.c .It also asks you for a description.  The descriptionshould be a synopsis of the contents of the file.  All later check-incommands will ask you for a log entry, which should summarize thechanges that you made..PPFiles in the \*r directory are called \*r files;the others are called working files.To get back the working file.B f.cin the previous example, use the check-outcommand.IP.B "co  f.c".LPThis command extracts the latest revision from the \*r fileand writesit into.BR f.c .If you want to edit.BR f.c ,you must lock it as you check it out with the command.IP.B "co  \-l  f.c".LPYou can now edit.BR f.c ..PPSuppose after some editing you want to know what changes that you have made.The command.IP.B "rcsdiff  f.c".LPtells you the difference between the most recently checked-in versionand the working file.You can check the file back in by invoking.IP.B "ci  f.c".LPThis increments the revision number properly..PPIf.B cicomplains with the message.IP.BI "ci error: no lock set by " "your name".LPthen you have tried to check in a file even though you did notlock it when you checked it out.Of course, it is too late now to do the check-out with locking, becauseanother check-out wouldoverwrite your modifications.  Instead, invoke.IP.B "rcs  \-l  f.c".LPThis command will lock the latest revision for you, unless somebodyelse got ahead of you already.  In this case, you'll have to negotiate withthat person..PPLocking assures that you, and only you, can check in the next update, andavoids nasty problems if several people work on the same file.Even if a revision is locked, it can still be checked out forreading, compiling, etc.  All that lockingprevents is a.I "check-in"by anybody but the locker..PPIf your \*r file is private, i.e., if you are the only person who is goingto deposit revisions into it, strict locking is not needed and youcan turn it off.If strict locking is turned off,the owner of the \*r file need not have a lock for check-in; all othersstill do.  Turning strict locking off and on is done with the commands.IP.BR "rcs  \-U  f.c" "     and     " "rcs  \-L  f.c".LPIf you don't want to clutter your working directory with \*r files, createa subdirectory called.B RCSin your working directory, and move all your \*rfiles there.  \*r commands will look first into that directory to findneeded files.  All the commands discussed above will still work, without anymodification.(Actually, pairs of \*r and working files can be specified in three ways:(a) both are given, (b) only the working file is given, (c) only the\*r file is given.  Both \*r and working files may have arbitrary path prefixes;\*r commands pair them up intelligently.).PPTo avoid the deletion of the working file during check-in (in case you want tocontinue editing or compiling), invoke.IP.BR "ci  \-l  f.c" "     or     " "ci  \-u  f.c".LPThese commands check in.B f.cas usual, but perform an implicitcheck-out.  The first form also locks the checked in revision, the second onedoesn't.  Thus, these options save you one check-out operation.The first form is useful if you want to continue editing,the second one if you just want to read the file.Both update the identification markers in your working file (see below)..PPYou can give.B cithe number you want assigned to a checked inrevision.  Assume all your revisions were numbered 1.1, 1.2, 1.3, etc.,and you would like to start release 2.The command.IP.BR "ci  \-r2  f.c" "     or     " "ci  \-r2.1  f.c".LPassigns the number 2.1 to the new revision.From then on,.B ciwill number the subsequent revisionswith 2.2, 2.3, etc.  The corresponding.B cocommands.IP.BR "co  \-r2  f.c" "     and     " "co  \-r2.1  f.c".PPretrieve the latest revision numbered.RI 2. xand the revision 2.1,respectively..B cowithout a revision number selectsthe latest revision on the.IR trunk ,i.e. the highestrevision with a number consisting of two fields.  Numbers with more than twofields are needed for branches.For example, to start a branch at revision 1.3, invoke.IP.B "ci  \-r1.3.1  f.c".LPThis command starts a branch numbered 1 at revision 1.3, and assignsthe number 1.3.1.1 to the new revision.  For more information aboutbranches, see.BR rcsfile (5)..SS "Automatic Identification"\*r can put special strings for identification into your source and objectcode.  To obtain such identification, place the marker.IP.B "$\&Id$".LPinto your text, for instance inside a comment.\*r will replace this marker with a string of the form.IP.BI $\&Id: "  filename  revision  date  time  author  state  " $.LPWith such a marker on the first page of each module, you canalways see with which revision you are working.\*r keeps the markers up to date automatically.To propagate the markers into your object code, simply putthem into literal character strings.  In C, this is done as follows:.IP.ft 3static char rcsid[] = \&"$\&Id$\&";.ft.LPThe command.B identextracts such markers from any file, even object codeand dumps.Thus,.B identlets you find outwhich revisions of which modules were used in a given program..PPYou may also find it useful to put the marker.B $\&Log$into your text, inside a comment.  This marker accumulatesthe log messages that are requested during check-in.Thus, you can maintain the complete history of your file directly inside it.There are several additional identification markers; see.BR co (1)fordetails..SH IDENTIFICATIONAuthor: Walter F. Tichy..brRevision Number: \*(Rv; Release Date: \*(Dt..brCopyright \(co 1982, 1988, 1989 by Walter F. Tichy..brCopyright \(co 1990, 1991 by Paul Eggert..SH "SEE ALSO"ci(1), co(1), ident(1), rcs(1), rcsdiff(1), rcsintro(1), rcsmerge(1), rlog(1).brWalter F. Tichy,\*r\*-A System for Version Control,.I "Software\*-Practice & Experience".BR 15 ,7 (July 1985), 637-654..br

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -