开发者

SVN: How to import folder keeping folder name?

I have a version controlled project located at ~/webapps/django/myproject and media files located at ~/webapps/static. I want to add the static folder to the same repo so that when it's checked out, it will be in the project folder, preferably with the name "media".

I've tried going into the webapps folder and doing svn import static https://myrepo but it imports all the stuff inside stati开发者_运维问答c, but excludes the "static" folder itself, making a big mess in my project folder.

If you're wondering, I'm doing this because there's a bit of a discrepancy in the way my development server and production server are set up.


You are already very close.

svn import static https://myrepo/media

Would place the contents of static into the path myrepo/media on the server, even if media does not yet exist. Note that if there are intervening paths that do not yet exist in the repository, Subversion will recursively create them. For example, svn import static https://myrepo/intervening/media would:

  1. create the path intervening if it does not exist
  2. create the path media if it does not exist
  3. import the contents of static into the repo path


You could move or copy static into the project folder and type:

svn add static
svn commit -m "adding static folder"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