Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I resolve all SVN conflicts automatically? (Windows CLI)

I'm trying to automate some Subversion processes and I'm running into problems with conflicts. When I merge two branches, sometimes I get tree conflicts and regular (text) conflicts. I'd like to be able to resolve everything using the repository copy:

svn resolve . -R --accept theirs-full

but if there are tree conflicts, it yells at me and says I have to resolve them to the working state.

svn: warning: Tree conflicts can only be resolved to 'working' state; 'file' not resolved

Is there an easy way to resolve just the tree conflicts to 'working' so that I can then continue to resolve the text conflicts with theirs-full? Or maybe another way to accomplish my goal entirely? I'm looking to do this through the Windows command line. Thanks!


Subversion server is version 1.6.6

I'm using CollabNet Subversion Command-Line Client v1.6.13 (for Windows)

like image 829
vincentj Avatar asked Oct 18 '10 19:10

vincentj


People also ask

How can I see SVN conflicts?

Step 1: View ConflictsSelect: (p) postpone, (df) diff-full, (e) edit, (mc) mine-conflict, (tc) theirs-conflict, (s) show all options: Subversion is complaining that there is a conflict with the README file, and Subversion does not know how to solve this.

How do tortoises resolve conflict?

In order to resolve the conflict use TortoiseGit → Resolve... and then right click on the conflicted file and choose one of Resolved (the current version of the file which is in the working tree will be used), Resolve conflict using 'mine' (the version of the file of your HEAD will be used), and Resolve conflict using ...


1 Answers

Simple solution/workaround:

svn st | grep "^C" | sed "s/^........//" | xargs svn resolve -R --accept=theirs-full

than just resolve tree conflicts to wc:

svn resolve -R --accept=working

Not very nice, just works.

like image 73
Kribesk Avatar answered Sep 16 '22 16:09

Kribesk