SVN: How to import a folder name to store folders?

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

I tried to go into the webapps folder and make svn import static https://myrepo , but it imports all the contents inside static, but excludes the β€œstatic” folder, which creates a big mess in my project folder.

If you're interested, I do this because there is a little discrepancy in the way I create my development server and production server.

+4
source share
2 answers

You are already very close.

 svn import static https://myrepo/media 

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

  • create a path if it does not exist
  • create a path carrier if it does not exist
  • import the contents of a static element into the repo path
+3
source

You can move or copy static files to the project folder and print:

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

Source: https://habr.com/ru/post/1303082/


All Articles