views:

39

answers:

2

I have a monolithic trunk which is comprised of many projects and their corresponding shared modules. I wish the database was organized in a more flexible manner, but it isn't. What I'd like to do is create a branch which is a sort of project-specific refined view of the trunk. Really, it's a tag, because I only want to write it once however I only want to label select parts of the database. What's the way I can do this while generating the least amount of commit noise?

From the command-line in my working space, I could svn cp the working space directories to the branch folder (selecting only the modules particular to a project). However, the trunk is quite a large checkout and there are potentially very large number of items to move. So, this quickly becomes cumbersome.

Using svn cp on the server url allows me to selectively copy each path to the branch/tag folder as I see fit, but I get a commit per copy operation. When our projects are stable enough, the commit log messages are usually useful for project managers, so this level of commit noise would be annoying.

What I'd like to do is either copy the trunk with a set of filters. Or, alternatively, copy the trunk wholly then delete the unneeded folders (generating only two commit messages). But, as far as I can tell, there's no way to 'batch up' deletes or copies on the server side. Is this correct? Any other alternatives?

A: 

I'd check out the trunk into a working directory, probably using the --depth option so that I don't have a big source tree (see http://svnbook.red-bean.com/en/1.5/svn.ref.svn.c.checkout.html). The biggest benefit of this approach is that you can play around, throw away any mistakes, and do a single commit.

Anon
I think this kind of works for me. I wrote a ruby script which checks out a skeleton of my source tree (recursively called for each path with '--depth empty'). Then I can branch on the skeleton. More convenient than what I was thinking. Noone else at my office would be able to manage my ruby script, so it's still not ideal. But oh well, works for me.
GlobalReset
A: 

The svn manual covers a section called Externals Definitions.

Sometimes it is useful to construct a working copy that is made out of a number of different checkouts. For example, you may want different subdirectories to come from different loca- tions in a repository or perhaps from different repositories altogether.

Maybe svn:externals is a slik solution around the limited repository design you have to deal with.

zellus
yeah, svn:externals would work for what I want as well, but when I make a project view, I want it to be 'official' in a sense. Creating the externals means I have to pin them to a particular revision. Which just creates a little more maintenance. I was actually trying to move away from this approach. I also like the ability to browse the project view in the repo-browser, which doesn't support externals as such.
GlobalReset
You can choose wether or not to pin externals to a revision, so you can go both ways
Sander Rijken