0

I'm pretty new to SVN so this might be a simple one, but I guarantee it took me the whole day already. This is the setup:

Apache installed under /www/ and the website is under /www/htdocs/example.com/www/

I have a working SVN server (same machine) and I'd like to publish, either manually or automatically after commit (using hooks), the contents to the destination: /www/htdocs/example.com/www/. The repo is under /svn/www.example.com. I have encountered two problems so far:

  1. If I run "svn export --force file:///svn/www.example.com /www/htdocs/example.com/www" than it creates a new dir: /www/htdocs/example.com/www/www.example.com. Can I do an export without the root directory, but only its contents?
  2. The website root dir (/www/htdocs/example.com/www) is already having files uploaded by the users, so exporting from svn should overwrite only the files found in the repo and leave the rest intact (basically a merge).

Thanks!

4

1 回答 1

0

您可以创建一个到 www 目录的签出而不是导出。您可以拒绝访问apache 中的 .svn 文件夹。

然后当 SVN 服务器上有提交时,更新您的工作副本并将其设置为丢弃本地冲突更改:

svn update --accept theirs-full /www/htdocs/example.com/www 

您也可以svn revert先执行以放弃所有本地更改。svn checkout --force也应该工作

于 2012-12-15T17:44:47.203 回答