SVN: Can I copy a subset of files to a new tag?
copy, svn, tagging, tags, version-control
Solution
You can do this by using the svnmucc program provided by subversion (included in windows builds since SVN1.5) This small tool will collect multiple svnactions into a single commit. however you need to create the destination folder before. It is not possible to create a folder and copy content inside in a single transaction: here a sample:
svn mkdir -m "creating a tag" http://your.serv.er/svn/repo/tags/release_123
svnmucc cp HEAD http://your.serv.er/svn/repo/trunk/dir1 http://your.serv.er/svn/repo/tags/release_123 \
cp HEAD http://your.serv.er/svn/repo/trunk/file1 http://your.serv.er/svn/repo/tags/release_123 \
cp HEAD http://your.serv.er/svn/repo/trunk/file2 http://your.serv.er/svn/repo/tags/release_123 -m "creating tag Part II"
You can also use the perl/python/ruby bindings or svnkit(java) to accomplish this task, but I cannot provide sourcecode for this..
Problem
In my repo trunk I have a directory `unit-tests` that I want to keep out of my release tags. What I've been doing is copying trunk to a new tag, then deleting `unit-tests`. Is this OK? It feels wrong because it takes two revisions to tag every release. Is there a way to exclude a directory from the svn copy? E.g. I have: ``` /trunk/unit-tests /trunk/dir1 /trunk/file1 /trunk/file2 ``` And I want to create: ``` /tags/release_123/dir1 /tags/release_123/file1 /tags/release_123/file2 ``` I generally use Tortoise/Eclipse clients, but I could cli it if need be.