You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Seth Landsman <se...@boondock.cs.brandeis.edu> on 2002/12/27 19:19:10 UTC

setting svn:keywords per-directory? per-repo?

So I'm slowing trying to convert my CVS use to SVN.  One feature which
is bothering me is the use of svn:keywords.  Generally, all my source
files have an $Id$ substitution.  It would be annoying to have to run
svn propset of each file (though I could get by with a perl script) but
it would be impossible to train the other people in my group to run svn
propset when making a new file.

Is there any way to have a sticky svn:keywords property on a directory?
Or set a default svn:keywords property for a repository?

Thanks,
 Seth
-- 
it is by will alone I set my mind in motion

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

Re: setting svn:keywords per-directory? per-repo?

Posted by Barry Scott <ba...@barrys-emacs.org>.
Is it better to associate a propset with a list of file patterns if mime 
type is the wrong
index?

BArry


At Saturday 28-12-2002 03:21, Sebastien Cevey wrote:
>On Sat, Dec 28, 2002 at 01:09:38AM +0000, Barry Scott wrote:
>
> > Surely its a default propset per mime type that is needed not per
> > directory.
>
>Is mime-type automatically found, or should we set it for every single
>file ? I suspect the latter from what I read from 'svn help
>ps'. Therefore, this is not really helping much, since you have to set
>mime-type for each file ?
>
>I also think that the idea of a per-directory property seems somewhat
>hackish, and not really funny for someone using a great deal of
>directories storing texts (I know, there is perl, but that's not an
>answer :) ).
>
>And when using a pre-commit hook, we should care for the mime-type
>indeed. Since binary files are automatically tagged as so, it could be
>possible to set the property on every non-binary file maybe ?
>
>And, obviously, the property could be altered manually for special
>files.
>
>--
>Sebastien Cevey <se...@cine7.net>
>Cine7.Net  -  Milcis.Net
>Jabber: theefer@charente.de  -  ICQ: 48895760
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
>For additional commands, e-mail: dev-help@subversion.tigris.org



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

Re: setting svn:keywords per-directory? per-repo?

Posted by Sebastien Cevey <se...@cine7.net>.
On Sat, Dec 28, 2002 at 01:09:38AM +0000, Barry Scott wrote:

> Surely its a default propset per mime type that is needed not per
> directory.

Is mime-type automatically found, or should we set it for every single
file ? I suspect the latter from what I read from 'svn help
ps'. Therefore, this is not really helping much, since you have to set
mime-type for each file ?

I also think that the idea of a per-directory property seems somewhat
hackish, and not really funny for someone using a great deal of
directories storing texts (I know, there is perl, but that's not an
answer :) ).

And when using a pre-commit hook, we should care for the mime-type
indeed. Since binary files are automatically tagged as so, it could be
possible to set the property on every non-binary file maybe ?

And, obviously, the property could be altered manually for special
files.

-- 
Sebastien Cevey <se...@cine7.net>
Cine7.Net  -  Milcis.Net
Jabber: theefer@charente.de  -  ICQ: 48895760

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

Re: setting svn:keywords per-directory? per-repo?

Posted by Barry Scott <ba...@barrys-emacs.org>.
Surely its a default propset per mime type that is needed not per directory.

Barry



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

Re: setting svn:keywords per-directory? per-repo?

Posted by Craig Rodrigues <ro...@attbi.com>.
On Sun, Dec 29, 2002 at 10:40:23PM -0600, Karl Fogel wrote:
> Craig Rodrigues <ro...@attbi.com> writes:
> > I can file an issue in Bugzilla with this info if people want,
> > so that this issue can be more easily tracked.
> 
> That would be great, thanks.  If you can, set it to Post-1.0 target
> milestone.

I entered it, but forgot to put in the target milestone:
http://subversion.tigris.org/issues/show_bug.cgi?id=1054

-- 
Craig Rodrigues        
http://www.gis.net/~craigr    
rodrigc@attbi.com

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

Re: setting svn:keywords per-directory? per-repo?

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Craig Rodrigues <ro...@attbi.com> writes:
> I can file an issue in Bugzilla with this info if people want,
> so that this issue can be more easily tracked.

That would be great, thanks.  If you can, set it to Post-1.0 target
milestone.

