svn 打tag

 SVN  svn 打tag已关闭评论
3月 262015
 

svn cp $from $to

其中: $from $to 都可以是url或本地路径, 如果 $to 是本地路径,则还需一次 commit, 如果 $to 是url 则是直接提交

 Posted by at 下午 5:58

svn 1.7手册

 SVN  svn 1.7手册已关闭评论
3月 232015
 

http://svnbook.red-bean.com/en/1.7/

 

Examining History

Your Subversion repository is like a time machine. It keeps a record of every change ever committed and allows you to explore this history by examining previous versions of files and directories as well as the metadata that accompanies them. With a single Subversion command, you can check out the repository (or restore an existing working copy) exactly as it was at any date or revision number in the past. However, sometimes you just want to peer into the past instead of going into it.

Several commands can provide you with historical data from the repository:

svn diff
Shows line-level details of a particular change

svn log
Shows you broad information: log messages with date and author information attached to revisions and which paths changed in each revision

svn cat
Retrieves a file as it existed in a particular revision number and displays it on your screen

svn annotate
Retrieves a human-readable file as it existed in a particular revision number, displaying its contents in a tabular form with last-changed information attributed to each line of the file.

svn list
Displays the files in a directory for any given revision

 

more…

 Posted by at 下午 7:06

理解SVN关键词BASE,HEAD,COMMITTED,PREV

 SVN  理解SVN关键词BASE,HEAD,COMMITTED,PREV已关闭评论
3月 232015
 

SVN是以版本号(revision number)来记录版本库的每一次改变,一般的SVN操作不需要用到版本号,但是有些SVN操作需要指定版本号。我们可以指定一个明确的整数版本号,但是也可以使用SVN关键字来指代某个特殊的版本号,SVN会真正计算出它所指代的实际整数版本号:

HEAD:版本库中最新的版本;

BASE:某个工作副本项的版本,注意这个是你上次update该项时的版本号,可能晚于当前最新的版本号;

COMMITTED:某个工作副本项最近修改的版本,与BASE相同或更早;

PREV:COMMITTED – 1。

HEAD针对于版本库,另外3个针对于某个工作副本目录或文件。

示例:

$ svn diff -r PREV:COMMITTED foo.c
# shows the last change committed to foo.c
$ svn log -r HEAD
# shows log message for the latest repository commit
$ svn diff -r HEAD
# compares your working copy (with all of its local changes) to the latest version of that tree in the repository
$ svn diff -r BASE:HEAD foo.c
# compares the unmodified version of foo.c with the latest version of foo.c in the repository
$ svn log -r BASE:HEAD
# shows all commit logs for the current versioned directory since you last updated
$ svn update -r PREV foo.c
# rewinds the last change on foo.c, decreasing foo.c’s working revision
$ svn diff -r BASE:14 foo.c
# compares the unmodified version of foo.c with the way foo.c looked in revision 14

 

原文链接: http://www.cnblogs.com/frydsh/archive/2012/08/25/2655569.html

 Posted by at 下午 7:00

svn 命令行基本操作

 Linux & Unix, SVN  svn 命令行基本操作已关闭评论
3月 102015
 
  1. 从分支合并回主干

     
  2. 从主干到分支合并代码

     

     

 Posted by at 下午 3:41

svn merge

 SVN  svn merge已关闭评论
7月 082013
 

从主干到分支:

svn merge ^/path/from/root/to/trunk ./branch

等价于:

svn merge https://svn.xxx.xxx/path/from/root/trunk  ./branch

