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

RE: Working copy locked problem

From: Erik Hemdal <erik_at_comprehensivepower.com>
Date: 2007-02-08 14:32:01 CET

> > A mechanism to find and remove all the .svn directories in a
> > working copy
> > would help. That wouldn't really repair anything but would at
> > least result
> > in clean local files that you could put into a fresh WC. I
> can see
> > that
> > this is clearly a client-side thing, but something that was part of
> > Subversion would be nicer than a script that individuals wrote
> > themselves.
>
> You can do this with svn export:
>
> svn export /path/to/working-copy /path/to/export
>
> However I don't know what happens if the working copy has
> modifications -- does it export the modified files or the unmodified
> files?

Thanks Ryan. I tried that and it works. The export out of a working copy
gives you the modified files, which would
be precisely what we want. My clients are on Windows and we use Tortoise.
Nice to know that.

But if the .svn directory is damaged, it doesn't work, and Tortoise tries to
export from the repository. I can't see how it could do anything else, so
there's no complaint. If we need to do this, it would be because the WC has
been mangled. So it's not exactly the solution to the problem I face. I'd
want to do this because my WC is broken and I need to salvage local
modifications.

>
> You can also easily remove all .svn directories using a find
> construct:
>
> cp -RPp /path/to/working-copy /path/to/export
> find /path/to/export -type d -name .svn -print0 | xargs -0 rm -rf
>
> Or with rsync:
>
> cd /path/to/working-copy
> rsync --archive --cvs-exclude . /path/to/export
>

If I were on Linux or UNIX, sure. But the developer who always gets bit by
this is stuck on Windows XP. So he only has an annoying little puppy! :-(
It's awkward and slow. We could do it from a DOS box, but that's not much
easier in our situation.

But I'm now wondering if there's a way to tuck a DOS command somewhere in
Tortoise so we can do this easily. I'll have to work on that when I get
some time.

Anyway, I appreciate the tip about exporting from the WC. Erik

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Feb 8 14:32:35 2007

This is an archived mail posted to the Subversion Users mailing list.

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