Pagine

Wednesday 19 October 2016

SVN tutorial n 6 - copy

The svn copy command copies a file or directory in a working copy or in the repository. This command can be used to create a branch and / or a tag. The synopsis is:
 svn copy <src_path> <dts_path>
or
 svn cp <src_path> <dts_path>

Examples:

Create a new tag from trunk
 svn copy https://mysvnrep/svn/myproject/trunk/ https://mysvnrep/svn/myproject/tags/myproject-0.0.1 -m "myproject tag 0.0.1"
Create a new branch from tag
 svn copy https://mysvnrep/svn/myproject/tags/myproject-0.0.1 https://mysvnrep/svn/myproject/branches/myproject-0.0.1 -m "new branch from tag: myproject-0.0.1"
It's possible to copy from a specific revision number using -r option:
 svn copy -r 1234 https://mysvnrep/svn/myproject/trunk/ https://mysvnrep/svn/myproject/tags/myproject-0.0.1 -m "myproject tag 0.0.1"

No comments:

Post a Comment