You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Stan J <th...@yeah.net> on 2006/04/12 13:22:32 UTC

problem of setting auto-props

I'm using subversion 1.3.0 under freebsd 4.11
I set my config file like below.
=========================
[miscellany]
enable-auto-props = yes

[auto-props]
*.xls = svn:needs-lock=true
*.XLS = svn:needs-lock=true
=========================

I'm expect that this will set needs-lock property when I add both
*.xls and *.XLS files.
The fact is like below
=========================
~/work/test> echo aaa > aaa.xls
~/work/test> echo BBB > BBB.XLS
~/work/test> ll *
-rw-r--r--  1 0037  users  4 Apr 12 21:14 BBB.XLS
-rw-r--r--  1 0037  users  4 Apr 12 21:14 aaa.xls
~/work/test> svn add *
A         BBB.XLS
A         aaa.xls
~/work/test> svn ci * -m "test"
Adding         BBB.XLS
Adding         aaa.xls
Transmitting file data ..
Committed revision 1.
~/work/test> ll *
-r--r--r--  1 0037  users  4 Apr 12 21:14 BBB.XLS
-rw-r--r--  1 0037  users  4 Apr 12 21:14 aaa.xls
=======================================

*.XLS is readonly but aaa.xls is still writeable.
Did i do anything wrong?

regards.
Stan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: problem of setting auto-props

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 4/12/06, Garrett Rooney <ro...@electricjellyfish.net> wrote:
> On 4/12/06, Garrett Rooney <ro...@electricjellyfish.net> wrote:
> > On 4/12/06, Stan J <th...@yeah.net> wrote:
> > > I'm using subversion 1.3.0 under freebsd 4.11
> > > I set my config file like below.
> > > =========================
> > > [miscellany]
> > > enable-auto-props = yes
> > >
> > > [auto-props]
> > > *.xls = svn:needs-lock=true
> > > *.XLS = svn:needs-lock=true
> > > =========================
> > >
> > > I'm expect that this will set needs-lock property when I add both
> > > *.xls and *.XLS files.
> > > The fact is like below
> > > =========================
> > > ~/work/test> echo aaa > aaa.xls
> > > ~/work/test> echo BBB > BBB.XLS
> > > ~/work/test> ll *
> > > -rw-r--r--  1 0037  users  4 Apr 12 21:14 BBB.XLS
> > > -rw-r--r--  1 0037  users  4 Apr 12 21:14 aaa.xls
> > > ~/work/test> svn add *
> > > A         BBB.XLS
> > > A         aaa.xls
> > > ~/work/test> svn ci * -m "test"
> > > Adding         BBB.XLS
> > > Adding         aaa.xls
> > > Transmitting file data ..
> > > Committed revision 1.
> > > ~/work/test> ll *
> > > -r--r--r--  1 0037  users  4 Apr 12 21:14 BBB.XLS
> > > -rw-r--r--  1 0037  users  4 Apr 12 21:14 aaa.xls
> > > =======================================
> > >
> > > *.XLS is readonly but aaa.xls is still writeable.
> > > Did i do anything wrong?
> >
> > Weird.  I can see the same problem here, looks like svn:needs-lock
> > never gets set for one of the two files.  Will look into it further...
>
> Apparently the problem is due to an idiosyncracy of the config file
> parsing in Subversion, one that's been there for quite some time.  The
> 'key' portion of the lines, where the *.xls part occurs, is
> specifically downcased before being entered into the internal hash
> table, so you can't have two entries with keys that differ only in
> case.  I'm not sure why it's done this way, or if there's any way we
> can avoid it at the moment.  Seems pretty weird to me though.

Turns out this is issue #2036.  It's not impossible to fix, but it
requires some tweaks to our low level config parser code, and it's
just never floated to the top of the stack of things to fix...

http://subversion.tigris.org/issues/show_bug.cgi?id=2036

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: problem of setting auto-props

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 4/12/06, Garrett Rooney <ro...@electricjellyfish.net> wrote:
> On 4/12/06, Stan J <th...@yeah.net> wrote:
> > I'm using subversion 1.3.0 under freebsd 4.11
> > I set my config file like below.
> > =========================
> > [miscellany]
> > enable-auto-props = yes
> >
> > [auto-props]
> > *.xls = svn:needs-lock=true
> > *.XLS = svn:needs-lock=true
> > =========================
> >
> > I'm expect that this will set needs-lock property when I add both
> > *.xls and *.XLS files.
> > The fact is like below
> > =========================
> > ~/work/test> echo aaa > aaa.xls
> > ~/work/test> echo BBB > BBB.XLS
> > ~/work/test> ll *
> > -rw-r--r--  1 0037  users  4 Apr 12 21:14 BBB.XLS
> > -rw-r--r--  1 0037  users  4 Apr 12 21:14 aaa.xls
> > ~/work/test> svn add *
> > A         BBB.XLS
> > A         aaa.xls
> > ~/work/test> svn ci * -m "test"
> > Adding         BBB.XLS
> > Adding         aaa.xls
> > Transmitting file data ..
> > Committed revision 1.
> > ~/work/test> ll *
> > -r--r--r--  1 0037  users  4 Apr 12 21:14 BBB.XLS
> > -rw-r--r--  1 0037  users  4 Apr 12 21:14 aaa.xls
> > =======================================
> >
> > *.XLS is readonly but aaa.xls is still writeable.
> > Did i do anything wrong?
>
> Weird.  I can see the same problem here, looks like svn:needs-lock
> never gets set for one of the two files.  Will look into it further...

Apparently the problem is due to an idiosyncracy of the config file
parsing in Subversion, one that's been there for quite some time.  The
'key' portion of the lines, where the *.xls part occurs, is
specifically downcased before being entered into the internal hash
table, so you can't have two entries with keys that differ only in
case.  I'm not sure why it's done this way, or if there's any way we
can avoid it at the moment.  Seems pretty weird to me though.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: problem of setting auto-props

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 4/12/06, Stan J <th...@yeah.net> wrote:
> I'm using subversion 1.3.0 under freebsd 4.11
> I set my config file like below.
> =========================
> [miscellany]
> enable-auto-props = yes
>
> [auto-props]
> *.xls = svn:needs-lock=true
> *.XLS = svn:needs-lock=true
> =========================
>
> I'm expect that this will set needs-lock property when I add both
> *.xls and *.XLS files.
> The fact is like below
> =========================
> ~/work/test> echo aaa > aaa.xls
> ~/work/test> echo BBB > BBB.XLS
> ~/work/test> ll *
> -rw-r--r--  1 0037  users  4 Apr 12 21:14 BBB.XLS
> -rw-r--r--  1 0037  users  4 Apr 12 21:14 aaa.xls
> ~/work/test> svn add *
> A         BBB.XLS
> A         aaa.xls
> ~/work/test> svn ci * -m "test"
> Adding         BBB.XLS
> Adding         aaa.xls
> Transmitting file data ..
> Committed revision 1.
> ~/work/test> ll *
> -r--r--r--  1 0037  users  4 Apr 12 21:14 BBB.XLS
> -rw-r--r--  1 0037  users  4 Apr 12 21:14 aaa.xls
> =======================================
>
> *.XLS is readonly but aaa.xls is still writeable.
> Did i do anything wrong?

Weird.  I can see the same problem here, looks like svn:needs-lock
never gets set for one of the two files.  Will look into it further...

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org