博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
SVN常用命令学习笔记
阅读量:2441 次
发布时间:2019-05-10

本文共 2255 字,大约阅读时间需要 7 分钟。

1. svn common commands

     1.1 typical working cycle
              a. update your working copy
                    svn udpate
             b. modification
                    svn add
                    svn delete
                    svn copy
                    svn move
             c. verify modification
                     svn status
                    svn diff
                    svn revert
             d. merge others' modification
                  svn update
                    svn resolved
             e. submit modification
                  svn commit
                 
     1.2 resolve conflicts (confliction files: filename.mine,
              filename.rOLDREV, filename.rNEWREV)
             a. abandon the modification: svn revert <filename>
             b. remove conflicts temp files: svn resolved
                 note: once the temp files is deleted with 'svn resolved',
                           you can submit your file, even though there still are
                           conflicts in the file.
     1.3 check the history
             a. svn log
             b. svn cat
             c. svn list
             d. svn diff
     1.4 Misc.
             a. svn cleanup
             b. svn import
             c. svn info
2. branch, tag, merge
     2.1 svn branch is a copy
            create branch: svn copy <src_svn_path> <dest_svn_path> -m "<comments>"
     2.2 merge to current local copy
            merge branch: svn merge -r <ver1:ver2> <dest_svn_path>
            example:
             $ svn merge http://svn.example.com/repos/branch1@150 /
                                   http://svn.example.com/repos/branch1@212 /
                                   my-working-copy
             $ svn merge -r 100:200 http://svn.example.com/repos/trunk my-working-copy
             $ svn merge -r 100:200 http://svn.example.com/repos/trunk
     2.3 preview the merge: svn merge --dry-run .....
     2.4 svn merge --ignore-ancestry
              $ svn diff --notice-ancestry
     2.5 find the log from where the branch creates
              $ svn log --verbose --stop-on-copy <svn_branch_path>
     2.6 copy file from a svn old version, and add it to svn
              $ svn copy -r <ver> <svn_path_filename> <path_filename>
     2.7 transform an existing working copy to reflect a different branch: svn switch
              Note: Not only can working copies contain a mixture of working
                        revisions, but a mixture of repository locations as well.
    
     2.8 svn tag is copy, there is no diifference between a tag and a branch
              create tag: $ svn copy  <src_svn_path> <dest_svn_path> -m "<comments>"
3. setup svn server
    3.1 startup svn server
        $ svnserve -d -r /SVN/xxxxx/
    3.2 modify svn user name and passwd
        modify file: <storage>/conf/passwd

 

4. generate and apply patch

    4.1 Generate Patch:

        #svn diff > xxx.patch

    4.2 Apply Patch:
        #patch -p0 < xxx.patch

5. Appendix:
$ svn log <filename> -r <key|time|ver>    
$ svn diff -r <key|ver> <filename>
Show the latest changes in the repository
#svn log -r 'BASE' -v

转载地址:http://rqbqb.baihongyu.com/

你可能感兴趣的文章
Ubuntu Linux:定制Ubuntu安装CD(转)
查看>>
调查显示:企业级Linux用户不断攀升(转)
查看>>
Ubuntu/Linux入门介绍-dpkg(转)
查看>>
SCO UNIX学习宝典 高级进阶(转)
查看>>
Oracle9i RAC for RedFlag Linux DC4.1 32bit 安装流程(转)
查看>>
Sybase和Oracle安装过程中常遇到的问题(转)
查看>>
红帽Linux新系统整合虚拟技术 实现简易操作(转)
查看>>
Linux下/etc/default/boot文件字段说明(转)
查看>>
Linux壁纸系列三十四(转)
查看>>
使用带有Dtrace的FreeBSD(转)
查看>>
Fedora Core 4硬盘安装方法(转)
查看>>
常用的系统状态查询命令(转)
查看>>
『推荐』上G的linux视频教程和电子书FTP下载,速度快内容实用!(转)
查看>>
AIX系统日常管理(转)
查看>>
Fedora Core 6的新特性(转)
查看>>
不得不说 僵尸网络导致垃圾邮件猛增(转)
查看>>
linux网络知识:TCP/IP设置内容(转)
查看>>
GNOME帮助Linux应用于商业桌面环境(转)
查看>>
linux网络知识:与网络设置有关的几个文件(转)
查看>>
Linux文件内容查询命令(转)
查看>>