svn hook, exporting repo trouble

◇◆丶佛笑我妖孽 提交于 2019-12-11 18:21:28

问题


I'm just starting out using subversion with the goal of using it to control my website.

I've set up the repos, imported all the files for the website and I am happily checking things in and out and it's a wonderful experience not having to remember which files I changed on which computer so I can grab the latest version from the live server!

I've set up a testing location where I can svn export my website to test before uploading it to the live server. I'd like the export to be done automatically so I don't have to SSH into the server to do it (which I can't always do, depending on where I am).

I created a post-commit script that simply did:

$ svn export <reposURL> <testingDIR> --force

gave the hook script execute all permissions and the <testingDir> has group write permissions for the web server.

When I did an svn ci from my laptop, I got the error:

Transmitting file data .svn: Commit failed (details follow):
svn: MERGE of '<pathOfRepos>': 200 OK 
(http://svn.mydomain.com)

however a subsequent commit threw an error that my working copy was out of date and appears that the commit did actually succeed, the export didn't.

Can anyone tell me where I've gone wrong?

(Running latest ubuntu/apache/svn)

--Edit:

After a lot of poking around and trying various things, I've managed to work out that the reason it isn't working is because my repository requires a username and password when accessed via the web. I've changed the post-commit script to access the repository locally using a file:// type url and it works fine now.

closing the question.


回答1:


you may have to add

exit 0

at the end of your script.



来源:https://stackoverflow.com/questions/2015570/svn-hook-exporting-repo-trouble

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