When I have several conflicts, is there a way to resolve them all by just telling SVN to keep the version that is in the repository? Unfortunately, we're still using 1.4.
Asked
Active
Viewed 2.3k times
17
-
3Why would you want to do that? lets say you made a 200 line change and someone checked in a file right before you that simply added a few comments, causing a conflict. Are you just going to throw your 200 line change away for that? – z - Jul 10 '09 at 14:02
-
3it's a case where i know that all the changes in some working copy are junk, and want to use the repos' version. – nategood Jul 10 '09 at 14:10
3 Answers
38
I believe if you run the command svn revert . -R
, you basically undo all changes to your working copy. If there are conflicted files, SVN tosses out your changes and uses the revision you've most recently updated to.
Of course, this also gets rid of changes to files that aren't conflicted.

Nick Meyer
- 39,212
- 14
- 67
- 75
-
1SVN tosses out your changes and uses the version you originally checked out; you still need to do an svn update to get the current HEAD version from the repository. – Roger Lipscombe Jul 10 '09 at 14:04
-
@Roger: but if you have conflicted files, then you've run svn up. It is the version that svn up pulled from the repository that svn reverts to (unless this changed, I tested it with 1.6.3). – Nick Meyer Jul 10 '09 at 14:09
-
-
nice idea. i'll leave it open for a while to see if there's a more elegant solution. – nategood Jul 10 '09 at 14:11
-
this does not get rid of folders that are in conflicted state. however answer https://stackoverflow.com/a/1109832/528020 does – seven Feb 27 '20 at 09:24
5
svn update . --accept theirs-full
Or is that not available in svn 1.4?
You could try and run the 1.5 client against a 1.4 server, might work.

seven
- 2,388
- 26
- 28

Michael Wiles
- 20,902
- 18
- 71
- 101
-
I ran a 1.5 client with a 1.4 server for a while. For most purposes it works fine, but you lose the automatic merge tracking, for one thing. See the "compatibility concerns" in the 1.5 release notes (http://subversion.tigris.org/svn_1.5_releasenotes.html). – Nick Meyer Jul 10 '09 at 14:26
1
You can try
svn st | awk '/^C/ { print $2 }' | xargs svn revert
this revert all files with conflicts

Ben
- 51,770
- 36
- 127
- 149

Nicola De Nisco
- 92
- 3