0

I have a SVN project at work that looks like this:

Repository

 project
   |-- docs
   |-- scripts
   `-- app
        |-- trunk
        |-- branches
        |     `-- development
        `-- tags
            |-- Release_1.0
            |-- ...
            `-- Release_5.3

I want my working folder like this:

Working copy

 dir_root
   |-- docs
   |-- scripts
   |-- trunk
   `-- branches
         `-- development

I would like to commit some code from "dir_root/trunk" and "dir_root/docs" simultaneously in one commit to have only 1 revision number.

How can I checkout to ignore the "tags" folder and still be able to commit to multiple directories.

Note:

  • I can't checkout all the repository because "tags" contains too many release.
  • I tried to use sparse directories, but it keep giving me this error "svn: '/dir_root' is not a working copy" when I try to commit.
Zoe
  • 27,060
  • 21
  • 118
  • 148
yvoyer
  • 7,476
  • 5
  • 33
  • 37

2 Answers2

1

From the error it looks like each of the folders under dir_root was checkout separately. Thus dir_root itself does not correspond to project folder in SVN.

You could start by checking out project with --depth immediates into dir_root. This will create a folder structure similar to the one in SVN in your dir_root. After this you can update the sub-folders you are interested in (i.e. docs, trunk, etc.). Once this is done, you can make changes to contents and do a single commit from dir_root which contain changes to dir_root/trunk and dir_root/docs.

Raghuram
  • 51,854
  • 11
  • 110
  • 122
  • How do I update the files from docs or trunk. I used svn update --depth inifity, but the files in the folders did not updated. – yvoyer Oct 30 '10 at 13:59
  • I tried to do what you told me, but I still can't commit or status from dir_root. I checked out with depth immediate in dir_root, and updated the docs and trunk with --set-depth infinity. Then each files I modified would not appear in the svn status or svn commit from dir_root. What did I missed? – yvoyer Oct 30 '10 at 16:35
  • Finally I made it work. I checked out "dir_root" using immediates, and then updated "app/trunk" and "app/branches" using --set-depth infinity. I don't know what I did wrong before, but it works now. Thanks you. – yvoyer Nov 01 '10 at 13:20
0

Creating a dir with svn:externals with the structure you have mentioned will solve your problem.

Version Control Buddy
  • 1,416
  • 10
  • 14
  • Would I be able to commit my changes by being positioned in dir_root? – yvoyer Oct 30 '10 at 13:52
  • yep, until the whole working copy is in the same repository repository. check this http://stackoverflow.com/questions/769236/how-can-i-do-a-single-svn-commit-across-multiple-externals-at-the-command-line – Version Control Buddy Oct 31 '10 at 07:04