Linux之ubuntu如何安装SVN及配置?

官网浏览:
http://subversion.apache.org/    -》 download page  http://subversion.apache.org/download.cgi#recommended-release
-> binary packages page.    http://subversion.apache.org/packages.html
->  Ubuntu Linux  -> command: "apt-get install subversion "

终端:

root@mcw:~# cat /etc/issue

Ubuntu 16.04.1 LTS \n \l


root@mcw:~# apt-get install subversion
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
subversion 已经是最新版 (1.9.3-2ubuntu1)。
...
root@mcw:~# svnserve --version
svnserve,版本 1.9.3 (r1718519)

1. 建立一个空目录(可建立多个,新建库后以下各项都需重新配置。注意区别安装目录与版本库目录,以下讲的都是版本库目录)
     mkdir /opt/repos

2. 建立svn版本库(与上面目录对应)
     svnadmin create /opt/repos
3. 权限配置
    cd /opt/repos
    vim passwd
            [users]
            # harry = harryssecret
            # sally = sallyssecret
            rain = pass
    vim svnserve.conf
            ### Uncomment the line below to use the default password file.
            password-db = passwd
4.svnserve -d -r /opt/repos
5.svn co svn://localhost/
6.vim a.txt
7.svn add a.txt
8.svn ci -m "first commit" --username rain --password pass
9.svn up
在文件“c.txt”中发现冲突。
 (tf) - 整个文件使用他们的版本 [theirs-full]
  键入tf,回车
            官方文档解释:4.5.5. 丢弃你的修改而接收新获取的修订版本
                            如果你遇到冲突,决定丢弃你的修改,你可以运行 svn resolve --accept theirs-full CONFLICTED-PATH , Subversion 会丢弃你做的修改,并且删除临时文件:

svn help
svn help ci
svnadmin help
官方文档http://svnbook.red-bean.com/nightly/zh/index.html


猜你喜欢

转载自blog.csdn.net/gongpeng1966/article/details/68958556
今日推荐