How can I export from Subversion and ignore specific directories?
The repo contains the following structure.
/project1
/doc
/daily
/history
/sql
/test_cases
To export the project to a production directory, I need to not include the test_cases and doc directories. The production directory should appear as:
/project1
/daily
/history
/sql
The doc and test_cases are valuable and should be version controlled with the project. However, they should not be delivered to a production directory. Perhaps the doc would not do much damage, but if something is run from the test_cases directory, it could easily do damage to the production system.
I could rmdir the unwanted directories after the export, but there is no post-export hook. Is the best that can be done to use a script to do the export to production?
You can use the option --depth
to control, which parts should be exported. In your case, it might look like this:
svn export --depth=files https://svn.example.org/project1 project1
svn export --depth=infinity https://svn.example.org/project1/daily project1/daily
svn export --depth=infinity https://svn.example.org/project1/history project1/history
svn export --depth=infinity https://svn.example.org/project1/sql project1/sql
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.