4
votes

We've been using Source Safe for years. Now we use Tortoise SVN. It's quite a problem to not forget to add new files to the repository - Source Safe had integration with Visual Studio but I don't see any for Tortoise SVN and so I often forget to add files and this breaks the build.

Is there some industry-wide practice for simplifying adding new files? Maybe some Tortoise SVN command like "show me all unversioned files"?

9

9 Answers

14
votes

In the Commit window, there's a checkbox in the lower left "Show unversioned files." Check it, and you'll see everything that hasn't been added to the repository. You'll want to use this in conjunction with either global ignores which are in Tortiose's settings, or with svn ignores (right click on the file, add to ignore list).

4
votes

One really good (and free) VisualStudio integration for svn is ANKH Svn. If you add files or projects to a solution it automatically adds it to the svn and commits them like you are used to from Tortoise. There is a "pending changes" window which also shows added files which haven't been comitted yet.

4
votes

Apart from Tortoise's option to "show unversioned files", I'd suggest having a continuous integration server checking your builds. At least for me, this ensures that if I do forget to add a source file, the server finds out before any of my colleagues get to roll their eyes at me for forgetting.

3
votes

Tortoise also add small icons over the files in Windows Explorer, unversioned files have a blue question mark over them and it's quite easy to spot them and remeber to add them.

1
votes

Tortoise does have a command to show the unversioned files. There is a check box for it at the bottom of the commit dialog.

There are also several plugins for integrating svn into Visual Studio like VisualSVN and Ankh

1
votes

As well as "show unversioned files", as others have mentioned, Tortoise SVN also lets you add the versioned state as an explorer column, which you can sort by. I've found this to be useful to visually see unversioned files in one place in a directory listing - but obviously only one folder at a time.

In either case, it's best to use these in conjuction with svn-ignore (which Tortoise makes easy), so you don't get binaries and other generated files showing up as noise.

1
votes

When you commit, TortoiseSVB shows a list of all unversioned files, if you enable the checkbox for it.

SVN also has add-ons for Visual Studio. AnkhSVN is one on the top of my head.

0
votes

You already said it: Tortoise has a

show unversioned files

checkbox to the bottom of the commit dialog and the "Check for modifications" window.

0
votes

The solution I use now is the following.

When I need to add files to a project I of course use the "Add existing items" dialog, but this dialog shows files exactly the same way as Windows Explorer does and I can run any Tortoise SVN commands there. So I just do "SVN Add" there and then add files to the project.