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

Possible Problem with auto-props

From: <tnoell_at_lexmark.com>
Date: 2003-11-13 22:01:35 CET

Hi SVN Team:

I know that the Auto Properties is "new", so I'm not picking at you ...

Just wanted to pass along a little problem I've observed with it ...
(BTW, subversion-0.32.1 on RedHat 8.0 ...)

Here is the contents of a binary file, tryit.c:

| Hex| 0 1 2 3 4 5 6 7 8 9 A B C D E F | Dec|0123456789ABCDEF|
========================================================================
| 0| 0000 0000 0024 5265 7624 0002 8894 0208 | 0|.....$Rev$......|
16|$.(@.......$R..$|
| 20| 0035 0395 0903 9059 3059 0395 0950 9350 | 32|.5.....Y0Y...P.P|
| 30| 0000 0000 000A AAAA AAAA AAAA AA** **** | 48|.............***|

As you can see, the sequence 24527624 is "$Rev$".

I have auto props enabled in my ~/.subversion/config file, as follows:
[miscellany]
enable-auto-props = yes
*.c = svn:eol-style=native;svn:keywords=Date Rev Author URL Id

So, when I do the svn add, here is what I get:

mls:/users/tnoell/cebu/mls_wc/src/trysvn->svn status
? tryit.c
mls:/users/tnoell/cebu/mls_wc/src/trysvn->svn add tryit.c
subversion/libsvn_wc/props.c:990: (apr_err=200009)
svn: Illegal target for the requested operation
svn: File 'tryit.c' has binary mimetype property
mls:/users/tnoell/cebu/mls_wc/src/trysvn->svn status
A tryit.c
mls:/users/tnoell/cebu/mls_wc/src/trysvn->svn commit -m 'added tryit.c'
Adding (bin) tryit.c
Transmitting file data .svn
Committed revision 283.
mls:/users/tnoell/cebu/mls_wc/src/trysvn->svn pl -v tryit.c
Properties on 'tryit.c':
  svn:mime-type : application/octet-stream
  svn:keywords : Date Rev Author URL Id
mls:/users/tnoell/cebu/mls_wc/src/trysvn->

File contents are now:

| Hex| 0 1 2 3 4 5 6 7 8 9 A B C D E F | Dec|0123456789ABCDEF|
========================================================================
| 0| 0000 0000 0024 5265 763A 2032 3833 2024 | 0|.....$Rev: 283 $|
| 10| 0002 8894 0208 2480 2840 0200 0000 0000 | 16|......$.(@......|
32|.$R..$.5.....Y0Y|
| 30| 0395 0950 9350 0000 0000 000A AAAA AAAA | 48|...P.P..........|
64|...*************|

Notes;
- obviously, I don't want to check in a binary file ending in *.c.
Just trying to test out auto-props, and see how well (or not) it is integrated with the rest of svn.

Observations:
1. While svn add complained, it still applied the svn:keywords property and did the add.
     Seems like it should tell me "no no" and die.
2. Keyword substitution is done on a file that svn knows is binary. Seems to me it should never do that.

What I am trying to do:
I'm thinking about using auto-props so that users are not burdened with having to do
svn ps svn:keywords "blah1 blah2 ..."
but since the user can edit their .subversion/config file, I don't want them to be able to do
anything dumb (like the above) by mistake.
Currently, I am wrapping svn add with a perl script, so unless this gets fixed
(or maybe it is a feature? I could be missing a requirement or some background, admittedly :)
I need an alternative.

So, is there any way to get subversion to detect mime type w/o doing the svn add?
I could do it in the wrapper, or I guess I could learn
how to modify the client, but that is my least attractive choice ...
What do you folks think?

Overall, I am tickled with Subversion and glad we are looking at using it.
Thanks to the community for all your hard work so far (and all the hard work yet to come :)

Tim

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Nov 13 22:02:43 2003

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.