SVN no longer writes .svn in all sub-folders?
Asked Answered
Y

2

21

I recently upgraded my SVN client from 1.6.9 to 1.7.2 and after converting to the new format, I noticed that there is no longer a .svn every sub-folders. For my particular configuration this is not very convenient.

Is there a way to undo this or revert to the old behavior where each subfolder from a CO would have a .svn ?

Yucca answered 30/1, 2012 at 20:16 Comment(6)
I realize my question is obscure but I tried to search google/bing for this before asking but didnt find anything relevant. any help or pointers would be appreciated.Yucca
What part of SVN are you abusing to make having .svn folders everywhere convenient?Kimes
You could always downgrade your svn client (I think you'll have to remove it and install the older version then possibly retrieve your repository again (because it presumably isn't backwards compatible).Sociality
We have a deep tree keeping a third party lib and several variants Alive. We used a subst drive to point at a deep level in the tree to make life convenient. With a local .svn were a snap. Now we have to change to the checkout drive path to check in.Yucca
This change is just inconvenient. Previously I could copy a subfolder of a working tree, along with its .svn, and I could work on it as an independent and smaller working tree. This was very convenient, while not involving any "abuse" of the .svn folders at all.Had
You can do the same by using svn info to get the URL for the subdir and then check it out somewhere else. I do agree that being able to mv a directory with modifications somewhere else and revert the original directory was convenient. I tend to use branches more often now for this.Stilu
S
39

Subversion 1.7 features a complete re-write of the working copy metadata management system of Subversion, code named WC-NG. The old system was one of the first parts of Subversion written, and over time had grown difficult to maintain and extend. WC-NG is intended to provide an immediate performance improvement, while also enabling many future feature enhancements.

A key feature of the changes introduced in Subversion 1.7 is the centralization of working copy metadata storage into a single location. 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. This directory includes (among other things) an SQLite-backed database which contains all of the metadata Subversion needs for that working copy.

Even though the data is stored in a structured format, the relationships between the data are complex. We highly discourage external tools from modifying the data held in this database, as such modification is likely to result in working copy corruption.

Read more here.

Sienna answered 30/1, 2012 at 20:21 Comment(2)
-1: this answer is a bit out of topic, as the core part of the question ("is there a way to revert to the old behavior where each subfolder would have a .svn?") is ignored.Had
@Lorenzo I think that people should be able to read "no" out of the provided text.Waterworks
D
3

The most straightforward way to get subversion to write out .svn directories in every directory is to downgrade your subversion to a version before the 1.7 series. Subversion 1.6.23 was the last version to have the behavior you want.

Another way to accomplish this that will work with Subversion 1.7 and later is to individually check out each subdirectory of your project. For example, if you had a project with a directory structure like:

project
`- bin
`- etc

You could check it out by doing something like:

mkdir project
cd project
svn co svn+ssh://[email protected]/src/project/bin
svn co svn+ssh://[email protected]/src/project/etc

This is only tolerable if you have few directories and their organization is shallow.

Otherwise, downgrading to an older subversion is your best bet.

Dodson answered 30/7, 2014 at 5:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.