-1

I need to ignore some directories and files created for the tools we use at work. I need to ignore those files on advance and save the property in the repository so other members of the team don't have to deal with ignoring the files (they're not developers, so they'll just stick to the basic usage of the svn client). File names are fixed (e.g. nbproject or _notes).

EDIT.

I think the question is not clear (and some people didn't take the time to read it properly): I need to ignore specific files/directories no matter in which subdirectory they are placed as long as they're under the main directory; i.e., /workspace//fileOrFolderToIgnore */fileOrFolderToIgnore doesn't work...

cablop
  • 177
  • 2
  • 6
  • IIRC, if you right-click->ignore the files with Tortoisesvn, you can then commit the parent directory and other members will see the change. – pav May 24 '13 at 21:27
  • http://stackoverflow.com/questions/116074/how-to-ignore-a-directory-with-svn – thekbb May 25 '13 at 13:32
  • @pav, yes it works for the parent directory and existing directories, but NOT for future directories, the other members of the team don't know how to ignore files and patterns and will fill the project with unnecessary files and directories – cablop May 27 '13 at 17:07
  • @thekbb, that does not solve the issue, because i need to know in the present the name of not existing directories that are going to be created in the future... i need to ignore the following /workspace//folderToIgnore being folderToIgnore its pattern... – cablop May 27 '13 at 17:11
  • You needn't know the name in advanced, you can use basic pattern matching and setup svn:ignore http://svnbook.red-bean.com/en/1.7/svn.advanced.props.special.ignore.html – thekbb May 28 '13 at 04:10

2 Answers2

2

There is no way clean way to set svn:ignore on a directory that doesn't yet exist. in svn 1.8 you can accomplish this with svn:global-ignores by setting it on the project root.

thekbb
  • 7,668
  • 1
  • 36
  • 61
0

You can't ignore what is already committed in Subversion. You can set svn:ignore for the subdirctories and files you want to ignore. Basically, ignored files and directories will not show up when you do svn st and won't be automatically added when svn add is done without specifically mentioning the files (NOTE: If you do svn add * in Unix, it will add in the ignored files because the shell will substitute in the names of the files first.)

To completely prevent someone from adding in a particular file name or pattern (or regular expression), you can try my pre-commit hook.

David W.
  • 105,218
  • 39
  • 216
  • 337