[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: Bob Archer <Bob.Archer_at_amsi.com>
Date: Tue, 27 Jan 2009 09:21:46 -0500

Can you use svn:externals? Granted you can only specify a directory.
But, you could put all shared files into a directory. This is what I do
to share common build scripts among all projects. I update the common
script in one place and when you update a WC pointed to it you will get
the updated file(s).

 

BOb

 

________________________________

From: Vishal Gangwal [mailto:vishalgangwal_at_waterford.org]
Sent: Monday, January 26, 2009 11:40 PM
To: Steven Bakke; Giulio.Troccoli_at_uk.linedata.com; sbutler_at_elego.de
Cc: users_at_subversion.tigris.org
Subject: RE: Svn copy does not work if destination file already exist

 

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=1059110

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