[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: Vishal Gangwal <vishalgangwal_at_waterford.org>
Date: Mon, 26 Jan 2009 21:39:54 -0700

Hi
 
Let me further explain our requirement. We are trying to achieve file
sharing concept in subversion.We have same file in multiple locations in
repository.
So when file at any of the location changes , we want to update it at
all the locations so that all are identical files ( that is what shared
files is ).
So we are using post-commit hook script to automatically update all the
locations.
We have media (binary) files which are shared.
 
So when one of the file is modified we use svn del and svn copy to
achieve this , because if the files already exist then svn does not
allow to copy it .
But repository history shows that the files was deleted and also there
are 2 operations required to achieve this - svn del and svn copy.
 
We want to know is there any other way than svn del and svn copy to
achieve this ?
 
 
Thanks & Regards
Vishal Gangwal
        
>
>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 .

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-01-27 15:16:13 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.