I have a repository with some files ending in .scc
There is one of these files in just about every subfolder of the repo and they are all committed.
I’m using:
TortoiseSVN 1.6.15, Build 21042 – 64 Bit
Subversion 1.6.16
With TortoiseSVN I can go into each folder and right-click on the file and select “Delete and add to ignore list” but that’s a pain to do that in each and every folder. So I am basically looking for an easy way to recursively do exactly the same as TortoiseSVN’s “Delete and add to ignore list”. Either through TortoiseSVN or the command line.
To add a file to the ignore list, you can update your
%USERPROFILE%\local data\.subversion\configfile. (I’m not 100% sure where it’s located, but it should be under the.subversiondirectory somewhere under your %USERPROFILE% directory. Unix and Macs, it would be under$HOME/.subversion/config.In that file, there’s a
global-ignores=parameter. You can remove the#in the front of it (if it’s not already removed), and add.sscto it. It’s around like #90 in my version of this file.Now, you’ll have to figure out a way to delete all of these
.sccfiles. All you have to do is this:Wait, you’re using Windows. That’s harder. I don’t have a Windows machine in front of me, but I know you can find all of thes
*.sccfiles by doing this:You might be able to pipe this into a
forloop of some sort, and pass it to asvn delstatement. Even if I had a Windows machine, it can take me a while to work out the syntax. Since I don’t have a Windows machine in front of me, it’s even more difficult.Easiest way would be to redirect the output to a file, and then edit the file using a good program editor (by which I mean not
notepad.exe):Now, you can use Notepad++ to edit your file and quickly prefix each line with a
svn del. Run thisdelete_me.batfile, and it will remove all of your*.sccfiles. (I personally prefer Vim, but then I’m a masochist).The big question is how to prevent adding these files back. Ignores set up as I showed you are client specific. You could setup a
svn:ignoreproperty in each directory. This is a more global version that affects everyone, but it still won’t prevent someone from adding them because the files will still show up in Windows Explorer.I have a pre-commit hook that can be setup, so no one will ever be able to add in these
.sccfiles again. You could also set it up not to include the other types of files that VisualStudio puts in too.