tags:

views:

43

answers:

2

I've got a folder under svn control. It may contain some modifications that may be conflicting with the working copy. I want to do

svn up --accept=theirs-full

but svn version is too old and doesn't suport 'accept' option. Is there an easy workaround for that except updating subversion? Version installed in there is 1.4

Basically, I want to update a folder and revert all conflicting changes while leaving other changes intact.

+1  A: 

You could svn up --non-interactive to update and leave everything conflicted then revert everything with a conflict afterwards.

If you're on Unix, you can use svn st |gawk '/^C/ {print $2}' to list all conflicting files then svn st |gawk '/^C/ {print $2}' |xargs svn revert or similar (untested) to actually do the revert.

If you're on Windows, I can't think of an easy way to do this without grep / sed / awk, sorry. If you do have one of those but not xargs then it's easy to turn a list of filenames into a command line using e.g. the visual studio editor (alt-drag to trim off the Cs then delete at the end of each line to build up a list).

Rup
I ended up doing that. Was hoping there's another svn command I'm not aware of that can do the trick in one blow.
clorz
+1  A: 

Why not update your client? The new clients (latest is currently 1.6.12) will continue working fine with older servers.

Also, we're running server version 1.4.5 and --accept works okay for us.

William Leara
I've got 1.4.4 on linux. Updating it pulls lots of dependancies and then fails to resolve some of them. Considering the fact that server got other stuff running and I know little about what it relies on, I don't feel comfortable about the update.If it was windows I would've certainly done that.
clorz