On Mar 27, 2010, at 10:45 AM, Matthew Weinstein wrote: When I got home, I unzipped my archive, committed, and then deleted that and continued with the directory that had the additional changes. Subversion is not happy. It has given me a bunch of files with "U" next to their name and I can't figure out how to say to it, commit this file or the whole project, for that matter without getting an error
“U” in “svn status” means the file has updates in the repository that don’t exist in your working copy. If I understand correctly, you committed changes, then swapped in a previous working copy and tried to commit it too. You’ve created a conflict with yourself, just as if you were two different developers: your current working set doesn’t contain your latest checkin but the repository does. Maybe you haven’t worked with SVN in a team setting so you haven’t run into conflicts before?
If that’s what’s going on, • Do an “svn update” to pull down the latest from the repo including your last checkin. • If you get warnings about merge conflicts, that means you need to hand edit those files to resolve them. • Look for the lines with “<<<<“, “====“ and “>>>>” in them that delimit the pairs of conflicting changes. • Replace each such block with the correct code. • Once you’ve resolved conflicts in a file, type “svn resolved path/to/file” to tell SVN it’s fixed. • “svn status” now should show no files with a “U” or “C” (conflict) marker. Now you can check in as usual.
If you find yourself doing this kind of switching between development tracks often, you might want to look into a distributed version control system like Mercurial or Git. These have facilities for easily switching between local branches in your working copy, or even creating multiple local working copies and propagating changes between them. (Joel Spolsky has a great new online Mercurial tutorial at http://hginit.com/ , including a “Subversion re-education” preface.)
—Jens |