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.
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).
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.
精彩评论