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

replacing "svn copy"'ed dirs

From: SLOGEN <jensen_at_slog.dk>
Date: 2003-10-01 13:10:31 CEST

SVN is working great for me, but I have some problems on how to re-copy
stuff.

When creating compositions in svn, using the "svn copy" command, like:

   C:\temp\wc\myproject>svn copy
file:///c:/temp/svnroot/somelib/tags/1.0.1 somelib
   A somelib\file
   Checked out revision 9.
   A somelib
   C:\temp\wc\myproject>svn commit -m ""
   Adding myproject\somelib
   Committed revision 10.

How should i go about "upgrading" to a new version of "somelib" in
"myproject", the obvious to try is:

   C:\temp\wc\myproject>svn copy
file:///c:/temp/svnroot/somelib/tags/1.0.2 somelib
   A somelib\1.0.2\file
   Checked out revision 10.
   A somelib\1.0.2

But that doesn't really produce the right result, so quickly:

   C:\temp\wc\myproject>svn del --force somelib/1.0.2

When switching:

   C:\temp\wc\myproject>svn switch
file:///c:/temp/svnroot/somelib/tags/1.0.2 somelib
   U somelib\file
   Updated to revision 10.

SVN does not see this as a change to myproject, contrary to what I would
expect. but instead as a switch in somelib:

   C:\temp\wc\myproject>svn status
     S somelib

So SVN cannot commit that:

   C:\temp\wc\myproject>svn commit -m "now using somelib-1.0.2"

merge doese the right thing:

   C:\temp\wc\myproject>svn merge
file:///c:/temp/svnroot/somelib/tags/1.0.1
file:///c:/temp/svnroot/somelib/tags/1.0.2 somelib
   U somelib\file
   C:\temp\wc\myproject>svn commit -m "upgraded to somelib-1.0.2"
   Sending myproject\somelib\file
   Transmitting file data .
   Committed revision 11.

But doesn't generate the right history:

   C:\temp\wc\myproject>svn log -v -r 11 .
------------------------------------------------------------------------
rev 11: jensen | 2003-10-01 12:59:00 +0200 (Wed, 01 Oct 2003) | 1 line
Changed paths:
    M /myproject/somelib/file

upgraded to somelib-1.0.2
------------------------------------------------------------------------

since I now lost track of where the content of somelib came from.

(svn del ...; svn copy ...) is not good either, since, it cannot work as
an atomic transaction:

   C:\temp\wc\myproject>svn del somelib
   D somelib\file
   D somelib

   C:\temp\wc\myproject>svn copy
file:///c:/temp/svnroot/somelib/tags/1.0.3 somelib

   A somelib\1.0.3\file
   Checked out revision 13.
   svn: Unmergeable scheduling requested on an entry
   svn: Can not add 'somelib/1.0.3' to a parent directory scheduled for
deletion

so im left with the workaround:

   C:\temp\wc\myproject>svn del --force somelib
   D somelib\file
   D somelib
   C:\temp\wc\myproject>svn commit -m "upgrading"
   Deleting myproject\somelib
   Committed revision 14.
   C:\temp\wc\myproject>svn copy
file:///c:/temp/svnroot/somelib/tags/1.0.3 somelib
   A somelib\file
   Checked out revision 14.
   A somelib

which is really not very satisfactory...

-- 
Helge
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Oct 1 13:18:38 2003

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.