[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: Subversion Newbie <subversionnewbie_at_yahoo.com>
Date: 2005-03-08 21:00:56 CET

Allan & Dale, thanks for the tips. I'll probably take one of
these routes. -T.

--- allan juul <allan@muly.dk> wrote:
> Dale Worley wrote:
>
> >>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.
> >
> > Dale
>
> we had a simlar problem with out build script
>
> in the post-hook you could do a
>
> svn ls url
>
> (or a simlar thing using svnloo )
> parse the output to verify existence/non-existence
>
> if the destination url does already exist you should change
> the it in
> your copy command accordingly
>
> ./allan

        
                
__________________________________
Celebrate Yahoo!'s 10th Birthday!
Yahoo! Netrospective: 100 Moments of the Web
http://birthday.yahoo.com/netrospective/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Mar 8 21:03:28 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.