黑苹果系统作为很多没有mac电脑的朋友带来了一丝安慰,虽然各种问题不断,比如之前老是黑屏等。
后来发现是没有设置电脑不休眠的缘故
今天要配置下svn,查完资料简单配置了下,然后将远程服务器上的文档拉到了本地,步骤倒是蛮简单,在此记录下:
1、创建一个欲存放文件的文件夹,命令如下:
svnadmin create svndir
注:因为我事先不知道该命令的作用,结果先创建了一个文件夹,并且通过cd命令进入到了我自
建立的文件夹下,并执行了该命令,结果发现,这句命令是在我创建的文件夹内部创建了一个叫svndir的文件夹,当然,
执行完上句,进入到svndir目录下,ls 命令,发现其中有几个文件(或者说文件夹):
补充下 vim svnserve.conf 的内容:
2、
### users have read-only access to the repository, while authenticated
### users have read and write access to the repository.
anon-access = read
auth-access = write
### The password-db option controls the location of the password
### database file. Unless you specify a path starting with a /,
### the file's location is relative to the directory containing
### this configuration file.
### If SASL is enabled (see below), this file will NOT be used.
### Uncomment the line below to use the default password file.
password-db = passwd
### The authz-db option controls the location of the authorization
### rules for path-based access control. Unless you specify a path
### starting with a /, the file's location is relative to the
### directory containing this file. The specified path may be a
### repository relative URL (^/) or an absolute file:// URL to a text
### file in a Subversion repository. If you don't specify an authz-db,
### no path-based access control is done.
### Uncomment the line below to use the default authorization file.
authz-db = authz
### The groups-db option controls the location of the file with the
"svnserve.conf" 81L, 4367C
截取了一部分,更改的内容就是,将上述四行前面的空格和#号符去掉:
anon-access = read
auth-access = write
password-db = passwd
authz-db = authz
然后esc wq 保存退出
3、更改同目录下的passwd文件:
vim passwd
### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.[users]
# harry = harryssecret
# sally = sallyssecret
zhouxiaotong = 123456
~
如上:zhouxiaotong 是我的用户名 123456 是我的密码
设置完成,同上摁下esc 、冒号、 wq 保存退出
4、测试是否配置完成:
svnserve -d -r svndir
注:如上,svndir应该是svndir的一个绝对路径或者是相对路径,我是直接执行该命令,发现提示
我没有改路径,于是我先cd到svndir上一级目录,也就是上面所说的我自己创建的目录XXX文档/目录
然后执行的如上命令,执行完,没有任何提示,说明配置成功,于是根据项目的svn路径,执行如下步骤,
将文档checkout 到本地
svn checkout 服务器路径 ./
注:如上表示,我根据小组项目的路径,类似一个http://192.168.23.01:22322/xxx项目 拉到了当前路径xxx文档.
即 svn checkout http://192.168.23.01:22322/xxx项目 ./
然后就开始拉文档了。之后建议执行下sync命令,用于保证内容确实从内存写到了硬盘中。