2

I'm new to SVN and trying to learn the process. I have a trunk with many directories that looks something like this:

trunk
  folder1
    language1          
    language2
  folder2
    language1
    language2
  global
    language1.jpg
    language2.jpg
  webroot
    language1
    language2

I want to copy certain files and folders over to a new branch using svn copy. Right now, I'm copying over everything, which is not necessary:

svn copy http://url-to-repo/trunk http://url-to-repo/branches/new-branch

How can copy specific items so that my branch looks something like this?:

branches
  new-branch
    folder1
      language1                    
    folder2
      language1        
    global
      language1.jpg
    webroot
      language1
MT3
  • 1,065
  • 3
  • 13
  • 22
  • It sounds like you want to have a separate project for language2, with it's own branches, tags and trunk folder. Generally branching a sub-set of a project is a bad idea. – thekbb May 09 '13 at 20:01
  • @thekbb It's not so much that I want to branch a sub-set of the project. I was just looking for a way to only copy over the files/directories that I'd actually be working with. Then, when done, I'd merge those changes back into the trunk. Is that the right approach? – MT3 May 09 '13 at 21:12
  • @ManojThomas: The best approach is to copy the whole tree. If you don't make changes to the files in the other directories, they can't cause any conflicts. The svn server is optimized for this operation, and it doesn't require more resources. If you don't want to see the directories in your working copy, you can use `svn up --set-depth exclude` to remove them from your working copy - not from the branch. – nosid May 09 '13 at 21:34
  • Thanks @nosid. Once concern that was brought up is that the branches are getting pretty large (1GB+). Also, if someone else has to copy a branch, it takes quite a bit of extra time. If I remember correctly, it TortoiseSVN you can right click and select multiple files/folders and just copy those to your new branch. I guess I'm trying to do the same from Terminal. – MT3 May 10 '13 at 02:32
  • @ManojThomas: Who cares if the branches are pretty large? As I said: They do not consume any space on the server. And the user can decide, which parts of the branch he requires - by using a sparse working copy. Sounds like you try to solve a problem that doesn't exist. – nosid May 10 '13 at 19:15

0 Answers0