views:

295

answers:

2

I have a folder structure like this:

/some_folder
/tmp
/tmp/foo
/tmp/foo/fu      *
/tmp/bar
/tmp/bar/bah     *
/tmp/bar/ba      *
/tmp/foobar      *
/more_folders

The /tmp directory is being used for caching and whatnot, so I want to have the folder structure under version control, but ignore all the files inside each directory.

Files will only exist in the leaf folders. That is, folders with no subfolders of their own: the starred ones in the above example.

Is my only option to set ignore *.* on each leaf, or is there a way to ignore all files (and just the files) in the entire /tmp subdirectory?

+1  A: 

I believe that you'll have to add the entire structure when its empty, then set ignore to * on each leaf.

I suppose that, if none of your tmp folders have dots in their names and all of your files do have dots, that setting an ignore at /tmp for *.* might work.

Doug Hays
thanks for the tip! unfortunately, I just remembered that the files don't all have dots in them!
nickf
A: 

I have just tested with Tortoise on Windows, added svn:ignore for * instead of . and it ignores now directories too :)

So the solution would be to add property svn:ignore * on /tmp

Alexandru Trandafir Catalin
as for your question, maybe it will be better to have an install script create the folders
Alexandru Trandafir Catalin