Svn: How to checkout some directory and still be able to update at root
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.
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
.
Creating a dir with svn:externals with the structure you have mentioned will solve your problem.
精彩评论