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

Re: overwrite/convert a working directory

From: Phillip Susi <psusi_at_cfl.rr.com>
Date: 2006-03-03 19:39:23 CET

Avram Dorfman wrote:
> Actually, I see that I left something important out of my explanation.
> Since the directory in question is deeply nested, a "simple copy" is not
> enough, b/c that won't copy directories. In Unix, "cp -R" will do it
> recursively, so that "should" be fine.
> The problem is that cp -R chokes on symbolic links, and there are some
> in the dir structure in question. cp -R has a few options for handling
> symbolic links, but they involve whether to follow them or not. None of
> them enable it to simply overwrite a symbolic link with another symbolic
> link. Here is the error I get:
> corp-shell1% cp -R bar/* foo
> cp: symlink: far: File exists
> cp: cannot overwrite directory foo/far with non-directory bar/far
> corp-shell1%
> the troulbe is, foo/far is not a directory, it is a symbolic link, as
> is bar/far. In fact, foo/far got there by a previous run of the exact
> same cp -R invocation - it hasn't even changed since then.

I think you want cp -a.

> The other factor that caused me to raise this question is a byproduct of
> the fact that I'm using Mac OS X; When you copy a folder in the Finder,
> it deletes destination folders of the same name, so then you lose your
> .svn's again.

Sounds like the Finder is broken then. Try reporting that bug to Apple.
  When you copy a folder to another existing one, it should add/replace,
not delete anything from the destination folder.

> In thinking this through further, I acknowledge that this isn't an SVN
> issue, it is two different issues with two different copy utilities, and
> the simple answer is "get the files in there somehow without disrupting
> the .svn directories, and then svn doesn't have anything to do with it."
> So, sorry for airing my dirty laundry publicly, and failing to think
> this all the way through before posting. I think maybe I needed to hear
> somebody else say "this is a copy issue not an svn issue".

This is a copy issue not an svn issue ;)

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Mar 3 19:43:07 2006

This is an archived mail posted to the Subversion Users mailing list.