views:

133

answers:

2

Hi,

I have a subversion repo with directories that contain the usual source-controlled files, but in addition to that contain files that are a dependency for execution, but not checked into source control and instead added as svn:ignore (since they would be kept in duplicates all around the repo if they were checked in into all folders). (believe me or not but there is a reason that is at least half good for having this duplication of the ignored files ;-) )

Sometimes I want to branch out and make a local copy of the directory to do a certain defined development task, and then merge back into the trunk after a couple of checkins. When I take such a copy/branch of the folder, is there a way to make it copy all the files, including the svn:ignored ones as well into the newly created branch folder working copy (what I currently do is copying them over by hand after having used tortoise to create the branch) (but of course also still keep the :ignored files off the repo)

Many thanks in advance for help!

A: 

I believe that the answer is no, because Subversion doesn't know anything about those files, it thinks that you really want them to always be ignored. In fact, one of the methods of branching involves copying from one point in the repository to another (URL -> URL, whereas you are presumably talking about copying from the working copy to a branch) in which case there are no "ignored" files since it is copying directly between bits of the repository.

Though I don't see why the Subversion developers couldn't add a new feature to allow automatic copies of svn:ignore'd files when copying from a working copy (WC -> URL or WC -> WC).

It might not be difficult to write a script that checked the svn:ignore properties, and matched (just like svn does) those files, then copied them across too.

The command

svn status --no-ignore | grep '^I'

should give you a list of all ignored files. Pipe through sed to clean up the line, then xargs and you can quickly copy the files across. Albeit not automatically, which is what you are looking for.

Adam Batkin
+3  A: 

No, there is no way to do that. The main purpose of the svn:ignore property is to NOT store ignored files on the repository. How could the server guess what files you have on your computer?

gizmo
Thanks for your answer. That is exactly it, I do not want them to be stored on the repo, but I need them to be copied across to the branched directory in order to be able to run the application from there.
HKK
(clarification - across to the branched directory -> across to the branched directory working copy)
HKK