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

Re: [PATCH] Change file names in text-base and prop-base

From: Kevin Pilch-Bisson <kevin_at_pilch-bisson.net>
Date: 2001-11-08 19:51:50 CET

On Thu, Nov 08, 2001 at 12:11:11PM -0600, Karl Fogel wrote:
> +1
>
> I think this is a very good idea -- we should take as many steps as
> possible to prevent people from accidentally corrupting their base
> files. The steps need not be mutually exclusive, and include:
>
> 1. making base files read-only, so it's harder to accidentally edit
> them, see issue #532,
>
> 2. making sure they never show up as a filename in a patch file,
> which we can do with --label (not sure if there's an issue # for
> that?),

#556

>
> 3. storing checksums for bases (issue #549), plus perhaps a
> semi-automated mechanism for refetching whenever a checksum
> shows that something got corrupted,
>
> 4. Kevin's patch below, which makes all base files have a special
> extension, thus foiling `find', tags tables, and other common
> ways people might accidentally end up in their text base files.
>
> If anyone has reservations about #4, please say something... and we
> should wait a couple of days before applying this, so there's time
> to discuss if anyone objects.
>
> (By the way, rather than ask people to re-checkout their working
> copies for #4, Kevin, could you post a script to convert their working
> copies to the new format?)
>

Here it is:

#!/bin/sh

SVN_DIRS=`find . -name working_copies -prune -o -name .svn -type d -print`
for dir in $SVN_DIRS; do
    TEXT_BASE_FILES=`find $dir/text-base -type f -print`
    TMP_TEXT_BASE_FILES=`find $dir/tmp/text-base -type f -print`
    PROP_BASE_FILES=`find $dir/prop-base -type f -print`
    TMP_PROP_BASE_FILES=`find $dir/tmp/prop-base -type f -print`
    for file in $TEXT_BASE_FILES $TMP_TEXT_BASE_FILES; do
        mv $file $file.base-svn
    done
    for file in $PROP_BASE_FILES $TMP_PROP_BASE_FILES; do
        mv $file $file.base-svn
    done
done

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kevin Pilch-Bisson                    http://www.pilch-bisson.net
     "Historically speaking, the presences of wheels in Unix
     has never precluded their reinvention." - Larry Wall
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  • application/pgp-signature attachment: stored
Received on Sat Oct 21 14:36:48 2006

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

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