-K


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

Re: setting svn:keywords per-directory? per-repo?

Posted by Craig Rodrigues <ro...@attbi.com>.
On Sat, Dec 28, 2002 at 02:37:49PM +0100, Sander Striker wrote:
> > From: Karl Fogel [mailto:kfogel@newton.ch.collab.net]
> > Sent: Saturday, December 28, 2002 3:15 AM
> 
> > Greg Hudson <gh...@MIT.EDU> writes:
> > > I'd be sad if we came up with a hackish, incomplete solution to this
> > > particular problem instead of dealing with the more general issue of
> > > setting properties on new files and directories.  (Say, by adding an
> > > "svn:inherit" property wihch controlled property inheritance.)  So,
> > > -0.5.
> > 
> > Ah yes, the value of a directory's svn:inherit property could include
> > 'svn:inherit' among other things... I begin to grok.
> > 
> > Yeah, svn:inherit might accomplish the same thing in a more general
> > way.  And I'm happy to wait for someone to write up that proposal :-).
> 
> Might be my failing memory, but I thought we already had an issue on
> file about this.


I searched the database, but could not find an issue for this.

I would characterize the issue this way:
- it would be nice to specify properties either on a per repository
  or per directory basis, and have all entities which fall under
  that repository or directory to have those properties.
  One example would be to specify for a project
  that svn:keywords expands $Id$, and then have svn expand
  $Id$ for all files in that project.


According to Ben, these are some of the parts of the problem:

<sussman> the 3 conflated issues here are:
<sussman> 1. default props for a directory and immediate children?
<sussman> 2. default props for a whole project, or subtree, solved by
+server-side config files
<sussman> 3. property inheritance rules. (yikes)


I can file an issue in Bugzilla with this info if people want,
so that this issue can be more easily tracked.

-- 
Craig Rodrigues        
http://www.gis.net/~craigr    
rodrigc@attbi.com

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

RE: setting svn:keywords per-directory? per-repo?

Posted by Sander Striker <st...@apache.org>.
> From: Karl Fogel [mailto:kfogel@newton.ch.collab.net]
> Sent: Saturday, December 28, 2002 3:15 AM

> Greg Hudson <gh...@MIT.EDU> writes:
> > I'd be sad if we came up with a hackish, incomplete solution to this
> > particular problem instead of dealing with the more general issue of
> > setting properties on new files and directories.  (Say, by adding an
> > "svn:inherit" property wihch controlled property inheritance.)  So,
> > -0.5.
> 
> Ah yes, the value of a directory's svn:inherit property could include
> 'svn:inherit' among other things... I begin to grok.
> 
> Yeah, svn:inherit might accomplish the same thing in a more general
> way.  And I'm happy to wait for someone to write up that proposal :-).

Might be my failing memory, but I thought we already had an issue on
file about this.

Sander


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

Re: setting svn:keywords per-directory? per-repo?

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Greg Hudson <gh...@MIT.EDU> writes:
> I'd be sad if we came up with a hackish, incomplete solution to this
> particular problem instead of dealing with the more general issue of
> setting properties on new files and directories.  (Say, by adding an
> "svn:inherit" property wihch controlled property inheritance.)  So,
> -0.5.

Ah yes, the value of a directory's svn:inherit property could include
'svn:inherit' among other things... I begin to grok.

Yeah, svn:inherit might accomplish the same thing in a more general
way.  And I'm happy to wait for someone to write up that proposal :-).

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

Re: setting svn:keywords per-directory? per-repo?

Posted by Greg Hudson <gh...@MIT.EDU>.
On Fri, 2002-12-27 at 18:19, Karl Fogel wrote:
> So: How would people feel about svn:keywords on a directory having the
> same effect as that property set for every file immediately in the
> directory (would be overridden by per-file properties, of course)?

I'd be sad if we came up with a hackish, incomplete solution to this
particular problem instead of dealing with the more general issue of
setting properties on new files and directories.  (Say, by adding an
"svn:inherit" property wihch controlled property inheritance.)  So,
-0.5.


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

Re: setting svn:keywords per-directory? per-repo?

