compress binaries in SVN?

不打扰是莪最后的温柔 提交于 2019-12-04 06:48:40

问题


I have written a script to compress and uncompress binary files of a selected directory (and the sub-directories). I need to activate the script before I commit files to SVN.

  1. Is there a way to use the pre-commit hook to execute the script? and if so, how do I give to the he script the root directory (so it would scan the sub-folders and compress) ? and what should I write in the hook to execute the script?

  2. The same thing I need to do when I CHECK OUT files. I need to execute a script. Again I need the path of the local root, and also, there is no POST-CHECK-OUT hook, so how can I execute the script?

thanks,

Oded


回答1:


There's no way to accomplish this with normal subversion "hook script" as these are all server-side.

The subversion command line client does not support client-side hooks. You'll have to write your own scripts to wrap for example svn update and then use those scripts instead of the svn command they wrap.

TortoiseSVN does, as far as I know, support client side hooks. You may be in luck if you're using that.

Why, out of curiosity, do you need to do this in the first place?



来源:https://stackoverflow.com/questions/1233049/compress-binaries-in-svn

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!