tags:

views:

129

answers:

4

Lets say, I know there is going to be a conflict with me committing but I don't want to deal with merging or anything.

I simply want to overwrite the repositories version with my own. What is the tortoisesvn command to do so?

A: 

commit and then use local version?

PoweRoy
+3  A: 
  1. First you have to make an update (SVN Update), so the conflict is actually happening.
  2. Then you get three files in your directory: yourfilename.mine yourfilename.rX yourfilename.rY (X and Y are the original and the new revision numbers)
  3. Rename the .mine file to the original file name.
  4. Mark the conflicted file as resolved. (TortoiseSVN -> Resolved) (The .r? files will be deleted automatically)
  5. After that you can commit the file as it were a normal change. (SVN Commit)
DR
You need to be careful here that the working copy version is right when you mark it "resolved"--otherwise, your repository may be full of the "===" diff markers.
Michael Brewer-Davis
Of course, you are right. Fixed my answer.
DR
A: 

Another (horrible) possibility:

  • Check out the version you know you are going to conflict with into a separate directory from your own stuff
  • Copy your working files over the ones in the separate directory - take care not to copy the .svn files
  • Commit from the separate directory
anon
+2  A: 

Look at the svn resolve command from the red book. With a command line client, you would be able to run

svn update
svn resolve -R --accept mine-full

It doesn't appear that TortoiseSVN makes this available, but if you have the command line client as backup, it may be handy. Otherwise, I'd go with a hack of the sort Neil describes (move working copy files, update, replace working copy files).

A big caution: Using the Resolved... command instead will accept the conflict-containing version after the update; you really want the file before the update.

Michael Brewer-Davis