Linux SVN - 如何仅导出修订版
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4414852/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
SVN - How to Export Just a Revision
提问by cnizzardini
I have SVN setup on my local computer (Ubuntu) which I use for development and an SVN client running on a shared host box which I use a staging server, also my production server has the same setup. When I do an export, the entire project is getting exported which is absurd for small version release. I use the following command:
我在用于开发的本地计算机 (Ubuntu) 上安装了 SVN,在共享主机上运行了一个 SVN 客户端,我使用登台服务器,我的生产服务器也有相同的设置。当我进行导出时,整个项目都被导出,这对于小版本发布来说是荒谬的。我使用以下命令:
svn export -r 31 http://localhost.com/proj/trunk . --force --username myusername
And the entire project is exported once again. So I try a different way:
并且再次导出整个项目。所以我尝试了一种不同的方式:
svn export -r 'COMMITTED' http://localhost.com/proj/trunk . --force --username myusername
I then get this error:
然后我收到这个错误:
svn: 'http://localhost.com/egr' is not a working copy
svn: Can't open file 'http://localhost.com/proj/.svn/entries': No such file or directory
I wonder if I am just not using the correct SVN export command or if there is something inherently wrong with my SVN setup (this is my first time configuring SVN).
我想知道我是否只是没有使用正确的 SVN 导出命令,或者我的 SVN 设置是否存在固有问题(这是我第一次配置 SVN)。
dav_svn.conf:
dav_svn.conf:
<Location /proj>
DAV svn
SVNPath /var/svn/proj/
AuthType Basic
AuthName "SVN Repo"
AuthUserFile /etc/subversion/passwd
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
Ideas? Please advise.
想法?请指教。
回答by mariana soffer
You shouldn't use svn export
if you want to update the project, you should use svn commit
that sends changes from your working copy to the repository.
你不应该使用svn export
,如果你想更新的项目,你应该使用svn commit
发送的变化,从你的工作拷贝到存储库。
I was wondering Why are you using the -r 31 option this stands for revisions and the amount of them which are 31. Probably the option you want to invoke is the -R option which stands for recursing the directories.
我想知道你为什么要使用 -r 31 选项,它代表修订版以及它们的数量是 31。可能你想要调用的选项是 -R 选项,它代表目录递归。
回答by ajreal
You can specify the folder/files that you want to export only, like
您可以指定仅要导出的文件夹/文件,例如
such as using wp svn
比如使用 wp svn
svn export -r 16873 http://core.svn.wordpress.org/branches/2.8/wp-admin/css
If just few files but located on different directories
如果只有几个文件但位于不同的目录中
mkdir {css,image}
svn export -r 16873 http://core.svn.wordpress.org/branches/2.8/wp-admin/css/install.css css/install.css
svn export -r 16873 http://core.svn.wordpress.org/branches/2.8/wp-admin/images/menu-arrows.gif images/menu-arrows.gif