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

RE: How to "svn copy" over and over to the same file?

From: Dale Worley <dworley_at_pingtel.com>
Date: 2005-03-08 19:53:59 CET

> From: Subversion Newbie [mailto:subversionnewbie@yahoo.com]
> I'm trying to implement a post-commit hook that, upon a
> [certain] file being committed, copies that file (using svn
> copy) to its equivalent in another part of the same repository.
> At first glance I thought I could simply have the hook do a
> "svn copy" of that file from one place in the repository to
> another, but then realized it only works the first time, and
> subsequent "svn copy" would give me the error "File ... already
> exists".

I think what you want to do is first "svn delete" the target name, then "svn
copy" to it. That always succeeds.

At first glance, I thought that you might want to do merges, but then I
thought better of it -- Subversion knows that each revision of the target
name is equal to some particular revision of the source name, and so the
successive revisions of the target name do have proper incremental history
joining them, although that history is stored in the repository under tha
source name.


To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Mar 8 19:56:41 2005

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.