svn:ignore操作

This is just a note to myself, since I seem to keep forgetting how to do that properly. After reading the chapter in the svn-book properly and using enough [–]help I figured it out and I am scared to forget how to get it right again :-). Here is how I got it working for me.

svn:ignore

  1. cd into the root directory of my working copy.
  2. Create a file .svnignore in the root of my working copy, with the following content
    *.pyc
    *.log
  3. adjust that as you need it, of course.

  4. Run
    svn -R propset svn:ignore -F .svnignore .
    Note the “.” at the end (that I always forgot in the beginning), that means all the directories get effected. The “-R” means that the ignore shall apply recursively, therefore you need to be in the root to have it apply to the entire tree.
  5. Now commit all the directories, yes you have to commit them all,
    svn commit * -m"set ignore"
    that was also not mentioned in the svn-book, I think. But how boring would the world be without those little challenges?
  6. And now run
    svn status
    and all the files that shall be ignored should be gone.

So notice here, ignore works on the directories, I believe. That’s why you also have to use the “.” and when commiting you see that all the directories get commited.

svn:keywords

  1. cd into the root directory of my working copy.
  2. Create a file .keywords in the root of my working copy, with the following content
    Author
    Rev
    Id
  3. adjust that as you need it, of course.

  4. Run
    svn -R propset svn:keywords -F .keywords *
    Note the “*” at the end (that I also always forgot in the beginning), that tells that all the files are effected. The “-R” means that the keywords shall apply recursively, therefore you need to be in the root to have it apply to the entire tree.
  5. SubVersion has modified all the files that contain those place-holders (like $Id$, $Rev$, etc.) and has replaced them with the proper content. Now commit all the files (now really the files have changed!), here too - you have to commit them all,
    svn commit * -m"set keywords".

So notice here, keywords works on the files. That’s why you also have to use the “*” and when commiting you see that all the files get commited.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值