【SVN命令整理】

 

(在命令行下通过 svn help xxx 来查看xxx命令的文档)

1. add (将文件加入版本管理)

  Put files and directories under version control, scheduling them for addition to repository. They will be added in next commit.

  usage: add PATH...

 

2. blame (praise, annotate, ann) (显示指定文件的修订版本&作者信息)

  Output the content of specified files or URLs with revision and author information in-line.

  usage: blame TARGET[@REV]...

  If specified, REV determines in which revision the target is first loogked up.

 

3. cat (显示指定版本文件的内容)

  Output the content of specified files or URLs.

  usage: cat TARGET[@REV]...

 

4. changelist (cl) (对指定文件进行分组)

  Associate (or dissociate) changelist CLNAME with the named files.
  usage: 1. changelist CLNAME PATH...
       2. changelist --remove PATH...

 

5. checkout (co) (从代码库中拉取代码)

  Check out a working copy from a repository.

  usage: checkout URL[@REV]... [PATH]

  If specified, REV determines in which revision the URL is first looked up.

 

6. cleanup (清理工作目录)

  Recursively clean up the working copy, removing write locks, resuming unfinished operations, etc.

  usage: cleanup [WCPATH...]

 

7.  commit (ci) (提交)

  Send changes from your working copy to the repository.

  usage: commit [PATH...]

 

8. copy (cp) (拷贝文件)

  Copy files and directories in a working copy or repository.

  usage: copy SRC[@REV]... DST

 

9. delete (del, remove, rm) (删除文件)

  Remove files and directories from version control.

  usage:  1. delete PATH...
      2. delete URL...

 

10. diff (di) (显示差异)

  Display local changes or differences between two revisions or paths.

  usage:   1. diff

      2. diff [-c M | -r N[:M]] [TARGET[@REV]...]

      3. diff [-r N[:M]] --old=OLD-TGT[@OLDREV] [--new=NEW-TGT[@NEWREV]] [PATH...]

      4. diff OLD-URL[@OLDREV] NEW-URL[@NEWREV]

      5. diff OLD-URL[@OLDREV] NEW-PATH[@NEWREV]

      6. diff OLD-PATH[@OLDREV] NEW-URL[@NEWREV]

 

11. export (导出不带版本信息的目录树)

  Create an unversioned copy of a tree.

  usage:  1. export [-r REV] URL[@PEGREV] [PATH]
      2. export [-r REV] PATH1[@PEGREV] [PATH2]

 

12. help (?, h) 

  Describe the usage of this program or its subcommands.

  usage: help [SUBCOMMAND...]

 

13. import (导入目录到库中)

  Commit an unversioned file or tree into the repository.  

  usage: import [PATH] URL

 

14. info (显示指定文件的svn信息)

  Display information about a local or remote item.

  usage: info [TARGET[@REV]...]

 

15. list (ls) (显示文件列表)

  List directory entries in the repository.

  usage: list [TARGET[@REV]...]

 

16. lock (锁定文件)

  Lock working copy paths or URLs in the repository, so that no other user can commit changes to them.

  usage: lock TARGET...

 

17. log

  Show the log messages for a set of revision(s) and/or path(s).

  usage:  1. log [PATH][@REV]

      2. log URL[@REV] [PATH...]

 

18. merge (合并)

  Merge changes into a working copy.

  usage:  1. merge SOURCE[@REV] [TARGET_WCPATH] (the 'complete' merge)

      2. merge [-c M[,N...] | -r N:M ...] SOURCE[@REV] [TARGET_WCPATH] (the 'cherry-pick' merge)

      3. merge SOURCE1[@REV1] SOURCE2[@REV2] [TARGET_WCPATH] (the '2-URL' merge)

 

19. mergeinfo (显示合并相关信息)

  Display merge-related information.

  usage:  1. mergeinfo SOURCE[@REV] [TARGET[@REV]]

      2. mergeinfo --show-revs=WHICH SOURCE[@REV] [TARGET[@REV]]

 

20. mkdir (创建文件夹)

  Create a new directory under version control.

  usage:   1. mkdir PATH...

      2. mkdir URL...

 

21. move (mv, rename, ren) (移动)

  Move (rename) an item in a working copy or repository.

  usage: move SRC... DST

 

22. patch (打补丁)

  Apply a patch to a working copy.

  usage: patch PATCHFILE [WCPATH]

  参考:巧用svn create patch(打补丁)方案解决定制版需求

 

23. propdel (pdel, pd) (删除属性)

  Remove a property from files, dirs, or revisions.

  usage:   1. propdel PROPNAME [PATH...]

      2. propdel PROPNAME --revprop -r REV [TARGET]

 

24. propedit (pedit, pe) (编辑属性)

  Edit a property with an external editor.

  usage:  1. propedit PROPNAME TARGET...

      2. propedit PROPNAME --revprop -r REV [TARGET]

 

25. propget (pget, pg) (打印属性)

  Print the value of a property on files, dirs, or revisions.

  usage:  1. propget PROPNAME [TARGET[@REV]...]

      2. propget PROPNAME --revprop -r REV [TARGET]

 

26. proplist (plist, pl) (显示所有属性)

  List all properties on files, dirs, or revisions.

  usage:  1. proplist [TARGET[@REV]...]

      2. proplist --revprop -r REV [TARGET]

 

27. propset (pset, ps) (设置属性)

  Set the value of a property on files, dirs, or revisions.

  usage:  1. propset PROPNAME PROPVAL PATH...

      2. propset PROPNAME --revprop -r REV PROPVAL [TARGET]

 

28. relocate (重定位)

  Relocate the working copy to point to a different repository root URL.

  usage:  1. relocate FROM-PREFIX TO-PREFIX [PATH...]

      2. relocate TO-URL [PATH]

 

29. resolve (解决冲突)

  Resolve conflicts on working copy files or directories.

  usage: resolve [PATH...]

 

30. resolved (移除冲突状态)

  Remove 'conflicted' state on working copy files or directories.

  usage: resolved PATH...

 

31. revert (回滚)

  Restore pristine working copy state (undo local changes).

  usage: revert PATH...

 

32. status (stat, st)

  Print the status of working copy files and directories.

  usage: status [PATH...]

 

33. switch (sw)

  Update the working copy to a different URL within the same repository.

  usage:   1. switch URL[@PEGREV] [PATH]

      2. switch --relocate FROM-PREFIX TO-PREFIX [PATH...]

  参考:SVN switch 用法详解

 

34. unlock (解锁)

  Unlock working copy paths or URLs.

  usage: unlock TARGET...

 

35. update (up) (更新)

  Bring changes from the repository into the working copy.

  usage: update [PATH...]

 

36. upgrade (升级)

  Upgrade the metadata storage format for a working copy.

  usage: upgrade [WCPATH...]

posted @ 2015-04-09 09:22  michael111  阅读(365)  评论(0编辑  收藏  举报