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

Re: "unknown node kind" ?

From: Ryan Schmidt <subversion-2007a_at_ryandesign.com>
Date: 2007-03-24 05:53:39 CET

On Mar 23, 2007, at 22:05, Kylo Ginsberg wrote:

> if a symlink is checked in with svn:executable set, and the symlink
> points at a file which follows the symlink in checkout order, then
> checkouts on linux (maybe any platform which supports an execute bit)
> will fail.
>
> Nasty. The workaround was to check out the directory with the symlink
> under windows (which doesn't have an execute bit or symlinks) and
> propdel the svn:executable bit.
>
> This could be a frequent problem in a unix-y environment because it is
> very common to have a foo.so which is actually a soft link to a
> like-named file with a version suffix, e.g. foo.so.4.
>
> Any ideas on how to prevent these from getting committed in the
> first place?

Here's a pre-commit hook to prevent this:

#!/bin/sh

REPOS="$1"
TXN="$2"

SVNLOOK=/opt/local/bin/svnlook
CUT=/usr/bin/cut

for ITEM in `$SVNLOOK changed -t "$TXN" "$REPOS" | $CUT -c 5-`; do
        $SVNLOOK propget -t "$TXN" "$REPOS" svn:special "$ITEM" >/dev/null
2>/dev/null
        if [ $? -eq 0 ]; then
                $SVNLOOK propget -t "$TXN" "$REPOS" svn:executable "$ITEM" >/dev/
null 2>/dev/null
                if [ $? -eq 0 ]; then
                        echo "Thou hast set the executable bit on the symlink \"$ITEM\"."
1>&2
                        echo "Thou shalt not do that! It doth screw Subversion up verily."
1>&2
                        exit 1
                fi
        fi
done

-- 
To reply to the mailing list, please use your mailer's Reply To All  
function
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Mar 24 05:54:07 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.