Posted by Seth Landsman <se...@boondock.cs.brandeis.edu>.
> >>Seth Landsman wrote:
> >>
> >>>I wonder if there would be room for a set of
> >>>defaults, though?  I am wondering why things like $Id$ are not
> >>>automatically expanded by default, as they are in CVS?
> >>> 
> >>Policy. We decided that, by default, Subversion will not touch file
> >>contents in any way. That includes not expanding keywords, and not
> >>changing newlines to suit the client's platform. Any of these can be
> >>turned on -- admittedly only on a per-file basis, for now -- but none
> >>should be the default.
> >
> >	Okay.  That makes sense.
> >
> >	As a CVS user, I am very careful with my strings, anything that has
> >two $s in it is fair game to be replaced. :)
> 
> Well, as a Subversion user, you won't have to worry about that. :-)

	Heh.  The problem is, I've come to depend on it. :-/

-Seth
-- 
it is by will alone I set my mind in motion

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

Re: setting svn:keywords per-directory? per-repo?

Posted by Branko Čibej <br...@xbc.nu>.
Seth Landsman wrote:

>On Sat, Dec 28, 2002 at 04:19:19PM +0100, Branko ??ibej wrote:
>  
>
>>Seth Landsman wrote:
>>
>>    
>>
>>>I wonder if there would be room for a set of
>>>defaults, though?  I am wondering why things like $Id$ are not
>>>automatically expanded by default, as they are in CVS?
>>> 
>>>
>>>      
>>>
>>Policy. We decided that, by default, Subversion will not touch file
>>contents in any way. That includes not expanding keywords, and not
>>changing newlines to suit the client's platform. Any of these can be
>>turned on -- admittedly only on a per-file basis, for now -- but none
>>should be the default.
>>    
>>
>
>	Okay.  That makes sense.
>
>	As a CVS user, I am very careful with my strings, anything that has
>two $s in it is fair game to be replaced. :)
>  
>

Well, as a Subversion user, you won't have to worry about that. :-)

-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


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

Re: setting svn:keywords per-directory? per-repo?

Posted by Seth Landsman <se...@boondock.cs.brandeis.edu>.
On Sat, Dec 28, 2002 at 04:19:19PM +0100, Branko ??ibej wrote:
> Seth Landsman wrote:
> 
> >I wonder if there would be room for a set of
> >defaults, though?  I am wondering why things like $Id$ are not
> >automatically expanded by default, as they are in CVS?
> >  
> >
> 
> Policy. We decided that, by default, Subversion will not touch file
> contents in any way. That includes not expanding keywords, and not
> changing newlines to suit the client's platform. Any of these can be
> turned on -- admittedly only on a per-file basis, for now -- but none
> should be the default.

	Okay.  That makes sense.

	As a CVS user, I am very careful with my strings, anything that has
two $s in it is fair game to be replaced. :)

-Seth
-- 
it is by will alone I set my mind in motion

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

Re: setting svn:keywords per-directory? per-repo?

Posted by Branko Čibej <br...@xbc.nu>.
Seth Landsman wrote:

>I wonder if there would be room for a set of
>defaults, though?  I am wondering why things like $Id$ are not
>automatically expanded by default, as they are in CVS?
>  
>

Policy. We decided that, by default, Subversion will not touch file
contents in any way. That includes not expanding keywords, and not
changing newlines to suit the client's platform. Any of these can be
turned on -- admittedly only on a per-file basis, for now -- but none
should be the default.

-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


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

Re: setting svn:keywords per-directory? per-repo?

Posted by Seth Landsman <se...@boondock.cs.brandeis.edu>.
On Fri, Dec 27, 2002 at 05:19:47PM -0600, Karl Fogel wrote:
> Seth Landsman <se...@boondock.cs.brandeis.edu> writes:
> > So I'm slowing trying to convert my CVS use to SVN.  One feature which
> > is bothering me is the use of svn:keywords.  Generally, all my source
> > files have an $Id$ substitution.  It would be annoying to have to run
> > svn propset of each file (though I could get by with a perl script) but
> > it would be impossible to train the other people in my group to run svn
> > propset when making a new file.
> > 
> > Is there any way to have a sticky svn:keywords property on a directory?
> > Or set a default svn:keywords property for a repository?
> 
> I think there'd be a higher chance of it happening for the directory
> than for the repository, as we already have a mechanism for the
> former, whereas the latter requires protocol changes.

	Makes sense to me.  I wonder if there would be room for a set of
