[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: Kylo Ginsberg <kylo.ginsberg_at_gmail.com>
Date: 2007-03-24 06:31:19 CET

On 3/23/07, Ryan Schmidt <subversion-2007a@ryandesign.com> wrote:
> 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

Cool. Thanks Ryan. It looks like this was one of the 10 commandments
and I didn't even know it ... ;>

It does indeed screw Subversion up verily! I added a trivial shell
script to reproduce this problem (on another thread). [Off searching
issue tracker ...] Wow; this bug was reported almost 2 years ago:
http://subversion.tigris.org/issues/show_bug.cgi?id=2344

Given the longevity of the bug and (to my mind) its badness, I wonder
if there's something architectural that prevents a fix?

Thanks again for the pre-commit snippet!
Kylo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Mar 24 06:31:43 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.