12

I use TortoiseSVN to manage my SVN files. This all works quite well, but I have to manually add new files to SVN before I commit them.

In 99% of the cases that's exactly as wanted, but now I have a folder which contains logfiles that should be stored in SVN, but they are too dynamic to add them all manually.

So what I want is that I just commit the folder and all new files are automatically added and then committed.

I've seen a solution here, but not with TortoiseSVN.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Ole Albers
  • 8,715
  • 10
  • 73
  • 166
  • 1
    Not an answer to your question, but is it really a good idea to store log files in a svn repo? That usually doesn't make sense – Pekka Mar 28 '11 at 10:11
  • This SVN command helped me find files that were not added and were not being ignored by the ignore rules (otherwise anytime i see unversioned files, they are ones i usually want to ignore). http://stackoverflow.com/questions/3927009/find-files-not-added-to-subversion – Valamas Jul 18 '15 at 08:43

1 Answers1

16

In the TortoiseSVN Commit dialog, select the "Show unversioned files" checkbox and then check "Select / deselect all". Now all your unversioned files are added. This is the closest you can come to "automatic" in TorsoiseSVN.

Edit
Wait a moment, there are actually client side hook scripts in TortoiseSVN. You can probably add a "start commit hook" that runs svn add * in the desired folder.

Albin Sunnanbo
  • 46,430
  • 8
  • 69
  • 108
  • 6
    Worked! For all those, who need this too, the correct commandline for the hook script in TortoiseSVN is :`TortoiseProc.exe /command:add /path:"*" /closeonend:1"` – Ole Albers Mar 28 '11 at 11:59
  • Just adding a note here to say be careful using the client side hook scripts, you will probably end up adding files you don't want on the SVN (Log files, .dlls, etc) if you aren't careful. – Ravendarksky May 03 '16 at 13:57
  • Why not use the glob to filter, e.g. *.cpp? In a real shell you can even do something like *.{h,cpp} – Marshall Eubanks Oct 17 '18 at 16:59