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

Re: svn commit: r1406870 - in /subversion/trunk/subversion: libsvn_wc/update_editor.c libsvn_wc/wc_db_wcroot.c tests/cmdline/special_tests.py

From: Peter Samuelson <peter_at_p12n.org>
Date: Thu, 8 Nov 2012 11:57:10 -0600

[Daniel Shahaf]
> Did you mean:
> $ printf 'link bar' > foo

Yes I did mean that - thanks.

> > $ svn add --config-option config:miscellany:enable-auto-props=yes \
> > --config-option config:auto-props:foo=svn:special=1 foo
> > A foo
> >
> > $ ls -l foo
> > -rw-r--r-- 1 peters peters 4 Nov 8 10:57 foo
> >
> > $ svn ci -mm
> > svn: E145001: Commit failed (details follow):
> > svn: E145001: Entry '/tmp/foowc/foo' has unexpectedly changed special status
>
> Given that "bar\n" does not start with "link ", I think this commit
> should have succeeded. (Just like the "printf 'link bar'" variant
> succeeds on windows)

Or, alternately, it should have failed because svn does not recognise
the 'bar' special type.

Anyway, we discussed this a bit on IRC and further discovered:

- 'svn add' with auto-props fails on Unix but succeeds on Windows,
  presumably because the subsequent 'commit' does not expect to find a
  literal symlink on Windows.

- 'svn propset svn:special' behaves the same: it does not convert a
  file into a symlink, therefore on Unix the subsequent commit fails.

- For a different case, svn:executable, both 'svn add' with auto-props
  and 'svn propset' have the correct side effect of making the file
  executable.

So to me it looks like 'svn add' with autoprops is a working subsitute
for 'svn propset'. Apparently both methods can be used to create a
symlink in Windows. Neither can be used to create a symlink in Unix.

The bug in which setting the 'svn:special' property does not transform
a file into the appropriate special type is a different issue, not
specific to 'svn add' with auto-props. That bug should not prevent us
from restricting 'propset' / 'propedit' / 'svn propdel' of svn:special,
if we so desire.

Final point: '--auto-props --config-option config:auto-props:*=a=b' is
certainly a bit cumbersome - we may want a new convenience option
'svn add --with-prop a=b'. (Nothing to do with svn:special per se,
this could be used for any file props, as a shortcut.) But for the
present thread, creating a symlink on Windows is today is already not
very intuitive for most users, I would guess. They probably already
have to look up the 'propset' line in a tutorial or cookbook.

Peter
Received on 2012-11-08 18:57:48 CET

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