CVS 命令集

1. Command List

CommandSynonymsSummary
addad,newAdd a new file/directory to the repository.
adminadm,rcsAdministration front end for rcs.
annotateannShow last revision where each line was modified.
authserver Authentication server mode.
chaclsetacl,setpermChange the Access Control List for a directory.
checkoutco,getCheckout sources for editing.
chownsetownerChange the owner of a directory.
commitci,comCheck files into the repository.
diffdi,difShow differences between revisions.
edit Get ready to edit a watched file.
editors See who is editing a watched file.
exportexp,exExport sources from CVS, similar to checkout.
historyhi,hisShow repository access history.
importim,impImport sources into CVS, using vendor branches.
init Create a CVS repository if it doesn't exist.
info Display information about all supported protocols.
logloPrint out history information for files.
loginlogon,lgnPrompt for password for authenticating server.
logout Removes entry in password cache for remote repository.
lsdir,listList directories on the server.
lsacllsattr,listpermList the directories' Access Control List.
passwdpassword,setpassSet password and administer users.
rannotaterann,raShow last revision where each line of module was modified.
rdiffpatch,paCreate 'patch' format diffs between releases.
releasere,relIndicate that a Module is no longer in use.
removerm,deleteRemove an entry from the repository.
rlogrlPrint out history information for a module.
rtagrt,rfreezeAdd a symbolic tag to a module.
server Server mode.
statusst,statDisplay status information on checked out files.
tagta,freezeAdd a symbolic tag to checked out version of files.
unedit Undo an edit command.
updateup,updBring work tree in sync with repository.
versionve,verShow current CVS version(s).
watch Set watches.
watchers See who is watching a file.

2. add

cvs add [-k rcs-kflag] [-m message] files...

  • -kUse "rcs-kflag" to add the file with the specified kflag
    -mUse "message" for the creation log.

3. admin

cvs admin [options] files...
THIS COMMAND BYPASSESS NORMAL CVS OPERATIONS. DO NOT USE THIS COMMAND UNLESS YOU KNOW THE CONSEQUENCES OF USING IT.

  • -kSet keyword expansion flags:
    Valid flags are one of: 
     tText file (default).
     bBinary file (merges not allowed).
     BBinary file using binary deltas (merges not allowed).
     uUnicode (UCS-2) file.
     {...}Extended encoding type.
    Followed by any of: 
     kSubstitute keyword.
     vSubstitute value.
     lGenerate lockers name.
     oCheckout literally - don't expand keywords.
     LGenerate Unix line endings on checkout.
     zCompress deltas in RCS file.
    -l [rev]Lock revision (latest revision on branch, latest revision on trunk if omitted). DEPRECATED - USE 'edit -c'
    -m rev:msgReplace revision's log message.
    -o rangePhysically delete (outdate) specified range of revisions:
     rev1:rev2Between rev1 and rev2, including rev1 and rev2.
     rev1::rev2Between rev1 and rev2, excluding rev1 and rev2.
     rev:rev and following revisions on the same branch.
     rev::After rev on the same branch.
     :revrev and previous revisions on the same branch.
     ::revBefore rev on the same branch.
     revJust rev.
    -qRun quietly.
    -t [file]Get descriptive text from file (stdin if omitted).
    -t-stringSet descriptive text.
    -u [rev]Unlock the revision (latest revision on branch, latest revision on trunk if omitted).

4. annotate

cvs annotate [-lRf] [-r rev] [-D date] [files...]

  • -lLocal directory only, no recursion.
    -RProcess directories recursively.
    -fUse head revision if tag/date not found.
    -r revAnnotate file as of specified revision/tag.
    -D dateAnnotate file as of specified date.

More info at CvsChapter87.

5. chacl

cvs chacl -R [-r tag] {user|default}:[{[r][w][c]|[n]}] [directory...]

 

  • -RRecursively set permissions
    -r tagSet permissions on specific branch

6. checkout

