[svk-users] What to do when a db/revs/nnn file is sitting on a
bad sector
Jared Hardy
jaredhardy at gmail.com
Sat Oct 13 21:24:25 EDT 2007
On 10/13/07, David Landgren <david at landgren.net> wrote:
> it had to happen. I've had a sector go bad on my disk. And the sector in
> question has been allocated to ~/.svk/local/db/revs/1577. There are two
> subsequent revisions after that (1578 and 1579).
> Is there a way to recreate the file by looking at 1576 and 1578 and
> figuring out the difference?
Situations like this are why nightly backups are so important. Based
on how you structured your question, I assume you don't have any local
branches you care about losing. Also, look at your logs -- are there
any files that overlap between 1577 and any later revisions? Those are
the files you should backup in your Working Copy (WC) right away, to
prevent corruption. The easiest way may be to just save your WC
somewhere safe, and re-create your whole setup from scratch. You just
have to be patient enough to start a fresh sync from your mirror
source.
One hacky way around this might be to mirror a new .svk repository
from your old one, and use "svk sync --torev 1576 ..." to stop it
before the corrupt revision. Then you need to "--relocate" the new
mirror to the original source, and finish the sync from there. You
could even re-create any revisions that don't exist on the original
mirror source by re-committing any changes between rev 1576 and your
WC. Just create a fresh WC with an update to 1576, overwrite it with
your current WC, update to HEAD, resolve and commit.
:) Jred
More information about the svk-users
mailing list