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

Re: BDB vs. FSFS

From: Preben 'Peppe' Guldberg <peppe_at_wielders.org>
Date: 2004-10-20 20:03:13 CEST

Nik Derewianka wrote:

> We do multimedia development for cd's and dvds - big projects with lots
> of files. Using svn with bdb via apache2 on a win2k3 server, we havent
> had any problems as yet during the trials (only just ramping up to full
> production team now). The only annoying thing i have found for large
> projects is getting rid of the .svn folders when you have lots of nested
> folders and you have to prep the project for a disk image. Currently i
> do a search on the project folder for '.svn', select just the folders in
> the results pane and delete.. but that doesnt work as nicely as possible
> (windows is the culprit here - nothing to do with svn). Would be nice
> if tortoise had a 'Strip .svn folders' option.

While talking of unixy ways to delete the folders, wouldn't it be better
to simply move them aside for a while. Otherwise you'd have to do work
similar to a checkout to get the directory back under version control
again.

Say you directory is called "proj", I'll store the .svn directories in
proj.svn. I talk unix better than dos, but what I have in mind
is a little script like this:

    #!/bin/sh
    #
    # Move all .svn directories in $1 to $2.
    # $2 is created if it does not exist.
    #
    # TODO: handle character sed could choke on: [, \ and possibly others.
    # TODO: handle moves from . to ../dir

    if [ $# -ne 2 ]; then
        echo "$0: please specify two paths." >&2
        exit 1
    fi

    from="$1"
    to="$2"

    # sed does: quote the path, save it, replace $from by $to, strip
    # .svn from $to, append $to to the saved $from, create the
    # command to run (two steps), replace newlines from H and G
    find "$from" -type d -name .svn \
        | sed -e 's:.*:"&":' \
              -e h \
              -e "s:^$from:$to:" \
              -e 's:.svn"$:":' \
              -e H \
              -e 's:.*:mkdir -p &; mv:' \
              -e G \
              -e 's:\n: :g' \
        | sh -x
    # EOS

Name the script eg. mvsvn and you could do

    $ mvsvn project project.svndirs

use the clean version of your project, and then revert your changes with

    $ mvsvn project.svndirs project

Preben

-- 
se nocp cpo=BceFsx!$ hid bs=2 ls=2 hls ic " P. Guldberg /bin/vi@wielders.org
se scs ai isf-== fdo-=block cino=t0,:0 hi=100 ru so=4 noea lz|if has('unix')
se sh=/bin/sh|en|syn on|filetype plugin indent on|ono S V/\n^-- $\\|\%$/<CR>
cno <C-A> <C-B>|au FileType vim,mail se sw=4 sts=4 et|let&tw=72+6*(&ft=~'v')
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Oct 20 20:03:50 2004

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.