How to consolidate multiple .svn hidden directories with Subversion 1.7+

According to the Apache Subversion 1.7 release notes :

Instead of the .svn directory in each working copy directory, working copies of Subversion 1.7 have only one .svn directory in the root of the working copy.

Suppose there are several directories in the repository, and when I first check, I only selectively check specific directories. This, as the documentation says, creates only one hidden .svn folder in the top-level directory.

If, however, later I decided to check another directory, after the verification is complete, another .svn directory will appear within the newly extracted directory.

The consequences of this are that if I try to commit from the root level, it will only know about directories that were originally checked. I will also have to commit for any subsequent checks individually.

Is there a way to change this behavior or make two hidden .svn directories merged together? Or do I need to do something like checking the entire structure of the storage directory on the first check?

+6
source share
1 answer

Short answer: None. Each individual check has its own database. I am sure that if you understand the deep magic hidden inside the .svn directory, you can execute it to do what you want. However, unlike versions 1.1 - 1.6 of Subversion, the structure of this .svn directory .svn much more complicated and not so clear.

In your case, it is best to check everything, and do a new check to include both projects.

If you want to do this on a regular basis, then you should use --depth= in svn co and --set-depth= in svn update .

For example, I check the base directory, but I don’t need 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 

This checks the .settings and .classpath , as well as the foundation , client and server directories, but nothing else. It is fast and I do not check many things that I do not 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 check the entire directory structure. Now I can work with server , but I do not have the foundation or client files taking up space.

Later I would like to do some work in the foundation :

$ svn update --set-depth = infinity base

Now I have a foundation directory. And I have only one .svn directory in my base_prod directory.

+6
source

Source: https://habr.com/ru/post/925324/


All Articles