3

we have a svn repository on a server, and some clients updating/commiting to it.

Now, the server crashed yesterday and the backup available is a week ok old, and has an older svn head saved. Let's say the Head from the backup is revision 2895.

The clients however have revision ie. 2930. When I try to commit to the server, I get an error that the revision on the server is a older one. I can't check in, I can't upgrade and I can't commit.

Has anybody an idea of what I can do to either increment the revision's counter on the server, or how to make a commit under this circumstances?

Thanks in advance.

user472532
  • 33
  • 3

3 Answers3

1

Can't you copy locally your 2930, revert to 2895 and then commit everything back to 2896?

Kodiak
  • 5,978
  • 17
  • 35
  • This is probably the way to go. – nobody Mar 22 '11 at 17:45
  • This makes sense. I'll have to do that for all the clients, so they upload and merge the changes. I'll try this out! Thanks – user472532 Mar 22 '11 at 18:56
  • Actually you have to do that once, and then revert every client to 2896. – Kodiak Mar 23 '11 at 14:05
  • By reverting from 2930 to 2896, would all the changes on the clients get lost? – user472532 Mar 23 '11 at 15:29
  • Ah, if they haven't been commited to 2930 you're right, my shortcut idea only applies if there weren't any local modifications. Everyone will have to export, revert and copy back their modifications :( – Kodiak Mar 23 '11 at 15:33
0

You can make a non-versioned temporary copy of the working copy at rev2930, check out rev2895 to a new folder, overwrite with the copy you made and commit to rev2896. This will require everyone else to do something similar (if they don't have any changes in their working copy, they can just check out a new working copy from rev2896).

R. Martinho Fernandes
  • 228,013
  • 71
  • 433
  • 510
  • Pretty sure this won't actually work, because it would send only diffs since the real r2930, and the repository only has the data through r2895. – nobody Mar 22 '11 at 17:47
  • @Andrew: of course! Stupid me. I somehow forgot the client only trades diffs with the server to get better performance. That's why it's so slow! Oh, wait... – R. Martinho Fernandes Mar 22 '11 at 17:53
  • In fact, this is what I just did. Made a check out of the rev2985 to a new local folder. Exported my local repo with rev2930 using the svn export tool that removes all .svn data and copied the files to the local rev2985 and then committed as rev2986. The problem now is that I have to do the same manually for the clients =( I hopped it would be an easy way, like a command for reversing or incrementing the rev count on the server. Thanks for your input! – user472532 Mar 22 '11 at 18:54
0

One solution is to make a checkout in a new folder and replace the files with the modified ones, then try to commit.

I'm not an expert and there may be a more elegant solution though.

Argote
  • 2,155
  • 1
  • 15
  • 20