svn钩,出口回购麻烦 [英] svn hook, exporting repo trouble

查看:60
本文介绍了svn钩,出口回购麻烦的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚开始使用Subversion,目的是使用它来控制我的网站.

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!

我已经设置了一个测试位置,可以在将网站上传到实时服务器之前在其中进行测试.我希望导出能够自动完成,因此我不必通过SSH进入服务器即可(根据我所在的位置,我可能无法始终这样做).

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).

我创建了一个简单的post-commit脚本:

I created a post-commit script that simply did:

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

赋予该钩子脚本执行所有权限,并且<testingDir>具有对该Web服务器的组写入权限.

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

当我从笔记本电脑上执行svn ci时,出现了错误:

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?

(正在运行最新的ubuntu/apache/svn)

(Running latest ubuntu/apache/svn)

-

经过大量的尝试并尝试了各种方法之后,我设法弄清了它不起作用的原因是因为我的存储库在通过Web访问时需要用户名和密码.我已经更改了提交后脚本,以使用file://类型的url在本地访问存储库,并且现在可以正常使用了.

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.

结束问题.

推荐答案

您可能必须添加

exit 0

在脚本的末尾.

这篇关于svn钩,出口回购麻烦的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