[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Utilities available to repair working copies? Checking before I write one.

From: K. Kaland <kevin.kaland_at_gmail.com>
Date: Fri, 13 Feb 2009 00:34:52 -0800 (PST)

Thanks Stefan. That sounds a lot quicker too. I'll stay away from
guaranteed trouble. Glad I did not spend the time writing it :)

Kevin

On Feb 12, 10:38 pm, Stefan Küng <tortoise..._at_gmail.com> wrote:
> K. Kaland wrote:
> > I started using a program called PowerFolder recently; it's a
> > synchronization program. Unfortunately, a combination of me allowing
> > it to delete empty directories and a bug in the program resulted in
> > havoc being wreaked on my SVN directories and a few of my files.
>
> > I have been able to recover, for all intents and purposes, by dragging
> > copies back out of the Repository Explorer where the files had been
> > removed, and they were picked up again in their correct state
> > (modified, up-to-date, whatever). However, these same files seem to be
> > lacking corresponding .svn-base files in the .svn\text-base folder,
> > invariably. Restoring all of these manually would be a nightmare, and
> > I still have another repository to recover.
>
> > The other thing that happened was that my .svn\tmp\entries files were
> > pretty much all wiped. I found that by simply creating an empty
> > entries file in a \tmp directory, I could fix this.
>
> > Overall, my recovery method has been effective, but very slow to do
> > manually. I am planning to write a simple program in Visual C# .NET
> > 2008 to basically do what I've been doing (for now, I've just been
> > committing the most important files directly to avoid errors):
>
> > 1. Iterate recursively through each versioned directory (meaning
> > a .svn subdirectory exists).
> > 2. If the .svn directory has no child tmp directory, create one, and
> > write a file called entries in text mode into that directory (or just
> > copy a pre-made skeleton tmp directory with an entries file inside of
> > it into the .svn directory)
> > 3. Build a list of the files in text-base without their .svn-base
> > extensions.
> > 4. Compare this list to the list of files in the directory that
> > the .svn directory is governing and build a list of those that have no
> > corresponding .svn-base entry.
> > 5. Copy the files with no .svn-base entry into .svn\text-base. These
> > files will generally be ones that were copied from the repo-browser,
> > so this should be valid.
>
> > Then I will manually run a Cleanup after all is said and done, and it
> > should work, I should be able to update and hopefully get to a good
> > state and then commit anything I need to.
>
> > Does anyone see loopholes or omissions in my logic? It seems like
> > it'll work to me, even though it's kinda hoakey, and maybe that's why
> > I can't find a utility for it on the Internet. Or maybe there is a
> > better way. I don't want to do a fresh checkout because I'll lose my
> > modified files (modified in comparison to the repo). I've already
> > unversioned several directories, and I know SVN is going to complain
> > when I try to add them back, and I'll have to do some housekeeping on
> > the repository again. But that should be manageable manually, cuz I'm
> > not bold enough to try touching anything in the repository itself!
>
> Just check out a fresh working copy!
> You'll get into much, MUCH worse trouble with your repair script -
> guaranteed.
>
> Because:
> * you simply assume that the .base entries are the same as your wc files
> (_completely_ wrong!)
> * ...
>
> I could list up another three reasons why your script will mess up the
> wc even more.
>
> A fresh checkout is your only option. But: that doesn't mean you're
> loosing your local mods. Just
> * export your current working copy (or unversion it, see
> here:http://tortoisesvn.net/node/343)
> * check out a new wc
> * copy all the files from the exported/unversioned original wc to the new wc
> * get rid of the old wc
>
> Stefan
>
> --
>        ___
>   oo  // \\      "De Chelonian Mobile"
>  (_,\/ \_/ \     TortoiseSVN
>    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
>    /_/   \_\    http://tortoisesvn.net
>
> ------------------------------------------------------http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessa...
>
> To unsubscribe from this discussion, e-mail: [dev-unsubscr..._at_tortoisesvn.tigris.org].
>
>  signature.asc
> < 1KViewDownload

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=1149718

To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-02-13 09:35:30 CET

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.