According to the Apache Subversion 1.7 release notes:
Instead of a .svn directory in every directory in the working copy, Subversion 1.7 working copies have just one .svn directory—in the root of the working copy.
Lets say there are multiple directories in a repository, and when I first checkout I only selectively checkout specific directories. This, as the documentation says, only creates a single .svn hidden folder at the top level directory.
If however, I later on decide to checkout another directory, after the checkout completes, there will be another .svn directory within the newly checked out directory.
The implications of this is that if I try to do a commit from the root level, it will only be aware of the directories that were originally checked out. I will also have to a commit for any subsequent checkouts individually.
Is there anyway to change this behaviour or make the two hidden .svn directories merge together? Or will I have to do something like check out the entire repository directory structure the first time I do a checkout?
Short answer: No. Each is a separate checkout and has its own database. I'm sure if you understood the deep magic hidden inside the .svn
directory, you could munge it to do what you want. However, unlike Subversion versions 1.1 to 1.6, the structure of that .svn
directory is much, much more complex and not as easily understood.
In your case, your best bet is to check everything back in, and do a new checkout to include both projects.
If you want to do this on a regular basis, what you should be doing is using the --depth=
in svn co
and the --set-depth=
in svn update
.
For example, I'm checking out the base directory, but I don't want anything else:
$ svn co --depth=immediates http://svn.vegicorp.com/svn/base_prod
A base_prod/.classpath
A base_prod/.settings
A base_prod/foundation
A base_prod/client
A base_prod/server
That checks out the .settings
and .classpath
file, and the foundation
, client
, and server
directories, but nothing else. It's fast, and I don't checkout a lot of stuff I don't want.
Now, I want to work on the server:
$ cd base_prod
$ svn update --set-depth=infinity server
This will update my server directory, but will checkout the entire directory structure. I now can work with server
, but I don't have the foundation
or client
files taking up room.
Later on, I'd like to do some work in foundation
:
$ svn update --set-depth=infinity foundation
Now, I have the foundation
directory. And, I only have a single .svn
directory under my base_prod
directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With