defaults, though?  I am wondering why things like $Id$ are not
automatically expanded by default, as they are in CVS?

> So: How would people feel about svn:keywords on a directory having the
> same effect as that property set for every file immediately in the
> directory (would be overridden by per-file properties, of course)?
> 
> My instinct is that it shouldn't descend into subdirs, you'd just have
> to set it on every directory you care about.

	Looking at my pattern of development (and only my pattern of
development, I could be wrong in the general case), I'd make heavy use
of the concept of "sticky" tags.  i.e., I would like to turn on $Id$
for my whole project.  If I come across a situation where the expansion
is in appropriate, I would turn it off for that file.  The issue here is
that, as CVS users, where you do not have that option (for the most
part), we are very careful about the use of expanded strings in our
code.

> By asking, I'm not volunteering to write this :-).  But it might be a
> small patch.  Let's first decide if we want it, though...

	I had another thought which might be a valid compromise.  Is it
possible to write a server-side commit script which would set
svn:keywords?

-Seth
-- 
it is by will alone I set my mind in motion

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

Re: setting svn:keywords per-directory? per-repo?

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Seth Landsman <se...@boondock.cs.brandeis.edu> writes:
> So I'm slowing trying to convert my CVS use to SVN.  One feature which
> is bothering me is the use of svn:keywords.  Generally, all my source
> files have an $Id$ substitution.  It would be annoying to have to run
> svn propset of each file (though I could get by with a perl script) but
> it would be impossible to train the other people in my group to run svn
> propset when making a new file.
> 
> Is there any way to have a sticky svn:keywords property on a directory?
> Or set a default svn:keywords property for a repository?

I think there'd be a higher chance of it happening for the directory
than for the repository, as we already have a mechanism for the
former, whereas the latter requires protocol changes.

So: How would people feel about svn:keywords on a directory having the
same effect as that property set for every file immediately in the
directory (would be overridden by per-file properties, of course)?

My instinct is that it shouldn't descend into subdirs, you'd just have
to set it on every directory you care about.

By asking, I'm not volunteering to write this :-).  But it might be a
small patch.  Let's first decide if we want it, though...

-K

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

Re: setting svn:keywords per-directory? per-repo?

Posted by pw...@mdtsoft.com.
On 27 Dec, Seth Landsman wrote:
I have been thinking on the same problem. Right now I think that the correct
way to handle this is to have a special working directory, one not linked
to a user (I have put this on the server but it can be anyware). then every
so often (cron) a perl script runs that:

1) does a svn update on the special location.

2) check each file for a number of things:
	svn:keysords set correctly (the perl script looks at the file to 
		figure out the type of the file.

	A correct copyright notice with the correct years.

	proper formating of the source (indent et. al)

	Other stuff not yet figured out.

3) If a file needs to be changes make the necessary changes and remember
  the file name for the commit comming up.

4) Create a log message.

5) Commit the changes.

6) E-mail notification to me and the director of engineering.


While this would allow some reviesion to fail the above test, a checkin 
script can't alter the files being checked in.

I am working on this system right now but it is not yet ready for every
unit testing.


> So I'm slowing trying to convert my CVS use to SVN.  One feature which
> is bothering me is the use of svn:keywords.  Generally, all my source
> files have an $Id$ substitution.  It would be annoying to have to run
> svn propset of each file (though I could get by with a perl script) but
> it would be impossible to train the other people in my group to run svn
> propset when making a new file.
> 
> Is there any way to have a sticky svn:keywords property on a directory?
> Or set a default svn:keywords property for a repository?
> 
> Thanks,
>  Seth

-- 
It is MDT, Inc's policy to delete mail containing unsolicited file attachments.
Please be sure to contact the MDT staff member BEFORE sending an e-mail with
any file attachments; they will be able to arrange for the files to be received.

This email, and any files transmitted with it, is confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error, please advise postmaster@mdtsoft.com
<ma...@mdtsoft.com>.

Philip W. Dalrymple III <pw...@mdtsoft.com>
MDT Software - The Change Management Company
+1 678 297 1001
Fax +1 678 297 1003



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