Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find files not added to subversion

The following issue is becoming increasing common:

  • There are several developers working on a project which includes new files (usually images)
  • Everyone says that everything is checked in and we freeze development. Unbeknownst to us, there are images which were not checked in. The user doesn't notice the missing files because they're new, not check-outs, so svn looks fine
  • The code is compiled and deployed (sorry, no QA team)
  • The next day the client tells us about the missing images
  • The CTO reads us the riot act

Note: The image paths are both in code and in databases so it's not easy to get a full list of all used images.

My hope is to write a small C# program for everyone to run before deployment. I want to find out which files in the project directory (or one of it's subdir.s, recursively) have not been added to subversion. Ideally, I'd also like to exclude items which were actively added to the ignore list.

We're using TortoiseSVN with Windows host and clients.

How can I programmatically discover non-added files?

The closest thing I've been able to find so far is this saying to use svn status | grep -e ^? but this looks like a Unix command.

like image 544
Dinah Avatar asked Oct 13 '10 18:10

Dinah


People also ask

How do I add files to 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…

How do I delete missing files from svn?

If you are using TortoiseSVN, just do a Check for Modifications, sort by the Status column, select all the entries marked missing , right-click to open the context menu, and select Delete.

How do you find changed files in svn?

The solution here is to either update your working copy or explicitly provide a revision number to svn log by using the --revision ( -r ) option. svn log also takes a --quiet ( -q ) option, which suppresses the body of the log message. When combined with --verbose ( -v ), it gives just the names of the changed files.

Where is .svn folder?

- the only . svn folder is in the root folder now, and this contains all of the info for the checkout. You should now be able to simply copy the folder and check it in.


1 Answers

svn status | grep -e ^?

It's unix command, but I'm pretty sure, than if you execute commit from Tortoise, you are able to see new files with question mark, that are files which are not under svn control

like image 62
Ency Avatar answered Oct 17 '22 01:10

Ency