You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Lee, Kevin" <kd...@qualcomm.com> on 2004/07/13 23:57:43 UTC

Question regarding WC->URL copy

Hi,

 

I'm trying to checkpoint some work onto a branch.  I'm having a problem
where the WC->URL copy is including an extra directory level.  This is
how I'm trying to do it:

 

#### Start of screen dump ####

[(Z) kdlee@or-portal pts/1 <testsvn> ]% svn co -r 11
http://localhost/svn/trepos/cx/trunk tree


A  tree/app

A  tree/app/app.c

A  tree/app/app.h

A  tree/lib

A  tree/lib/lib.c

A  tree/lib/lib.h

Checked out revision 11.

[(Z) kdlee@or-portal pts/1 <testsvn> ]% vi tree/lib/lib.c 

  modelines=5

[(Z) kdlee@or-portal pts/1 <testsvn> ]% svn copy -r 11
http://localhost/svn/trepos/cx/trunk
http://localhost/svn/trepos/cx/private/kdlee/chkpoint  

  modelines=5

 

Committed revision 16.

[(Z) kdlee@or-portal pts/1 <testsvn> ]% cd tree

[(Z) kdlee@or-portal pts/1 <tree> ]% svn copy .
http://localhost/svn/trepos/cx/private/kdlee/chkpoint

  modelines=5

 

Committed revision 17.

[(Z) kdlee@or-portal pts/1 <tree> ]% cd ..

[(Z) kdlee@or-portal pts/1 <testsvn> ]% svn co
http://localhost/svn/trepos/cx/private/kdlee/chkpoint chkpoint

A  chkpoint/tree                                     <- Extra dir
version

A  chkpoint/tree/app                               <- Extra dir version

A  chkpoint/tree/app/app.c                      <- Extra dir version

A  chkpoint/tree/app/app.h                      <- Extra dir version

A  chkpoint/tree/lib                                 <- Extra dir
version

A  chkpoint/tree/lib/lib.c                          <- Extra dir version

A  chkpoint/tree/lib/lib.h                          <- Extra dir version

A  chkpoint/app

A  chkpoint/app/app.c

A  chkpoint/app/app.h

A  chkpoint/lib

A  chkpoint/lib/lib.c

A  chkpoint/lib/lib.h

Checked out revision 17. 

 

[(Z) kdlee@or-portal pts/1 <testsvn> ]% svn --version

svn, version 1.0.5 (r9954)

   compiled Jun 16 2004, 10:48:28

 

Copyright (C) 2000-2004 CollabNet.

Subversion is open source software, see http://subversion.tigris.org/

This product includes software developed by CollabNet
(http://www.Collab.Net/).

 

The following repository access (RA) modules are available:

 

* ra_dav : Module for accessing a repository via WebDAV (DeltaV)
protocol.

  - handles 'http' schema

  - handles 'https' schema

* ra_local : Module for accessing a repository on local disk.

  - handles 'file' schema

* ra_svn : Module for accessing a repository using the svn network
protocol.

  - handles 'svn' schema

 

[(Z) kdlee@or-portal pts/1 <testsvn> ]%

 

#### End of screen dump ####

 

Note that when I check out from the checkpoint branch, I get my original
tree with the app and lib subdirectories, but I also get another whole
tree under the dir "tree" which was the root of my checked out tree.  If
I do:

 

            svn copy lib
http://localhost/svn/trepos/cx/private/kdlee/chkpoint

 

instead of 

 

            svn copy .
http://localhost/svn/trepos/cx/private/kdlee/chkpoint

 

It appears to work correctly.  But I don't want to have to remember
which subdir needs to be saved to the checkpoint branch.  Is there an
easier way to do this?

 

BTW I'm running 1.0.5 on RH9.

 

Thanks!  Kevin

 

 


Re: Question regarding WC->URL copy

Posted by Ben Collins-Sussman <su...@collab.net>.
> [(Z) kdlee@or-portal pts/1 <tree> ]% svn copy . 
> http://localhost/svn/trepos/cx/private/kdlee/chkpoint

I know what you're trying to do:  but you're making it too difficult on
yourself.

If you want to commit your local mods to a branch, then just

  $ cd tree
  $ svn switch http://localhost/svn/trepos/cv/private/kdlee/chkpoint
  $ svn commit

Poof, 'switch' effectively 'updates' your working copy to reflect the
branch.  And just like the update command, it preserves your local mods.

Much, much simpler.  When you're tired of working on the branch, just
'svn switch' back to the trunk URL.  No need to have multiple working
copies, or to do URL<->WC copy operations.  Update/commit/switch are all
the tools you need.





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org