原Linux命令获取svn
LVAmber阅读数:6042018-05-30
从SVN库提取数据
[root@localhost svnpasswd]# ll
total 12
-rws--S--T. 1 root root 1144 May 29 03:36 authz
-rws--S--T. 1 root root? 341 May 29 03:25 passwd
drwxr-xr-x. 2 root root 4096 May 29 05:48 svndata
[root@localhost svnpasswd]# svn co svn://192.168.1.211/sadoc/ /svndata/ --username=alan --password=alan123
也可以通过文件访问,但是不可以跨网络
[root@localhost svnpasswd]# cd svndata/ [root@localhost svndata]# svn co file:///local/svndata/sadoc/ Checked out revision 0.
创建svn项目(主干,分支linux命令大全,版本记录)保存文件
[root@localhost svndata]# mkdir -p /svn/trunk /svn/branch /svn/tag ;
import
[root@localhost svn]# pwd
/svn
[root@localhost svn]# ll
total 12
drwxr-xr-x. 2 root root 4096 May 29 18:28 branch
drwxr-xr-x. 2 root root 4096 May 29 18:28 tag
drwxr-xr-x. 2 root root 4096 May 29 18:28 trunk
[root@localhost svn]# svn import /svn file:///local/svndata/sadoc -m "import"
Adding /svn/trunk
Adding /svn/tag
Adding /svn/branch
Committed revision 2.
把主干复制为分支
[root@localhost svn]# svn copy svn://192168.1.211/sadoc/trunk svn:192.168.1.211/sadoc/branch/branch_cms_110329 -m "create a branch by alan modifiy"
svn: Local, non-commit operations do not take a log message or revision properties
批量创建文件并提交到svn库
[root@localhost svndata]# touch {h..m}
[root@localhost svndata]# ll
total 0
-rw-r--r--. 1 root root 0 May 29 19:21 h
-rw-r--r--. 1 root root 0 May 29 19:21 i
-rw-r--r--. 1 root root 0 May 29 19:21 j
-rw-r--r--. 1 root root 0 May 29 19:21 k
-rw-r--r--. 1 root root 0 May 29 19:21 l
-rw-r--r--. 1 root root 0 May 29 19:21 m
上一个教程:Linux关闭防火墙命令