Number8
Number8

Reputation: 12870

How do I recover a removed branch in subversion?

A branch got removed from our repository, and now we think it has code we want to keep after all...

command line, Tortoise, SmartSVN, all good...

Upvotes: 3

Views: 5624

Answers (4)

MarkPowell
MarkPowell

Reputation: 16530

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.

Upvotes: 10

Yoopergeek
Yoopergeek

Reputation: 5642

This is the same thing as MarkPowell's answer, but specific to TortoiseSVN.

View the log for the branch's parent folder, find the revision you want, right click and choose "Create branch/tag from revision", right at the bottom of this screenshot:

alt text

Upvotes: 6

Chuck Conway
Chuck Conway

Reputation: 16435

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

Am I missing something?

Upvotes: 0

dicroce
dicroce

Reputation: 46770

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...

Upvotes: -4

Related Questions