(因为 ./branch 是一个版本控制的目录,可以从中获取到svn的url地址,使用该版本库的根目录替换 ^ 就得到所等价的命令了

从branch到主干:

svn merge –integrate ^/path/to/branch ./trunk

 Posted by at 下午 5:34

svn 命令行实例

 SVN  svn 命令行实例已关闭评论
4月 152010
 

关于命令行svn的学习:

检出: 需要 url 用户名 密码  
注意url中的地址不能写根目录,checkout使用的http header里的方法也是很特殊的
D:\svn_test\test2>svn checkout "https://localhost:8443/svn/test2/" –username svnuser –password lijunjie ./

更新

svn update

添加
svn add

删除
svn delete

提交
svn commit -m “提交的注释”

使用vim编辑注释
svn commit –editor-cmd vim

比较
svn diff
和上一个版本比较
svn diff -r PREV

关于svnserve服务器的配置,参考svn-book.pdf

1. 安装 (略)
2. 配置/etc/svnserve.conf
    #content , detail reference svn-book.pdf
    [general]
    password-db = /etc/svnserve.pass
    realm = example realm

    # annonymous users can only read the repository
    anon-access = read

    # authenticated users can both read and write
    aut-access = write

3. 配置权限文件 /etc/svnserve.pass
    [users]
    junjie = junjie

4. 创建版本库
    svnadmin create /var/svnroot/test1

5. 启动
    svnserve -d -r /var/svnroot/ –config-file /etc/svnserve.conf

6. checkout
    svn checkout "svn://phpor.net/test1"
    svn checkout –non-interactive –username lijunji –password xxxx "https://phpor.net/" ./

7. 比较
    svn diff -r 4974:17599 getst.php

8. 移动
    svn move –force a b\
9. 提交
    svn commit -m "comment for move "
10. merge
如: branches\branche1  是 trunk的一个分支,当truck有修改后,假设从版本11升到版本12,要想将版本11到版本12的修改在branche1里也
体现出来,则可以使用merge命令,即:
    svn merge -r 11:12 trunk branches\branche1
    这时branche1里面的文件也做了相应的修改,只是我们还需要人工确认一次,确认修改的没有问题后,再提交一次
    svn commit -m "merge from trunk"
    这时,相应的修改在分支里面体现为版本13,就是说分支里永远找不到版本12的修改
   
    merge 的实质是diff and apply

11. 查看log
svn log –limit 3  -v

–limit n  查看最近n条更新
-v  显示修改的详细信息
-r  指定要查看的版本号,也可以指定日期

svn log -r{2009-05-10}:{2009-06-10}  -v

在服务器上使用svn命令时总出现乱码,处理办法,使用icovn做转码:
svn log -r 4472 |iconv –from utf-8 –to gb2312

 Posted by at 上午 5:13

Linux 上svn的安装

 SVN  Linux 上svn的安装已关闭评论
8月 012008
 

svn 的安装过程:

1. 安装apr
下载:wget "http://apache.mirror.phpchina.com/apr/apr-0.9.17.tar.gz"
编译:
./configure –enable-shared –prefix=/usr/local
make && make install

2. 安装apr-util
下载:wget "http://apache.mirror.phpchina.com/apr/apr-util-1.3.2.tar.gz"
编译:
./configure –enable-shared –prefix=/usr/local \
–with-expat=builtin –with-apr=/usr/local/bin/apr-config \
–without-berlekey-db
make && make install
3. 安装neon
下载:wget "http://www.webdav.org/neon/neon-0.28.2.tar.gz"
编译:
./configure –enable-shared –prefix=/usr/local \
–with-ssl
make && make install

4. 安装subversion-1.5.1
下载:wget "http://subversion.tigris.org/downloads/subversion-1.5.1.tar.gz"
编译:
参考命令:./configure –prefix=/usr/local –with-apr=/usr/local/bin/apr-config –with-apr-util=/usr/local
–with-editor=/usr/bin/vim   –with-neon=/usr/local –without-apxs –without-apache
没有成功

附: 不记得是否需要webdav了,这里有:wget "http://www.webdav.org/mod_dav/mod_dav-1.0.3-1.3.6.tar.gz"

参考文档:http://joemaller.com/2008/01/29/how-to-install-subversion-on-a-shared-host/


下载:
> wget "http://subversion.tigris.org/downloads/subversion-1.5.1.tar.gz"
> tar -zxvf  subversion-1.5.1.tar.gz
> cd subversion-1.5.1
>./configure  –with-apr=/usr/local/apache2  –with-apr-util=/usr/local/apache2    && make  && make install


配置:

关于svnserve服务器的配置,参考svn-book.pdf

1. 安装 (略)
2. 配置/etc/svnserve.conf
    #content , detail reference svn-book.pdf
    [general]
    password-db = /etc/svnserve.pass
    realm = example realm

    # annonymous users can only read the repository
    anon-access = read

    # authenticated users can both read and write
    aut-access = write

3. 配置权限文件 /etc/svnserve.pass
    [users]
    junjie2 = junjie2

4. 创建版本库
    svnadmin create /var/svnroot/test1

5. 启动
    svnserve -d -r /var/svnroot/ –config-file /etc/svnserve.conf

 Posted by at 上午 7:48

SVN Server 入门

 SVN  SVN Server 入门已关闭评论
5月 042008
 

       觉得svn是个很有意思的东西,但是一直没时间研究这个东西,今天突然来了兴致,就像装一个服务器端,于是到官方网站下了安装包,Linux下的,别说装了,就那个INSTALL文件都看的头大,我看硬着来是不行了,还是找条近道先熟悉熟悉吧,还果然有Windows下的非常方便的svn服务器,就是VisualSVN,自己不妨去下一个装装玩玩,下载就是官方网站http://www.visualsvn.com/ ,安装基本就是 ‘下一步 -> 下一步 。。。’,所以,我就不多说了,等有了成果再续吧!

 Posted by at 上午 4:39