compress binaries in SVN?

2019-03-04 01:20发布

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条回答
Lonely孤独者°
2楼-- · 2019-03-04 02:16

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?

查看更多
登录 后发表回答