You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Raghupradeep <ra...@amritatech.com> on 2009/01/06 13:44:46 UTC

svn copy file already exist

Dear experts,

          I am facing an issue while trying to branch a project. Its not a
straight forward branching, the process I followed is as below

          I checked out trunk with an old revision number to my local
machine then I updated some files to newer revision. I then tried to branch
from my local copy, but the commit is failing with the error 'file already
exists' .

         The svn copy command that I tried is

         svn copy X https://192.168.1.1/svn/X/branches/X_Rel123 -m "Creating
Branch for ..."

         The 'file already exists' is thrown for the file that I updated
individually after the checkout.

         Can anyone help me with this issue...

         The svn version that I am using is 1.5.4

with regards,
Raghupradeep.
-- 
View this message in context: http://www.nabble.com/svn-copy-file-already-exist-tp21310606p21310606.html
Sent from the Subversion Users mailing list archive at Nabble.com.

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: svn copy file already exist

Posted by Raghupradeep <ra...@amritatech.com>.
Stefan Sperling-7 wrote:
> 
> On Tue, Jan 06, 2009 at 03:42:10PM +0100, Stefan Sperling wrote:
>> On Tue, Jan 06, 2009 at 03:29:01PM +0100, Stefan Sperling wrote:
>> > All I'm seeing from my script (see attachment) is that alpha@r1 is
>> > copied instead of alpha@r3, i.e. copying a mixed-revision working
>> > copy verbatim to a URL does not seem to work.
>> 
>> Sorry, my script had a bug (it created a branch from trunk@r1 and
>> then tried to do so again from the working copy).
>> 
>> Fixed version is attached, the output looks good now,
> 
> This time with attachment...
> 
> Stefan
> 
>  
> 

Hi,
	I was able to branch when using the repository access protocol 'ra_local'.
But when trying to branch from remote using the WebDAV protocol like
'ra_neon' or 'ra_serf' its failing with the error 'file already  exists'. I
found out that this is happening only if I am doing svn update on the file.
If I am doing the update on the immediate parent folder of the  file I am
able to branch without any issues. So seams as a issue with WebDAV protocol.
	
Raghupradeep


-- 
View this message in context: http://www.nabble.com/svn-copy-file-already-exist-tp21310606p21346508.html
Sent from the Subversion Users mailing list archive at Nabble.com.

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: svn copy file already exist

Posted by Stefan Sperling <st...@elego.de>.
On Tue, Jan 06, 2009 at 03:42:10PM +0100, Stefan Sperling wrote:
> On Tue, Jan 06, 2009 at 03:29:01PM +0100, Stefan Sperling wrote:
> > All I'm seeing from my script (see attachment) is that alpha@r1 is
> > copied instead of alpha@r3, i.e. copying a mixed-revision working
> > copy verbatim to a URL does not seem to work.
> 
> Sorry, my script had a bug (it created a branch from trunk@r1 and
> then tried to do so again from the working copy).
> 
> Fixed version is attached, the output looks good now,

This time with attachment...

Stefan

Re: svn copy file already exist

Posted by Stefan Sperling <st...@elego.de>.
On Tue, Jan 06, 2009 at 03:29:01PM +0100, Stefan Sperling wrote:
> All I'm seeing from my script (see attachment) is that alpha@r1 is
> copied instead of alpha@r3, i.e. copying a mixed-revision working
> copy verbatim to a URL does not seem to work.

Sorry, my script had a bug (it created a branch from trunk@r1 and
then tried to do so again from the working copy).

Fixed version is attached, the output looks good now,
alpha@r2 is included in the branch. It seems to work.
I cannot reproduce your problem, there must be some detail missing...

+ rm -rf recipe
+ mkdir -p recipe
+ mkdir -p recipe/trunk
+ echo alpha
+ > recipe/trunk/alpha 
+ echo beta
+ > recipe/trunk/beta 
+ mkdir recipe/trunk/gamma
+ echo delta
+ > recipe/trunk/gamma/delta 
+ mkdir recipe/trunk/epsilon
+ echo zeta
+ > recipe/trunk/epsilon/zeta 
+ svnadmin create /tmp/recipe/repos
+ svn import recipe/trunk file:////tmp/recipe/repos/trunk -m importing project tree
Adding         recipe/trunk/gamma
Adding         recipe/trunk/gamma/delta
Adding         recipe/trunk/alpha
Adding         recipe/trunk/epsilon
Adding         recipe/trunk/epsilon/zeta
Adding         recipe/trunk/beta

Committed revision 1.
+ rm -rf recipe/trunk
+ svn checkout file:////tmp/recipe/repos/trunk recipe/trunk
A    recipe/trunk/gamma
A    recipe/trunk/gamma/delta
A    recipe/trunk/alpha
A    recipe/trunk/epsilon
A    recipe/trunk/epsilon/zeta
A    recipe/trunk/beta
Checked out revision 1.
+ svn checkout file:////tmp/recipe/repos/trunk recipe/trunk2
A    recipe/trunk2/gamma
A    recipe/trunk2/gamma/delta
A    recipe/trunk2/alpha
A    recipe/trunk2/epsilon
A    recipe/trunk2/epsilon/zeta
A    recipe/trunk2/beta
Checked out revision 1.
+ echo alpha, modified
+ > recipe/trunk/alpha 
+ echo delta, modified
+ > recipe/trunk/gamma/delta 
+ svn commit -m modified alpha and gamma/delta recipe/trunk
Sending        recipe/trunk/alpha
Sending        recipe/trunk/gamma/delta
Transmitting file data ..
Committed revision 2.
+ svn update recipe/trunk2/alpha
U    recipe/trunk2/alpha
Updated to revision 2.
+ cat recipe/trunk2/alpha
alpha, modified
+ svn info recipe/trunk2/alpha
Path: recipe/trunk2/alpha
Name: alpha
URL: file:///tmp/recipe/repos/trunk/alpha
Repository Root: file:///tmp/recipe/repos
Repository UUID: a1323e9c-dbff-11dd-9f52-f3acd7ff33ad
Revision: 2
Node Kind: file
Schedule: normal
Last Changed Author: stsp
Last Changed Rev: 2
Last Changed Date: 2009-01-06 15:38:08 +0100 (Tue, 06 Jan 2009)
Text Last Updated: 2009-01-06 15:38:09 +0100 (Tue, 06 Jan 2009)
Checksum: 83b7bafa90eaac08996a06ea0fc1063b

+ svn copy -m creating branch recipe/trunk2 file:////tmp/recipe/repos/branch

Committed revision 3.
+ svn cat file:////tmp/recipe/repos/branch/alpha
alpha, modified
+ svn log -v file:////tmp/recipe/repos/branch/alpha
------------------------------------------------------------------------
r3 | stsp | 2009-01-06 15:38:10 +0100 (Tue, 06 Jan 2009) | 1 line
Changed paths:
   A /branch (from /trunk:1)
   R /branch/alpha (from /trunk/alpha:2)

creating branch
------------------------------------------------------------------------
r2 | stsp | 2009-01-06 15:38:08 +0100 (Tue, 06 Jan 2009) | 1 line
Changed paths:
   M /trunk/alpha
   M /trunk/gamma/delta

modified alpha and gamma/delta
------------------------------------------------------------------------
r1 | stsp | 2009-01-06 15:38:05 +0100 (Tue, 06 Jan 2009) | 1 line
Changed paths:
   A /trunk
   A /trunk/alpha
   A /trunk/beta
   A /trunk/epsilon
   A /trunk/epsilon/zeta
   A /trunk/gamma
   A /trunk/gamma/delta

importing project tree
------------------------------------------------------------------------

Stefan

Re: svn copy file already exist

Posted by Stefan Sperling <st...@elego.de>.
On Tue, Jan 06, 2009 at 05:44:46AM -0800, Raghupradeep wrote:
> Dear experts,
> 
>           I am facing an issue while trying to branch a project. Its not a
> straight forward branching, the process I followed is as below
> 
>           I checked out trunk with an old revision number to my local
> machine then I updated some files to newer revision. I then tried to branch
> from my local copy, but the commit is failing with the error 'file already
> exists' .
> 
>          The svn copy command that I tried is
> 
>          svn copy X https://192.168.1.1/svn/X/branches/X_Rel123 -m "Creating
> Branch for ..."
> 
>          The 'file already exists' is thrown for the file that I updated
> individually after the checkout.
> 
>          Can anyone help me with this issue...
> 
>          The svn version that I am using is 1.5.4

Hi,

You could try copying the trunk at the old revision to a branch
first, and then copying all files you want at a different revision
from trunk into the branch.

If that does not work, please take the time to write a script
(preferably in UNIX /bin/sh if you can, otherwise send a windows
.bat file that we can translate to /bin/sh). The script should
create a new repository, and execute svn commands that show the
problem you are seeing.

I have tried to reproduce your problem but could not.

All I'm seeing from my script (see attachment) is that alpha@r1 is
copied instead of alpha@r3, i.e. copying a mixed-revision working
copy verbatim to a URL does not seem to work.

My script's output is:

+ rm -rf recipe
+ mkdir -p recipe
+ mkdir -p recipe/trunk
+ echo alpha
+ > recipe/trunk/alpha 
+ echo beta
+ > recipe/trunk/beta 
+ mkdir recipe/trunk/gamma
+ echo delta
+ > recipe/trunk/gamma/delta 
+ mkdir recipe/trunk/epsilon
+ echo zeta
+ > recipe/trunk/epsilon/zeta 
+ svnadmin create /tmp/recipe/repos
+ svn import recipe/trunk file:////tmp/recipe/repos/trunk -m importing project tree
Adding         recipe/trunk/gamma
Adding         recipe/trunk/gamma/delta
Adding         recipe/trunk/alpha
Adding         recipe/trunk/epsilon
Adding         recipe/trunk/epsilon/zeta
Adding         recipe/trunk/beta

Committed revision 1.
+ svn copy file:////tmp/recipe/repos/trunk file:////tmp/recipe/repos/branch -m creating branch

Committed revision 2.
+ rm -rf recipe/trunk
+ svn checkout file:////tmp/recipe/repos/trunk recipe/trunk
A    recipe/trunk/gamma
A    recipe/trunk/gamma/delta
A    recipe/trunk/alpha
A    recipe/trunk/epsilon
A    recipe/trunk/epsilon/zeta
A    recipe/trunk/beta
Checked out revision 2.
+ svn checkout file:////tmp/recipe/repos/trunk recipe/trunk2
A    recipe/trunk2/gamma
A    recipe/trunk2/gamma/delta
A    recipe/trunk2/alpha
A    recipe/trunk2/epsilon
A    recipe/trunk2/epsilon/zeta
A    recipe/trunk2/beta
Checked out revision 2.
+ echo alpha, modified
+ > recipe/trunk/alpha 
+ echo delta, modified
+ > recipe/trunk/gamma/delta 
+ svn commit -m modified alpha and gamma/delta recipe/trunk
Sending        recipe/trunk/alpha
Sending        recipe/trunk/gamma/delta
Transmitting file data ..
Committed revision 3.
+ svn update recipe/trunk2/alpha
U    recipe/trunk2/alpha
Updated to revision 3.
+ cat recipe/trunk2/alpha
alpha, modified
+ svn info recipe/trunk2/alpha
Path: recipe/trunk2/alpha
Name: alpha
URL: file:///tmp/recipe/repos/trunk/alpha
Repository Root: file:///tmp/recipe/repos
Repository UUID: 196ac584-dbfe-11dd-ae05-33cbc6e155f4
Revision: 3
Node Kind: file
Schedule: normal
Last Changed Author: stsp
Last Changed Rev: 3
Last Changed Date: 2009-01-06 15:27:10 +0100 (Tue, 06 Jan 2009)
Text Last Updated: 2009-01-06 15:27:11 +0100 (Tue, 06 Jan 2009)
Checksum: 83b7bafa90eaac08996a06ea0fc1063b

+ svn copy -m creating branch recipe/trunk2 file:////tmp/recipe/repos/branch

Committed revision 4.
+ svn cat file:////tmp/recipe/repos/branch/alpha
alpha
+ svn log -v file:////tmp/recipe/repos/branch/alpha
------------------------------------------------------------------------
r2 | stsp | 2009-01-06 15:27:08 +0100 (Tue, 06 Jan 2009) | 1 line
Changed paths:
   A /branch (from /trunk:1)

creating branch
------------------------------------------------------------------------
r1 | stsp | 2009-01-06 15:27:08 +0100 (Tue, 06 Jan 2009) | 1 line
Changed paths:
   A /trunk
   A /trunk/alpha
   A /trunk/beta
   A /trunk/epsilon
   A /trunk/epsilon/zeta
   A /trunk/gamma
   A /trunk/gamma/delta

importing project tree
------------------------------------------------------------------------

Stefan