cvs checkout [-ANPRcflnps] [-r rev] [-D date] [-d dir] [-j rev1] [-j rev2] [-k kopt] modules...

  • -AReset any sticky tags/date/kopts.
    -NDon't shorten module paths if -d specified.
    -PPrune empty directories.
    -RProcess directories recursively.
    -cShow the contents of the CVSROOT/modules file.
    -fForce a head revision match if tag/date not found.
    -lLocal directory only, not recursive.
    -nDo not run module program (if any).
    -pCheck out files to standard output (avoids stickiness).
    -sLike -c, but include module status.
    -r revCheck out revision or tag. (implies -P) (is sticky)
    -D dateCheck out revisions as of date. (implies -P) (is sticky)
    -d dirCheck out into dir instead of module name.
    -k koptUse RCS kopt -k option on checkout. (is sticky)
    -j revMerge in changes made between current revision and rev.

7. chown

cvs chown user directory...

8. commit

cvs commit [-nRlf] [-m msg | -F logfile] [-r rev] files...

  • -DAssume all files are touched & send to the server for checking
    -nDo not run the module program (if any).
    -RProcess directories recursively.
    -lLocal directory only (not recursive).
    -fForce the file to be committed; disables recursion.
    -F logfileRead the log message from file.
    -r revCommit to this branch or trunk revision.
    -cCheck for valid edits before committing.

9. diff

cvs diff [-lNR] [rcsdiff-options] [[-r rev1 | -D date1] [-r rev2 | -D date2]] [files...]

  • -lLocal directory only, not recursive.
    -RProcess directories recursively.
    -D d1Diff revision for date against working file.
    -D d2Diff rev1/date1 against date2.
    -NInclude diffs for added and removed files.
    -r rev1Diff revision for rev1 against working file.
    -r rev2Diff rev1/date1 against rev2.
    --ifdef=argOutput diffs in ifdef format.
    -cContext diff
    -uUnified diff

10. edit

cvs edit [-cflR] [files...]

  • -cCheck that working files are unedited.
    -fForce edit if working files are edited (default).
    -lLocal directory only, not recursive.
    -RProcess directories recursively (default).
    -aSpecify what actions for temporary watch, one of edit,unedit,commit,all,none
    -zStore base revisions in compressed (.gz) format.

11. editors

cvs editors [-lR] [files...]

  • -lProcess this directory only (not recursive).
    -RProcess directories recursively.

12. export

cvs export [-NRfln] [-r rev] [-D date] [-d dir] [-k kopt] module...

  • -NDon't shorten module paths if -d specified.
    -fForce a head revision match if tag/date not found.
    -lLocal directory only, not recursive.
    -RProcess directories recursively (default).
    -nDo not run module program (if any).
    -r revExport revision or tag.
    -D dateExport revisions as of date.
    -d dirExport into dir instead of module name.
    -k koptUse RCS kopt -k option on checkout.

13. history

cvs history [-report] [-flags] [-options args] [files...]

  • Reports:
    -TProduce report on all TAGs.
    -cCommitted (Modified) files.
    -oChecked out modules.
    -m moduleLook for specified module (repeatable)
    -x [type][TOEFWUCGMAR] Extract by record type .
    -eEverything (same as -x, but all record types).
    Flags:
    -aAll users (Default is self).
    -lLast modified (committed or modified report).
    -wWorking directory must match.
    Options:
    -D dateSince date (Many formats).
    -b strBack to record with str in module/file/repos field.
    -f fileSpecified file (same as command line) (repeatable).
    -n moduleIn module (repeatable).
    -p repoIn repository (repeatable).
    -r revSince rev or tag (looks inside RCS files!).
    -t tagSince tag record placed in history file (by anyone).
    -u userFor user name (repeatable).
    -z timezoneOutput for time zone <> (e.g. -z -0700).

14. import

