svn

svn update后

1.txt文件出现冲突,选择base版本,即1.txt.rOld作为最后提交的版本

$ svn resolve –accept 

2.手工修改1.txt文件,然后将当前拷贝即1.txt作为最后提交的版本

$ svn resolve –accept working 1.txt

3.使用1.txt.rNew作为最后提交的版本

$ svn resolve –accept theirs-full 1.txt

4.使用1.txt.mine作为最后提交的版本

$ svn resolve –accept mine-full 1.txt

5.使用1.txt.mine作为最后提交的版本

$ svn resolve –accept theirs-conflict 1.txt

6.versioned item obstructed by some item of a different kind

svn delete --keep-local x
svn commit -m "del x"
svn add x
svn commit -m "blah"

7.merge trunk to branch

svn merge -c revisionNumber urlToTrunk pathToBranch

8.svn server side hooks 加可执行权限。
传给hook pre-commit post-commit 的参数不同


pre-commit

  1. repo path
  2. the name of the txn about to be committed

post-commit

  1. repo path
  2. revision number

man svnlook
exit 0 通过
exit non-zero 不通过
echo "error msg" >&2 通过stderr返回给客户端错误信息

9.diff

svn log -r rev1:rev2 --diff
svn log -r rev --diff

10.undo commit

undo range:

svn merge -r [current_version]:[previous_version] [repository_url]

undo single revision:

svn merge -c -REV .

git

git rocks!