NeedsEducation
NeedsEducation

Reputation: 115

Subversion create mirror of local

In our small class group, we've had a stuffup with subversion (we are still learning how to use it properly). Basically, the whole last revision is bogus.

What I would like to do is make the next revision an exact copy of what is on my local computer - the files that are on my computer are on the server, and the files that aren't on my local computer aren't in this revision.

What I was going to do is reset the repository and start from scratch, but I don't want to lose our last revisions.

Using TortiseSVN and Google code, how can I accomplish this task?

Upvotes: 0

Views: 188

Answers (2)

Nikola Smiljanić
Nikola Smiljanić

Reputation: 26873

I'm not sure I understand what you want. You can use 'revert changes from this revision' in Tortoise log window do undo changes from revision(s). This will undo the changes in your working copy and you'll have to commit them.

If your working copy contains changes that you'd like to save you have more the one option.

  1. commit your changes anyway, and changes only from your problematic revision (in case your current changes don't overlap too much with the problematic revision)
  2. create patch from your current changes and save it, then undo your local changes, revert problematic revision, commit, apply patch, commit (this is equivalent to previous approach, you just do everything yourself.
  3. checkout new trunk and use it to revert problematic revision, commit, update the trunk with your local changes and hope everything updates without conflicts
  4. if you can access the repo on the server you can create a backup then filter out problematic revision and restore the dump (do this only if you must)

Upvotes: 2

UrK
UrK

Reputation: 2300

First of all, you cannot not "reset the repository" short of deleting the repository backing store, which, in case of Google Code you cannot do anyways. Even if you delete all the files and directories from the repository, the history and old revisions are there.
Second, just checkout the HEAD from the repository into separate directory, and replace every data file with your local version. Be careful not to touch .svn directories.

BTW: those are two different solutions: one to delete everything and start from scratch, while the second is doing this semi-manually.

Upvotes: 0

Related Questions