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

Why can't "svn checkout" clobber existing files?

From: Ryan Saunders <jediry01_at_yahoo.com>
Date: 2007-11-16 08:18:36 CET

I'm trying to use svn to version control configuration
files on my linux machines. I've got several files under
/etc, /usr/local, and /var versioned, but I'm hitting a
snag. It seems to me that I ought to be able to deploy my
configuration just by running svn checkout:

> cd /
> svn checkout --force <url-to-repository> .

This is failing because the directories 'etc', 'usr', and
'var' already exist, and are unversioned. I consider this a
shortcoming of 'svn checkout' that there is no way to
override this behavior: in this particular scenario, I
*want* existing files to be clobbered, and for my root
directory to become a new working copy of the repository.
As it is now, there seems to be no way to do this, other
than to manually checkout each versioned directory
non-recursively, deleting the in-place copy of each
versioned file beforehand:

> cd /etc
> rm -f fstab
> svn checkout -N <url>/etc .
> cd samba
> rm -f smb.conf
> svn checkout -N <url>/etc/samba

This is extremely tedious. I read in a previous message on
this list that this (i.e., refusing to clobber files) is
considered a "safety feature". That's well and good--all in
all, I'd prefer that svn be somewhat paranoid about
clobbering existing files. But there really needs to be a
"no, really, I know what I'm doing" option to override
this. '--force' seems like the natural choice, but I'd even
be happy with


Get easy, one-click access to your favorites.
Make Yahoo! your homepage.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Nov 20 11:15:48 2007

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.