views:

288

answers:

2

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.

+2  A: 

I don't think you can.

But why do you need to delete the unit-test directory anyway? It takes up no extra space in the repository, in fact, it takes up more space if you delete it (because of the extra commit).

If you are worried that a check-out of the tag takes too long / gets too big, you can choose to not check-out the unit-test directory.

Thilo
+2  A: 

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..

Peter Parker