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

Add/branch/switch/remove/switch issue.

From: Martin Tomes <lists_at_tomes.org>
Date: 2004-04-08 11:55:22 CEST

I ran into this while moving our project over from CVS to Subversion and I think this is a problem.
  It's a slightly odd situation but not an unlikely one.

Many of the target files in our project were committed to CVS because not everyone has the tools
required to build all of the targets. Not unreasonable. However, there are a lot of these targets
and I decided that when moving to subversion they would be removed from the version control system
so I did the following:

  - Move all files from CVS to Subversion including the targets to get a known starting point.
  - Created a branch and switched to it.
  - Made lots of changes including removing the targets.
  - Rebuilt the code. At this point the targets appear again but not under version control.
  - Switched back to the trunk.

The final switch failed because the targets existed in the working copy, and they existed on the
trunk in Subversion. I had to delete my working copy and re-checkout the trunk before I could merge
the branch into the trunk.

I have reproduced this below, once you are in this position parts of the WC are on the trunk URL and
parts are on the branch URL and there is no way out that I could find.

Server: RedHat 8, Apache 2.0.48, Subversion 1.0.1
Client: Windows/XP, Subversion 1.0.1

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
f:\martinto\tmp>svn checkout http://svn.eurotherm.co.uk:81/svn/play/martinto/trunk play
Checked out revision 47.
f:\martinto\tmp>cd play
F:\martinto\tmp\play>echo xxx > afile.txt
F:\martinto\tmp\play>mkdir sub
F:\martinto\tmp\play>cd sub
F:\martinto\tmp\play\sub>echo xxx > survivor.txt
F:\martinto\tmp\play\sub>echo xxx > NotReallyWanted.txt
F:\martinto\tmp\play\sub>cd ..
F:\martinto\tmp\play>svn add afile.txt sub
A afile.txt
A sub
A sub\NotReallyWanted.txt
A sub\survivor.txt
F:\martinto\tmp\play>svn commit
Adding afile.txt
Adding sub
Adding sub\NotReallyWanted.txt
Adding sub\survivor.txt
Transmitting file data ...
Committed revision 48.
F:\martinto\tmp\play>svn copy http://svn.eurotherm.co.uk:81/svn/play/martinto/trunk/
Committed revision 49.
F:\martinto\tmp\play>svn switch http://svn.eurotherm.co.uk:81/svn/play/martinto/branches/cleanup
At revision 49.
F:\martinto\tmp\play>cd sub/
F:\martinto\tmp\play\sub>svn delete NotReallyWanted.txt
D NotReallyWanted.txt
F:\martinto\tmp\play\sub>cd ..
F:\martinto\tmp\play>svn commit
Deleting sub\NotReallyWanted.txt

Committed revision 50.
F:\martinto\tmp\play>cd sub
F:\martinto\tmp\play\sub>echo xxx > NotReallyWanted.txt
F:\martinto\tmp\play\sub>cd ..
F:\martinto\tmp\play>svn switch http://svn.eurotherm.co.uk:81/svn/play/martinto/trunk/
svn: Failed to add file 'sub/NotReallyWanted.txt': object of the same name already exists
F:\martinto\tmp\play>rm sub/NotReallyWanted.txt
F:\martinto\tmp\play>svn switch http://svn.eurotherm.co.uk:81/svn/play/martinto/trunk/
svn: Can't copy 'sub/.svn/text-base/NotReallyWanted.txt.svn-base' to
'sub/.svn/tmp/text-base/NotReallyWanted.txt.svn-base.tmp': The system cannot find the file specified.

Should I add this to the Issue tracker?

Martin Tomes
echo 'Martin x Tomes at controls x eurotherm x co x uk'\
  | sed -e 's/ x /\./g' -e 's/ at /@/'
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Apr 8 11:55:52 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.