You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Giulio Troccoli <gi...@uk.linedata.com> on 2009/09/30 14:03:34 UTC

Regular expression in the access file

Is it possible to use regular expression in the access file?

I am serving a repository using Apache 2.2.11 and Subversion 1.6.5. My configuration has the following

AuthUserFile /usr/local/apache2/etc/svn-test.passwd

My repository has the following structure

<product>/<version>/<test|cand>

So something like

dip
 |--1.10
     |---test
     |---cand
 |--1.11
     |---test
     |---cand
 |--1.20
     |---test
     |---cand

The access for all tests area the same and the access to all cands are the same too.

My access file looks like

[/]
* = r
[/dip/1.10/test]
@dev = rw
[/dip/1.10/cand]
@test = rw
[/dip/1.11/test]
@dev = rw
[/dip/1.11/cand]
@test = rw
[/dip/1.20/test]
@dev = rw
[/dip/1.20/cand]
@test = rw

I know that I could reorganize the repository so that I could write the access file as

[/]
* = r
[/dip/test]
@dev = rw
[/dip/cand]
@test = rw

But this would be a huge task which I am not willing to do, as I'd rather have a bigger access file instead.

But I was wondering if I could use some regular expression, so that I could use

[/]
* = r
[/dip/*/test]
@dev = rw
[/dip/*/cand]
@test = rw

Of course the * is a too generic expression. I have actually tried with * and it doesn't seem to work, but maybe it's just because it should be quoted, or * is not valid, or some other reason.

I didn't find anything about this in the archive, and before embarking in finding the correct expression I wanted to check with you guys if it is at all possible. The book doesn't say anything either way.

Thanks
Giulio


Linedata Services (UK) Ltd
Registered Office: Bishopsgate Court, 4-12 Norton Folgate, London, E1 6DB
Registered in England and Wales No 3027851    VAT Reg No 778499447

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2402096

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: Regular expression in the access file

Posted by Giulio Troccoli <gi...@uk.linedata.com>.
>


Linedata Services (UK) Ltd
Registered Office: Bishopsgate Court, 4-12 Norton Folgate, London, E1 6DB
Registered in England and Wales No 3027851    VAT Reg No 778499447

-----Original Message-----


> From: Hyrum K. Wright [mailto:hyrum_wright@mail.utexas.edu]
> Sent: 30 September 2009 15:09
> To: Giulio Troccoli
> Cc: users@subversion.tigris.org
> Subject: Re: Regular expression in the access file
>
>
> On Sep 30, 2009, at 10:03 AM, Giulio Troccoli wrote:
>
> > Is it possible to use regular expression in the access file?
> >
> > I am serving a repository using Apache 2.2.11 and
> Subversion 1.6.5.
> > My configuration has the following
> >
> > AuthUserFile /usr/local/apache2/etc/svn-test.passwd
> >
> > My repository has the following structure
> >
> > <product>/<version>/<test|cand>
> >
> > So something like
> >
> > dip
> > |--1.10
> >     |---test
> >     |---cand
> > |--1.11
> >     |---test
> >     |---cand
> > |--1.20
> >     |---test
> >     |---cand
> >
> > The access for all tests area the same and the access to
> all cands are
> > the same too.
> >
> > My access file looks like
> >
> > [/]
> > * = r
> > [/dip/1.10/test]
> > @dev = rw
> > [/dip/1.10/cand]
> > @test = rw
> > [/dip/1.11/test]
> > @dev = rw
> > [/dip/1.11/cand]
> > @test = rw
> > [/dip/1.20/test]
> > @dev = rw
> > [/dip/1.20/cand]
> > @test = rw
> >
> > I know that I could reorganize the repository so that I could write
> > the access file as
> >
> > [/]
> > * = r
> > [/dip/test]
> > @dev = rw
> > [/dip/cand]
> > @test = rw
> >
> > But this would be a huge task which I am not willing to do, as I'd
> > rather have a bigger access file instead.
> >
> > But I was wondering if I could use some regular expression,
> so that I
> > could use
> >
> > [/]
> > * = r
> > [/dip/*/test]
> > @dev = rw
> > [/dip/*/cand]
> > @test = rw
> >
> > Of course the * is a too generic expression. I have actually tried
> > with * and it doesn't seem to work, but maybe it's just because it
> > should be quoted, or * is not valid, or some other reason.
> >
> > I didn't find anything about this in the archive, and
> before embarking
> > in finding the correct expression I wanted to check with
> you guys if
> > it is at all possible. The book doesn't say anything either way.
>
> Is this similar to issue 2958 or issue 2662?
>
> [1] http://subversion.tigris.org/issues/show_bug.cgi?id=2958
> [2] http://subversion.tigris.org/issues/show_bug.cgi?id=2662
>

Yeah, kind of. More issue 2662 than 2958. The ability to use the asterisk would work for me, but I was looking to see if it was possible to use regular expression rather than just wildcard. That's probably also why I didn't find anything in the archive.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2402104

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Regular expression in the access file

Posted by "Hyrum K. Wright" <hy...@hyrumwright.org>.
On Sep 30, 2009, at 10:03 AM, Giulio Troccoli wrote:

> Is it possible to use regular expression in the access file?
>
> I am serving a repository using Apache 2.2.11 and Subversion 1.6.5.  
> My configuration has the following
>
> AuthUserFile /usr/local/apache2/etc/svn-test.passwd
>
> My repository has the following structure
>
> <product>/<version>/<test|cand>
>
> So something like
>
> dip
> |--1.10
>     |---test
>     |---cand
> |--1.11
>     |---test
>     |---cand
> |--1.20
>     |---test
>     |---cand
>
> The access for all tests area the same and the access to all cands  
> are the same too.
>
> My access file looks like
>
> [/]
> * = r
> [/dip/1.10/test]
> @dev = rw
> [/dip/1.10/cand]
> @test = rw
> [/dip/1.11/test]
> @dev = rw
> [/dip/1.11/cand]
> @test = rw
> [/dip/1.20/test]
> @dev = rw
> [/dip/1.20/cand]
> @test = rw
>
> I know that I could reorganize the repository so that I could write  
> the access file as
>
> [/]
> * = r
> [/dip/test]
> @dev = rw
> [/dip/cand]
> @test = rw
>
> But this would be a huge task which I am not willing to do, as I'd  
> rather have a bigger access file instead.
>
> But I was wondering if I could use some regular expression, so that  
> I could use
>
> [/]
> * = r
> [/dip/*/test]
> @dev = rw
> [/dip/*/cand]
> @test = rw
>
> Of course the * is a too generic expression. I have actually tried  
> with * and it doesn't seem to work, but maybe it's just because it  
> should be quoted, or * is not valid, or some other reason.
>
> I didn't find anything about this in the archive, and before  
> embarking in finding the correct expression I wanted to check with  
> you guys if it is at all possible. The book doesn't say anything  
> either way.

Is this similar to issue 2958 or issue 2662?

[1] http://subversion.tigris.org/issues/show_bug.cgi?id=2958
[2] http://subversion.tigris.org/issues/show_bug.cgi?id=2662

-Hyrum

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2402097

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].