tags:

views:

105

answers:

4

What the title says.
A branch got removed from our repository, and now we think it has code we want to keep after all...
Thanks for any advice -- command line, Tortoise, SmartSVN, all good...

+6  A: 

Copy the revision before it was removed, this will restore the branch as it existed in [REVISION] to the HEAD revision.:

svn copy -r [REVISION] http://svn/path/to/branch http://svn/path/to/branch

Edit: Clarification added thanks to Michael Hackner.

MarkPowell
To clarify: this will restore the branch as it existed in [REVISION] to the HEAD revision.
Michael Hackner
Thanks for the reply. I did this with checkout, instead, to get a local copy.
Number8
A: 

Is the server a Unix box? If so, you can try plugging it into another machine and then without mounting it, dd the contents of the device to a file... You could then use a combination of strings and grep to locate the bits of value... Though this is tedious and not much fun...

dicroce
This isn't necessary with Subversion. Subversion keeps stuff, unless you dump the contents of the repository to another file, remove stuff from that, and dump it back in. (Yes, that does sometimes constitute a problem.) The data's there somewhere, the only problem is getting Subversion to use it.
David Thornley
Since the OP specifically mentioned TortoiseSVN, and that's a shell extension for Windows Explorer, chances are VERY good it's not a Unix box. Also, as David mentioned, none of the other stuff in your answer applies either.
Ken White
diroce asked if the server was Unix. TortoiseSVN is a client. The fact that a client runs on Windows tells us nothing about the server's OS.
cdmckay
Sorry! Misunderstood the question...
dicroce
A: 

Can't you use repo browser and go back a couple revisions?

Am I missing something?

Chuck Conway
Not a regular Tortoise user; so far, that has the easiest to use interface for browsing previous versions.Thanks.
Number8
+2  A: 
Yoopergeek