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

Re: creating a branch from an old revision

From: Ryan Schmidt <subversion-2005_at_ryandesign.com>
Date: 2005-03-09 10:58:23 CET

On 08.03.2005, at 21:28, Charles Doucette wrote:

> Unfortunately, since we're using Subversion on Windows with MS Visual
> Studio web projects, we chose to use the special version of
> TortoiseSVN which uses "_svn" for the administrative directory rather
> than ".svn".
> Assuming we wanted/needed to use the command line version of svn, and
> we can successfully migrate from "_svn" to ".svn", I want to ask about
> the semantics of the various use cases for the copy command for a
> branch.

I don't know the answer to your primary question. If you want to keep
using _svn directories with Tortoise and simply want to also use this
from the command line, your best bet may be to compile your own
command-line client that also uses _svn directories. If this is not an
option, or if you really want to migrate -- as in, stop using _svn
directories and switch to .svn directories for Tortoise as well -- read

I'm not sure where all the .svn vs. _svn distinction is made. If it's
only the name of the directory -- and not any of its contents -- then a
script to rename the directories would be an answer. (This is assuming
you couldn't just trash the working copy and check out a new one.) The
following script kinda does it, but has the unfortunate side-effect
that find complains that it can't find the directory anymore after it's
been renamed. It works correctly, it just prints one line of error for
each directory it renames:

find . -type d -name _svn -exec 'perl' '-e ''$a=$b="{}";
$b=~s/_svn$/.svn/; rename $a,$b;''' ';'

In the event that you need the reverse script, to rename .svn
directories back to _svn, that's this:

find . -type d -name .svn -exec 'perl' '-e ''$a=$b="{}";
$b=~s/\.svn$/_svn/; rename $a,$b;''' ';'

The errors that find throws could be avoided by rewriting this as a
proper perl script that does its own directory traversal and knows to
not descend into the directories it has just renamed. Alas, this is
left as an exercise for the reader.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Mar 9 11:00:56 2005

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.