cvs import [C] [-d] [-f] [-k subst] [-I ign] [-m msg] [-b branch] [-W spec] [-n] repository [vendor-tag] [release-tags...]

  • -CCreate CVS directories while importing.
    -dUse the file's modification time as the time of import.
    -fOverwrite existing release tags.
    -k subSet default RCS keyword substitution mode.
    -I ignMore files to ignore (! to reset).
    -b braVendor branch id.
    -m msgLog message.
    -W specWrappers specification line.
    -nDon't create vendor tag.

15. init

cvs init

16. info

cvs info [protocol]

17. log

cvs log [-lRhtNb] [-r[revisions]] [-d dates] [-s states] [-w[logins]] [files...]

  • -lLocal directory only, no recursion.
    -ROnly print name of RCS file.
    -hOnly print header.
    -tOnly print header and descriptive text.
    -NDo not list tags.
    -bOnly list revisions on the default branch.
    -r [revisions]Specify revision(s)s to list:
     rev1:rev2Between rev1 and rev2, including rev1 and rev2.
     rev1:rev2Between rev1 and rev2, excluding rev1 and rev2.
     rev:rev and following revisions on the same branch.
     rev::After rev on the same branch.
     :revrev and previous revisions on the same branch.
     ::revBefore rev on the same branch.
     revJust rev.
     branchAll revisions on the branch.
     branch.The last revision on the branch.
    -d datesSpecify dates (D1<D2 for range, D for latest before).
    -s statesOnly list revisions with specified states.
    -w [logins]Only list revisions checked in by specified logins.
    -xcvsnt 2.x compatible output (default).
    -Xcvs 1.x/RCS 5.7 compatible output.

18. login

cvs login

19. logout

cvs logout

20. ls

cvs ls [-q] [-e] [-l] [-R] [-r rev] [-D date] [modules...]

  • -qQuieter Output.
    -eDisplay in CVS/Entries format.
    -lDisplay all details.
    -RList recursively.
    -r revShow files with revision or tag.
    -D dateShow files from date.

21. lsacl

cvs lsacl [directory...]

22. passwd

cvs passwd [-a] [-x] [-X] [-r real_user] [-R] [-D domain] [username]

  • -aAdd user.
    -xDisable user.
    -XDelete user.
    -rAlias username to real system user.
    -RRemove alias to real system user.
    -DUse domain password (Win32 only).

23. authserver

cvs authserver

Normally invoked by a cvs client on a remote machine.

24. rannotate

cvs rannotate [-lRf] [-r rev] [-D date] [files...]

  • -lLocal directory only, no recursion.
    -RProcess directories recursively.
    -fUse head revision if tag/date not found.
    -r revAnnotate file as of specified revision/tag.
    -D dateAnnotate file as of specified date.

25. rdiff

cvs rdiff [-flR] [-c|-u] [-s|-t] [-V %d] -r rev|-D date [-r rev2 | -D date2] modules...

  • -fForce a head revision match if tag/date not found.
    -lLocal directory only, not recursive.
    -RProcess directories recursively.
    -cContext diffs (default).
    -uUnidiff format.
    -sShort patch - one line per file.
    -tTop two diffs - last change made to the file.
    -D dateDate.
    -r revRevision - symbolic or numeric.
    -V versUse RCS Version "vers" for keyword expansion.

26. release

cvs release [-d [-f]] [-e] directories...

  • -dDelete the given directory.
    -fDelete the directory even if non-cvs files still exist.
    -eOnly delete the administrative (CVS) directories.

27. remove

cvs remove [-flR] [files...]

  • -fDelete the file before removing it.
    -lProcess this directory only (not recursive).
    -RProcess directories recursively.

28. rlog

