svn 签出和更新,无需 .svn 目录
我在 svn 下有一个网站,我想用存储库中当前的内容修补实时网站(即有效地在实时网站上调用 svn update),但我不希望生产网站上的每个文件夹中都有 .svn 目录。
有没有办法设置 svn,使包含版本信息的 .svn 文件夹与版本控制下的文件不在同一目录中?
在 git 中,您可以创建和分离工作树并以这种方式将更新推送到项目(根据 http: //toroid.org/ams/git-website-howto),我基本上希望能够在 svn 中做类似的事情。
I have a website under svn and I want to patch the live website with what's currently in the repository (i.e. effectively calling svn update on the live website), but I don't want .svn directories in every folder on the production website.
Is there a way to set up svn so that the .svn folder with version information is not in the same directory as the files under version control?
In git you can create and detatch a work tree and push updates to a project this way(according to http://toroid.org/ams/git-website-howto), I basically want to be able to do something similar in svn.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
svn export
的工作方式与checkout
类似,但没有.svn
目录。 但是,您无法更新
这样的结构,因为它不是 svn 工作副本。您还可以将 Web 服务器配置为禁止访问
.svn
目录,并仅使用 checkout+update 方法。svn export
works similarly to acheckout
but without the.svn
directories. However, you cannotupdate
such a structure since it's not a svn working copy.You can also configure the web server to disallow access to the
.svn
directories and just go with the checkout+update method.rsync 配置为不复制“.svn”目录怎么样?
rsync --exclude=.svn local_svn_copy webserver:site/
可以重新运行以刷新网络服务器的副本。
How about rsync configured to not copy ".svn" directories?
rsync --exclude=.svn local_svn_copy webserver:site/
This can be re-run to refresh the webserver's copy.
httpd.conf:
httpd.conf:
正如 laalto 提到的,
svn export
提供了一种简单但不是非常有效的方法来更新重复使用的“工作副本”:As laalto has mentioned
svn export
makes for an easy but not very efficient method for updating a "working copy" when used repeatedly:您还可以使用 git-svn 创建网站的 git 镜像,然后按照您链接的文章中描述的方式发布。 显然这不是一个直接的解决方案。
You could also use
git-svn
to create a git mirror of the website and then publish the way described in the article you linked. Obviously this isn't a straight forward solution though.