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

Re: Svn copy does not work if destination file already exist

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: Fri, 23 Jan 2009 10:33:00 -0600

Vishal Gangwal wrote:
> Hi
>
> Svn copy does not work if destination file already exist . For example
> if we have file trunk/a.txt and we use " svn copy trunk/a.txt tags/a.txt
> " .
> It will copy file trunk/a.txt into tags directory as a.txt .
>
> Now we modify file trunk/a.txt and again we want to use " svn copy
> trunk/a.txt tags/a.txt " , so that a.txt in tags directory is updated
> copy of a.txt in trunk directory.
> But svn gives following error :
> svn: Failure opening '/tags/a.txt/a.txt'
> svn: '/trunk/a.txt' is not a directory in filesystem '/repos/test/db'
>
> So we are using " svn del tags/a.txt " and then " svn copy trunk/a.txt
> tags/a.txt "
>
> Is there any other way to achieve this ?
>
> So that we don't have to delete the file and save one revision number .
> And also we don't want repository history showing file deleted .

Firstly, what's the impetus for "saving" a revision number? I doubt you are
going to run out of them any time soon...

However, I can see why people would want a "clobber" option for 'svn cp'.
Patches welcome. :)

-Hyrum

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1045063

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-01-23 17:34:01 CET

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.