Note that there are some explanatory texts on larger screens.

plurals
  1. POMercurial repository layout for multiple branches
    text
    copied!<p>I have a number of quasi-related projects that I want to version control. In SVN I would set them up as multiple directories within a single project</p> <pre><code>/scripts #updates in sync with project1 &amp; project2 /project1 #requires database /project2 #requires database /database </code></pre> <p>Naturally other SVN layouts are possible for this toy example, but this layout has advantages:</p> <ul> <li>I can copy files between branches while preserving history</li> <li>I can check out only a subset of projects, eg <code>svn co repo/project2; svn co repo/database</code>. This saves a considerable amount of storage &amp; time if project1 is large.</li> <li>Easy repository management, since user access is defined once for all projects</li> </ul> <p>This paradigm doesn't map well to mercurial since <a href="https://stackoverflow.com/questions/920355/how-do-i-clone-a-sub-folder-of-a-repository-in-mercurial">you can't clone a single directory of a mercurial repo</a>. So my question is: what is the most common way to store large, closely related projects in mercurial?</p> <p>My ideas:</p> <ul> <li>Multiple repositories - loses history of files which move between projects</li> <li><a href="https://www.mercurial-scm.org/wiki/ForestExtension" rel="nofollow noreferrer">Forests</a> - seems stalled, and I'm not sure how stable this extension is</li> <li>Named branches with mostly unrelated content</li> <li><a href="https://www.mercurial-scm.org/wiki/subrepos" rel="nofollow noreferrer">SubRepos</a> - Unfortunately I'm running Ubuntu 9.04, which only ships hg 1.1.2. Otherwise this would look like a good option</li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload