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_at_r1 is
copied instead of alpha_at_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
Received on 2009-01-06 15:31:01 CET