On Thu, Dec 23, 2010 at 05:34:09PM +0200, Alan Barrett wrote:
> On Thu, 23 Dec 2010, Stefan Sperling wrote:
> > I don't think there is an official way to prevent the config dir from
> > being created. I'd be interested to know why you need this. What is
> > your use case?
> 
> The event that made me notice the problem was cron job owned by root,
> whose command was something like "su serviceuser -c 'svn update
> /path/to/dir'".  Think of updating a working copy that contains the
> files used by a web server.  The svn update command runs in a context
> where $HOME is root's home directory, and serviceuser is not even
> allowed to write there, and might not even be allowed to read, so I got
> an error or warning (I forget which, and the details change according to
> the permissions).
> 
> You ask why I need to avoid creating a .subversion directory, and I
> suppose that I don't absolutely need to avoid creating it, but I also
> don't need *to* create it (it won't contain any useful information), and
> I don't want the clutter.

You could pass the -l option to su so that the homedir of the service
user is used.

Another way to do this is to start the cronjob from the serviceuser
account, by editing that user's crontab instead of root's crontab
(e.g. "crontab -e -u serviceuser" might do the trick).

That said, I don't see an issue with adding the option you're asking for.
It is a reasonable request, and people might need it in situations
where they cannot easily work around such issues.
If you'd like to add an enhancement request issue in the tracker
please go ahead.

> Another annoying issue is that commands that one would expect to be
> read-only (such as "svn status" or "svn info") also create the config
> directory.

Yes, every svn subcommand creates it, and it has been pointed out before
that this might not be necessary.
However, I'm wondering if it's even possible to come up with a good
split between subcommands that should create it and ones that shouldn't.

Reply via email to