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

RE: Keeping stuff out of my repository?

From: Rob Hubbard <rob.hubbard_at_softel.co.uk>
Date: Fri, 31 Oct 2008 14:48:06 -0000

Hello Caston,

Don't forget that in addition to the per-directory svn:ignore, there's
also
 a global-ignores section in the SVN config file.

Often it is possible to balance the nuisance of implementing policies on
the
 repository with some helpful automation in the clients.

Why don't you make available a "standard" or "template" config file to
offer
 some balance to the policies you implement in the pre-commit hook?

For example, if your pre-commit hook rejects all "*.obj" files being
added,
 then include "*.obj" in the global-ignores in the config. This won't
prevent
 someone explicitly trying to add a *.obj, but it will certainly help
them to
 avoid accidentally adding them. (And make sure your programmers are
aware of
 the problems of "shell expansion": with shells such as Bash, an
unquoted "*"
 will be expanded by the shell, not by SVN.)

As another example, if your pre-commit hook checks that added files have
 particular properties set (e.g. svn:eol-style, svn:executable,
 svn:mime-type), then include those as auto-props in the SVN config
file.

See the sections

 
http://svnbook.red-bean.com/en/1.5/svn.ref.reposhooks.pre-commit.html

 
http://svnbook.red-bean.com/en/1.5/svn.reposadmin.create.html#svn.reposa
dmin.create.hooks

 
http://svnbook.red-bean.com/en/1.5/svn.advanced.props.html#svn.advanced.
props.auto

 in the manual for details.

One problem with this is that you must distribute the config file, and
try
 to keep everyone up to date. But why not use subversion itself to do
this?
 You could set up a copy of the config file in the repository at a URL
such
 as
     http://svn-repos/meta/configuration/svn-clients/config
 and then have all users checkout the directory URL
     http://svn-repos/meta/configuration/svn-clients/
 to their local machines at
     C:\Documents and Settings\[username]\Application Data\Subversion\
 or
     /etc/subversion/
 or wherever the config happens to be located on the machine.

Then to update, they just, (svn) update!

I hope that adds to the help already given by others.

Regards,
Rob.

Rob Hubbard.

> -----Original Message-----
> >>> Is there ANY way I can enforce my repository's ignore
> rules? I know
> >>> it's kind of a mainframe mentality but the added hassle is just
> >>> driving me insane...

________________________________________________________________
This message has been independently scanned for the Softel Group and cleared of containing viruses and other malicious data.

Powering Television Beyond the Video (TM)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-10-31 15:48:35 CET

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.