cvs rlog [-lRhtSNb] [-r[revisions]] [-d dates] [-s states] [-w[logins]] [files...]

  • -lLocal directory only, no recursion.
    -ROnly print name of RCS file.
    -hOnly print header.
    -tOnly print header and descriptive text.
    -NDo not list tags.
    -bOnly list revisions on the default branch.
    -r [revisions]Specify revision(s)s to list:
     rev1:rev2Between rev1 and rev2, including rev1 and rev2.
     rev1:rev2Between rev1 and rev2, excluding rev1 and rev2.
     rev:rev and following revisions on the same branch.
     rev::After rev on the same branch.
     :revrev and previous revisions on the same branch.
     ::revBefore rev on the same branch.
     revJust rev.
     branchAll revisions on the branch.
     branch.The last revision on the branch.
    -d datesSpecify dates (D1<D2 for range, D for latest before).
    -s statesOnly list revisions with specified states.
    -w [logins]Only list revisions checked in by specified logins.

29. rtag

cvs rtag [-abdFflnR] [-r rev|-D date] tag modules...

  • -aClear tag from removed files that would not otherwise be tagged.
    -bMake the tag a "branch" tag, allowing concurrent development.
    -BAllow branch tag to be moved/deleted.
    -dDelete the given tag.
    -FMove tag if it already exists.
    -fForce a head revision match if tag/date not found.
    -lLocal directory only, not recursive.
    -m descDescribe tag.
    -MCreate 'magic' branch.
    -nNo execution of 'tag program'.
    -RProcess directories recursively.
    -r revExisting revision/tag.
    -D dateExisting date.

30. server

cvs server

31. status

cvs status [-vlR] [files...]

  • -vVerbose format; includes tag information for the file.
    -lProcess this directory only (not recursive).
    -RProcess directories recursively.
    -qDisplay a quick summary of each file (send more for increased terseness).
    -xcvsnt 2.x compatible output (default).
    -Xcvs 1.x compatible output.

32. tag

cvs tag [-bcdFflR] [-r rev|-D date] tag [files...]

  • -bMake the tag a "branch" tag, allowing concurrent development.
    -BAllow branch tag to be moved/deleted.
    -cCheck that working files are unmodified.
    -dDelete the given tag.
    -FMove tag if it already exists.
    -fForce a head revision match if tag/date not found.
    -lLocal directory only, not recursive.
    -mDescribe tag.
    -M descCreate 'magic' tag.
    -RProcess directories recursively.
    -r revExisting revision/tag.
    -D dateExisting date.

33. unedit

cvs unedit [-lR] [files...]

  • -lLocal directory only, not recursive.
    -RProcess directories recursively.
    -u user(administrators only) Unedit another user.

34. update

cvs update [-APCdflRp] [-k kopt] [-r rev] [-D date] [-j rev] [-I ign] [-W spec] [files...]

  • -AReset any sticky tags/date/kopts.
    -PPrune empty directories.
    -COverwrite locally modified files with clean repository copies.
    -dBuild directories, like checkout does.
    -fForce a head revision match if tag/date not found.
    -lLocal directory only, no recursion.
    -RProcess directories recursively.
    -pSend updates to standard output (avoids stickiness).
    -k koptUse RCS kopt -k option on checkout. (is sticky)
    -r revUpdate using specified revision/tag (is sticky).
    -D dateSet date to update from (is sticky).
    -j revMerge in changes made between current revision and rev.
    -b-j option merges from branch point (old CVS behaviour)
    -m-j option merges from merge point (cvsnt default behaviour)
    -I ignMore files to ignore (! to reset).
    -W specWrappers specification line.
    -3Produce 3-way conflict output.
    -SForce case-sensitive update on non case-sensitive systems.
    -tUpdate using last checkin time.

35. version

cvs version

36. watch

cvs watch [on|off|add|remove] [-lR] [-a action] [files...]

  • on/offturn on/off read-only checkouts of files.
    add/removeadd or remove notification on actions.
    -l(on/off/add/remove): Local directory only, not recursive.
    -R(on/off/add/remove): Process directories recursively.
    -a(add/remove): Specify what actions, one ofedit,unedit,commit,all,none

37. watchers

cvs watchers [-lR] [files...]

  • -lProcess this directory only (not recursive).
    -RProcess directories recursively.
  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值