<p>When using Subversion (svn) for source control with multiple projects I've noticed that the revision number increases across all of my projects' directories.  To illustrate my svn layout (using fictitious project names): </p>

<pre>
    /NinjaProg/branches
              /tags
              /trunk
    /StealthApp/branches
               /tags
               /trunk
    /SnailApp/branches
             /tags
             /trunk
</pre>

<p>When I perform a commit to the trunk of the Ninja Program, let's say I get that it has been updated to revision 7.  The next day let's say that I make a small change to the Stealth Application and it comes back as revision 8.</p>

<p>The question is this: <strong>Is it common accepted practice to, when maintaining multiple projects with one Subversion server, to have unrelated projects' revision number increase across all projects?</strong> Or am I doing it wrong and should be creating individual repositories for each project?  Or is it something else entirely?</p>

<p><strong>EDIT:</strong> I delayed in flagging an answer because it had become clear that there are reasons for both approaches, and even though this question came first, I'd like to point to some other questions that are ultimately asking the same question: </p>

<p><a href="https://stackoverflow.com/questions/130447/should-i-store-all-projects-in-one-repository-or-mulitiple">Should I store all projects in one repository or mulitiple?</a></p>

<p><a href="https://stackoverflow.com/questions/252459/one-svn-repository-or-many">One SVN Repository or many?</a> </p>

