FrankTheTank
FrankTheTank

Reputation:

How do I overwrite the contents of the repository with my working copy in TortoiseSVN?

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?

Upvotes: 5

Views: 10399

Answers (3)

Michael Brewer-Davis
Michael Brewer-Davis

Reputation: 14276

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.

Upvotes: 6

Daniel Rikowski
Daniel Rikowski

Reputation: 72514

  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)

Upvotes: 9

anon
anon

Reputation:

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

Upvotes: 1

Related Questions