You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Andrew Nelson <fr...@gmail.com> on 2005/06/07 19:53:23 UTC

"svn propset svn:keyword" possible to specify a wildcard?

Hello all

Just wondering if there is a way to specify that all files matching a
wild card (e.g *.java) should be eligible for keyword substitution. 
It would also be nice if this keyword substitution would apply to any
*.java files added after the initial svn propset invocation.

I've scanned the on line book
http://svnbook.red-bean.com/en/1.1/ch07s02.html#svn-ch-7-sect-2.3.4
but didn't see anything.  If anyone knows how to do this I would love to learn.

Thanks much

//Andy

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


Re: "svn propset svn:keyword" possible to specify a wildcard?

Posted by David Weintraub <qa...@gmail.com>.
On 6/9/05, Manuzhai <ma...@manuzhai.nl> wrote:
> > Thanks much for the tip.  Seems like the auto-props would be more
> > handy if they could be set and unset on a directory by directory basis
> > instead of a client by client basis.  That way if I'm working on
> > project1 that wants *.java to have one set of autoprops set I won't
> > screw up project2 that wants another set of autoprops for *.java.
> >
> > Maybe your hook would do just that but it would be nice to just have
> > the files automagically get the correct props set instead of an error
> > message every time I attempt to commit.
> >

I've finished my hook if anyone is interested. 

Yes, I also thought it would be nice to automatically create the
properties I need. In fact, I originally assumed I could easily do
this with a hook. That is, create a hook that would automatically set
a property when I created a new file. However, I quickly discovered
that you can't set a property without a working directory which made
setting it with a hook almost impossible.

So, the best I can do is simply reject the commit until the user sets
the property itself which I hope encourages people to use the
auto-property ability of their client installation. At least this way,
I don't end up with files in my archive where someone forgot to set a
needed property.

--
David Weintraub
qazwart@gmail.com

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


Re: "svn propset svn:keyword" possible to specify a wildcard?

Posted by Manuzhai <ma...@manuzhai.nl>.
> Thanks much for the tip.  Seems like the auto-props would be more
> handy if they could be set and unset on a directory by directory basis
> instead of a client by client basis.  That way if I'm working on
> project1 that wants *.java to have one set of autoprops set I won't
> screw up project2 that wants another set of autoprops for *.java.
> 
> Maybe your hook would do just that but it would be nice to just have
> the files automagically get the correct props set instead of an error
> message every time I attempt to commit.
> 
> Maybe this could be a feature request?  I don't know I've only be
> using subversion for 2 days.

This is being considered for Subversion 1.3.

Regards,

Manuzhai


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

Re: "svn propset svn:keyword" possible to specify a wildcard?

Posted by Andrew Nelson <fr...@gmail.com>.
Thanks much for the tip.  Seems like the auto-props would be more
handy if they could be set and unset on a directory by directory basis
instead of a client by client basis.  That way if I'm working on
project1 that wants *.java to have one set of autoprops set I won't
screw up project2 that wants another set of autoprops for *.java.

Maybe your hook would do just that but it would be nice to just have
the files automagically get the correct props set instead of an error
message every time I attempt to commit.

Maybe this could be a feature request?  I don't know I've only be
using subversion for 2 days.


//Andy
 


On 6/7/05, David Weintraub <qa...@gmail.com> wrote:

<snip/>

> You can setup your client's configuration to do just this. However,
> this is CLIENT specific and not server specific. That is, if you move
> to a different machine, you'd have to set it up again.

<snip/>

> I'm currently writing a hook that will prevent a commit from
> completing if files don't have the properties (and the values) that
> you expect. The user would then have to add those properties in order
> to commit their changes.
> 
> --
> David Weintraub
> qazwart@gmail.com
>

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


Re: "svn propset svn:keyword" possible to specify a wildcard?

Posted by David Weintraub <qa...@gmail.com>.
On 6/7/05, Andrew Nelson <fr...@gmail.com> wrote:
> Just wondering if there is a way to specify that all files matching a
> wild card (e.g *.java) should be eligible for keyword substitution.
> It would also be nice if this keyword substitution would apply to any
> *.java files added after the initial svn propset invocation.

You can setup your client's configuration to do just this. However,
this is CLIENT specific and not server specific. That is, if you move
to a different machine, you'd have to set it up again.

You need to look at
<http://svnbook.red-bean.com/en/1.1/ch07.html#svn-ch-7-sect-1.3.2> of
the book. Look at the "enable-auto-props" setting. Then, if you're on
Unix, look at the bottom of the file $HOME/.subversion/config. If
you're on Windows, look at %USERPROFILE%\Application
Data\Subversion\config. You'll see the template to do exactly what you
want.

I'm currently writing a hook that will prevent a commit from
completing if files don't have the properties (and the values) that
you expect. The user would then have to add those properties in order
to commit their changes.

--
David Weintraub
qazwart@gmail.com

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