[{'answer_id': 15676, 'author': 'John Downey', 'author_id': 200, 'author_profile': 'https://Stackoverflow.com/users/200', 'pm_score': 2, 'selected': False, 'text': '<p>This is due to how subversion works. Each revision is really a snapshot of the repository identified by that revision number. If all your projects share a repository then it is unavoidable. Typically, in my experience, however you would setup separate repositories for completely unrelated projects. So short answer is no you are doing nothing wrong it is a common question surrounding subversion but it makes sense when you think about how it stores repository information.</p>\n'}, {'answer_id': 15679, 'author': 'Steven Murawski', 'author_id': 1233, 'author_profile': 'https://Stackoverflow.com/users/1233', 'pm_score': 1, 'selected': False, 'text': '<p>I store one project per repository, and like a previous <a href="https://stackoverflow.com/questions/15621/subversion-question#15651">commenter</a> on this <a href="https://stackoverflow.com/questions/15621/subversion-question">subversion question</a>, I mark shared projects as external, so that they are only in source control once.</p>\n\n<p>I\'m just starting to add a CI build server (CruiseControl.NET), so I\'ll have to see how that all works out, but if my build scripts are right it should not be a problem.</p>\n\n<p>Other than appearance though, it is really a matter of preference (in my opinion).</p>\n'}, {'answer_id': 15680, 'author': 'Daniel Fone', 'author_id': 1848, 'author_profile': 'https://Stackoverflow.com/users/1848', 'pm_score': 2, 'selected': False, 'text': "<p>The revision number should really only be an identifier for a particular version. Whether it's sequential for a project or not shouldn't matter. That being said, I can understand that it's less than ideal.</p>\n\n<p>Most projects I've encountered have been setup in a single repository and the revision ids behave in this way. I don't know any SVN configuration option to change this behavior, and IMHO, maintaining multiple repositories seems like an unnecessary overhead.</p>\n"}, {'answer_id': 15684, 'author': 'Barrett Conrad', 'author_id': 1227, 'author_profile': 'https://Stackoverflow.com/users/1227', 'pm_score': 3, 'selected': False, 'text': "<p>I think it is highly recommended that you create separate repositories for each project.  If for nothing else than to avoid the scenario you are talking about.  </p>\n\n<p>With version control, especially Subversion, you can easily check out pieces of a repository into another working copy and then commit them back to their respective repositories.  That allows you to keep them clearly separate and distinct while giving you a great deal of flexibility. Once you get into SVN a little more (I'm assuming you are new.) you can start using hooks and I might see where that could get difficult with you setup.  If permission are important to you, a single repository might prove more difficult than necessary.</p>\n\n<p>Also, if you are concerned that it will take a lot of time to setup each repository look into the SVNParentPath variable for the Apache configuration file. (Again, I'm assuming you are using Apache.)</p>\n"}, {'answer_id': 16057, 'author': 'grom', 'author_id': 486, 'author_profile': 'https://Stackoverflow.com/users/486', 'pm_score': 2, 'selected': False, 'text': '<p>Recommended to use separate repository per project. In my Apache conf.d directory I have subversion.conf that contains:</p>\n\n<pre><code>&lt;Location /svn&gt;\n  DAV svn\n  SVNParentPath /var/www/svn\n\n  AuthType Basic\n  AuthName "Subversion Repository"\n  AuthUserFile /var/www/svn/password\n  Require valid-user\n&lt;/Location&gt;\n</code></pre>\n\n<p>Then whenever I start a new project I just run:</p>\n\n<pre><code>svnadmin create /var/www/svn/myproject\n</code></pre>\n'}, {'answer_id': 16062, 'author': 'flipdoubt', 'author_id': 470, 'author_profile': 'https://Stackoverflow.com/users/470', 'pm_score': 0, 'selected': False, 'text': "<p>One repository per project.</p>\n\n<p>Steven Murawski's comment about CC.NET is an interesting one. I would be interested to hear how it works if you need to specify several source control repositories.</p>\n"}, {'answer_id': 16162, 'author': 'crashmstr', 'author_id': 1441, 'author_profile': 'https://Stackoverflow.com/users/1441', 'pm_score': 2, 'selected': False, 'text': '<p>If having the revision numbers change based on other projects bothers you, then put the projects in separate repositories. That is the only way to make the revision numbers independent.</p>\n\n<p>To me, the big reason to use different repositories is to provide separate access control for users and/or using different hook scripts.</p>\n'}, {'answer_id': 16241, 'author': 'Erlend Halvorsen', 'author_id': 1920, 'author_profile': 'https://Stackoverflow.com/users/1920', 'pm_score': 2, 'selected': False, 'text': "<p>Hm, where I work we have all our projects in the same repository. I really don't see the benefit of separating them, doesn't that just create a lot of extra work -creating new repositories, granting access to people, etc? I guess separate repositories makes sense if the projects are completely unrelated, and you have, say, external customers that needs to have access to the repo.</p>\n"}, {'answer_id': 16278, 'author': 'Grant', 'author_id': 30, 'author_profile': 'https://Stackoverflow.com/users/30', 'pm_score': 2, 'selected': False, 'text': "<p>At my workplace, we have two repositories. One with public read access, and one for everything else. I'd use just one for everything, but we need different access rights for public/private projects.</p>\n\n<p>That said, I personally don't see the problem with the revision numbers incrementing on every update. The revision numbers could skip prime and even numbers and still do what its supposed to do. Make it easy to get to a specific revision.</p>\n"}, {'answer_id': 16784, 'author': 'flipdoubt', 'author_id': 470, 'author_profile': 'https://Stackoverflow.com/users/470', 'pm_score': 0, 'selected': False, 'text': '<p>@Daniel Fone: The SVN docs recommend one project per repository, so that is definitely the way the creators intended it to go. As you can have one server (apache or svnserve) maintain multiple repositories, I\'ve never run into a problem of too much overhead. With <a href="http://www.visualsvn.com/server/" rel="nofollow noreferrer">VisualSVN Server</a>, installing an apache server and configuring multiple repositories is a snap. </p>\n'}, {'answer_id': 26792, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': "<p>I'm not sure the SVN docs actually recommend one project per repository.  Mostly they talk about the upsides and downsides of each path.  I happen to use three different repositories, one for 7 or 8 projects that are all related, making it very nice to be able to send out compatible copies of all the projects just by building from one revision (or verifying they're compatible by looking at the revision numbers on each).  The second repository has another group of related projects and documents, while the third is a much smaller one.  That lets us take advantage of the fact that the related projects can be managed by a single revision number, but that unrelated projects don't affect their repository.  </p>\n"}, {'answer_id': 26836, 'author': 'Orion Edwards', 'author_id': 234, 'author_profile': 'https://Stackoverflow.com/users/234', 'pm_score': 2, 'selected': False, 'text': "<p>We just have one repository with everything in it, pretty much exactly like your example.</p>\n\n<p>I can't see anything wrong with this - the only requirement for the revision number is that it is</p>\n\n<ul>\n<li>Unique</li>\n<li>Atomic</li>\n<li>Bigger than it was at the last checkin</li>\n</ul>\n\n<p>It doesn't matter if it increases by 1 or 50 with each commit as far as I'm concerned.</p>\n\n<p>@grom:</p>\n\n<blockquote>\n  <p>Then whenever I start a new project I just run:</p>\n  \n  <p><code>svnadmin create /var/www/svn/myproject</code></p>\n</blockquote>\n\n<p>I can see this working fine if you've only got 1 or 2 devs, but what happens if the people who are creating new projects don't have shell access on the SVN server to be able to create directories under /var/www ? </p>\n"}, {'answer_id': 230005, 'author': 'James McMahon', 'author_id': 20774, 'author_profile': 'https://Stackoverflow.com/users/20774', 'pm_score': 4, 'selected': True, 'text': '<p>I am surprised no has mentioned that this is discussed in Version Control with Subversion, which is available free online, <a href="http://svnbook.red-bean.com/en/1.5/svn.reposadmin.planning.html" rel="nofollow noreferrer">here</a>.</p>\n<p>I read up on the issue awhile back and it really seems like a matter of personal choice, there is a good blog post on the subject <a href="http://blogs.open.collab.net/svn/2007/04/single_reposito.html" rel="nofollow noreferrer">here</a>. EDIT: <em>Since the blog appears to be down, (<a href="http://replay.web.archive.org/20090228154135/http://blogs.open.collab.net/svn/2007/04/single_reposito.html" rel="nofollow noreferrer">archived version here</a>), here is some of what Mark Phippard had to say on the subject.</em></p>\n<blockquote>\n<p>These are some of the advantages of the single repository approach.</p>\n<ol>\n<li>Simplified administration. One set of hooks to deploy. One repository to backup. etc.</li>\n<li>Branch/tag flexibility. With the code all in one repository it makes it easier to create a branch or tag involving multiple projects.</li>\n<li>Move code easily. Perhaps you want to take a section of code from one project and use it in another, or turn it into a library for several projects. It is easy to move the code within the same repository and retain the history of the code in the process.</li>\n</ol>\n<p>Here are some of the drawbacks to the single repository approach, advantages to the multiple repository approach.</p>\n<ol>\n<li>Size. It might be easier to deal with many smaller repositories than one large one. For example, if you retire a project you can just archive the repository to media and remove it from the disk and free up the storage. Maybe you need to dump/load a repository for some reason, such as to take advantage of a new Subversion feature. This is easier to do and with less impact if it is a smaller repository. Even if you eventually want to do it to all of your repositories, it will have less impact to do them one at a time, assuming there is not a pressing need to do them all at once.</li>\n<li>Global revision number. Even though this should not be an issue, some people perceive it to be one and do not like to see the revision number advance on the repository and for inactive projects to have large gaps in their revision history.</li>\n<li>Access control. While Subversion\'s authz mechanism allows you to restrict access as needed to parts of the repository, it is still easier to do this at the repository level. If you have a project that only a select few individuals should access, this is easier to do with a single repository for that project.</li>\n<li>Administrative flexibility. If you have multiple repositories, then it is easier to implement different hook scripts based on the needs of the repository/projects. If you want uniform hook scripts, then a single repository might be better, but if each project wants its own commit email style then it is easier to have those projects in separate repositories</li>\n</ol>\n</blockquote>\n<p>When you really think about, the revision numbers in a multiple project repository are going to get high, but you are not going to run out. Keep in mind that you can view a history on a sub directory and quickly see all the revision numbers that pertain to a project.</p>\n'}, {'answer_id': 337108, 'author': 'Mnementh', 'author_id': 21005, 'author_profile': 'https://Stackoverflow.com/users/21005', 'pm_score': 0, 'selected': False, 'text': '<p>The revision-numbers have no semantic use. The only thing is, that they are in sequential order. If you dump your project and import it in another repository, your versions can get new revision-numbers. So <strong>NEVER</strong> use the revision-numbers to mark your releases or similar stuff. Make tags for releases (copies of the relevant revision).</p>\n'}, {'answer_id': 339837, 'author': 'Ronald Conco', 'author_id': 16092, 'author_profile': 'https://Stackoverflow.com/users/16092', 'pm_score': 0, 'selected': False, 'text': '<p>Had the same problem in my previous company, They use to have like 50 projects running in one repository and it was a nightmare to work on the same projects because of when doing svn updates others would curse....lol...</p>\n\n<p>One thing I have learned that always works out best, One project One Repo....you will never regret it.</p>\n'}, {'answer_id': 11707035, 'author': 'ShaunOfTheLive', 'author_id': 1169994, 'author_profile': 'https://Stackoverflow.com/users/1169994', 'pm_score': 2, 'selected': False, 'text': '<p>Maybe it\'s best not to necessarily make one repo per "project", but rather one repo per "solution" (to use Visual Studio terms). If you have a bunch of "projects" in different folders but they\'re related to each other, then put them in the same repo.</p>\n'}, {'answer_id': 16148221, 'author': 'jjthomas3rd', 'author_id': 1964446, 'author_profile': 'https://Stackoverflow.com/users/1964446', 'pm_score': 1, 'selected': False, 'text': '<blockquote>\n  <p>When you really think about, the revision numbers in a multiple\n  project repository are going to get high, but you are not going to run\n  out. Keep in mind that you can view a history on a sub directory and\n  quickly see all the revision numbers that pertain to a project.</p>\n</blockquote>\n\n<p>Actually if your building Microsoft code, and you use the svn revision numbers as a part of your version string then you could run out. Microsoft compiler will throw an error if any part of the version string is greater than 65535.... In our case we have a massive repository at revision 68876 and we just hit this wall.</p>\n'}]
['https://Stackoverflow.com/questions/15674', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1339/']