views:

30

answers:

2

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.
+1  A: 

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
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
svn update --set-depth infinity
Raghuram
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
A: 

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

Version Control Buddy
Would I be able to commit my changes by being positioned in dir_root?
yvoyer
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