Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatically add files to SVN inside a specific folder

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.

like image 529
Ole Albers Avatar asked Mar 28 '11 10:03

Ole Albers


People also ask

How do I commit newly added files in svn?

Select the file(s) and/or directory and use TortoiseSVN → Add. After you added the files/directories to source control the file appears with a added icon overlay which means you first have to commit your working copy to make those files/directories available to other developers.

What is the command to add a file or directory svn?

Adding a File or Directory To add an existing file to a Subversion repository and put it under revision control, change to the directory with its working copy and run the following command: svn add file… Similarly, to add a directory and all files that are in it, type: svn add directory…

Can multiple files be added in svn?

Edit These files exist in a directory tree so adding * for one directory will not work. @your edit: So then provide multiple paths to add like: svn add dir1/* dir2/* dir3/* or as many have mentioned grep the ouput of svn stat from the root and pipe it to cut or awk and then to add.


1 Answers

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.

like image 74
Albin Sunnanbo Avatar answered Oct 19 '22 22:10

Albin Sunnanbo