views:

1223

answers:

1

Hello

I had some problems with my subversion server and i had to restore it from backup but it is an older one. For example i have the server at revision 400 but my working copy is at 405. How can i get my working copy to an older revision withought loosing my work and recommit the changes.

Thanks a lot

+4  A: 

If I understand, which I am 100% sure I don't!

  1. Make a copy of your working directory at 405
  2. Checkout 400
  3. Copy back (minus the .svn meta) files from 405 to 400 checkout
  4. Commit 401.

Thanks Dave - To copy the working directory from 405 over your 400 commit:

[aiden@devbox ~]$ svn export --help
export: Create an unversioned copy of a tree.

Making sure you don't wipe-out 400's .svn directories. Make sure you got everything added with

[aiden@devbox ~/my400co]$ svn status

If you want the server back at 405 (but the new 405 :S) ... do some small commits and then a big dirty one at 404->405

I am presuming that your checkout copy contains the entire trunk and is a consistent trunk to recommit. Otherwise, you have data holes :)

Then tell everyone else to update their code from the repo! otherwise people might start making drunken commits!

Aiden Bell
This is my understanding too...
lc
@lc - I thought the redbull was distorting things :P Thanks!
Aiden Bell
To do the copy without .svn folders, you can use "svn export"
David
@Dave, thanks will add!
Aiden Bell
instead of having to copy manually you could use diff and patch
wds
@wds - :) Keepin it simple
Aiden Bell
thanks ... this what i was looking for
solomongaby