Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Kiln does <a href="http://kiln.stackexchange.com/questions/4249/does-kiln-support-trivial-paths-for-sub-repositories" rel="nofollow">currently not support subrepos that use nested URLs on the server</a>. This means that you cannot have both the following URLs working:</p> <pre><code>http://server/kiln/somepath/project1 http://server/kiln/somepath/project1/thirdparty </code></pre> <p>So you should setup Kiln so that you have <strong>four</strong> repositories on the server:</p> <pre><code>http://server/kiln/somepath/project1 http://server/kiln/somepath/project2 http://server/kiln/somepath/thirdparty http://server/kiln/somepath/common </code></pre> <p>That's easy — just four normal repositories. Then clone "project" and create the <code>.hgsub</code> file with:</p> <pre><code>thirdparty = http://server/kiln/somepath/thirdparty common = http://server/kiln/somepath/common </code></pre> <p>When you push that back to Kiln, it will notice and display links for the subrepositories. However, the subrepositories <strong>wont</strong> end up being nested on the server. So there wont be any <code>project1/thirdparty</code> path on the server.</p> <p>It's also far from clear that you would want that. When you have several projects that collaborate and use some common code base, then you want "project1" and "project2" to get each other's changes to this common code base. So it very useful that the <code>common</code> subrepo in both projects push and pull from <code>http://server/kiln/somepath/common</code>.</p> <p>In Mercurial, we <a href="http://mercurial.selenic.com/wiki/Subrepository#Recommendations" rel="nofollow">normally recommend</a> that you use paths of the form <code>common = common</code> in the <code>.hgsub</code> file. This means that the server must support nested repositories. When Kiln doesn't support nested repos, you can use full paths instead.</p> <p>When you initially setup the subrepositories, then remember that you need to update them manually. So with the above URLs, you would setup "project1" by running:</p> <pre><code>$ hg clone http://server/kiln/somepath/project1 $ echo "common = http://server/kiln/somepath/common" &gt; .hgsub $ echo "thirdparty = http://server/kiln/somepath/thirdparty" &gt; .hgsub $ hg commit -m "Created subrepos" </code></pre> <p>This creates initial empty subrepositories. They are empty because you haven't told Mercurial which changeset you need in them. This is tracked in <code>.hgsubstate</code> where you'll find:</p> <pre><code>0000000000000000000000000000000000000000 common 0000000000000000000000000000000000000000 thirdparty </code></pre> <p>To populate the subrepositories you do</p> <pre><code>$ cd common $ hg pull --update $ cd ../thirdparty $ hg pull --update $ cd .. $ hg commit -m "Updated subrepos" </code></pre> <p>This updates the <code>000...</code> lines in <code>.hgsubstate</code> with the current tip changeset IDs for the two subrepos. Future clones of "project1" will notice the <code>.hgsubstate</code> file and make sure to update the subrepos to the revision mentioned there.</p>
 

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