You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Ryan Saunders <je...@yahoo.com> on 2007/11/16 07:18:36 UTC

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

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
'--please-clobber-any-files-i-take-full-responsibility-for-my-actions'.

Ryan


      ____________________________________________________________________________________
Get easy, one-click access to your favorites. 
Make Yahoo! your homepage.
http://www.yahoo.com/r/hs 

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

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

Posted by Eric Hanchrow <of...@blarg.net>.
>>>>> "Ryan" == Ryan Saunders <je...@yahoo.com> writes:

    Ryan> It seems to me that I ought to be able to deploy my
    Ryan> configuration just by running svn checkout:

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

If I understand correctly, the "checkout" command in the upcoming 1.5
release will indeed have a "--force" option that does exactly what you
want.

-- 
... there are any number of partisan Democrats lurking in
engineering departments and liberal moles in software-writing
offices.
        -- Molly Ivins

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