Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Interesting use of Mercurial Queues :)</p> <p>I assume here that you are already versioning your mercurial queues somewhere. If you don't/for those that don't know how to do this, have a look at <a href="http://hgbook.red-bean.com/read/managing-change-with-mercurial-queues.html#sec:mq:repo" rel="noreferrer">the relevant section from the hgbook</a>: it's a great way to collaborate/save incrementally your work without applying the patches.</p> <h2>Three named branches</h2> <p>It should be possible to maintain three different <a href="http://hgbook.red-bean.com/read/managing-releases-and-branchy-development.html#id386031" rel="noreferrer">named branches</a>, one for each platform, in your MQ repository. </p> <p>To switch platform, just switch the active branch.</p> <p>(with <code>alias mq='hg -R $(hg root)/.hg/patches'</code>)</p> <p><strong>First create a windows branch:</strong></p> <pre><code>$ mq branch windows marked working directory as branch windows </code></pre> <p>created, but not yet committed. </p> <p><strong>Do some stuff, add patches:</strong></p> <pre><code>$ hg qnew windowspatch ... do some stuff </code></pre> <p><strong>Refresh, pop and commit:</strong></p> <pre><code>$ hg qref $ hg qpop -a $ mq ci -m 'new windows branch' </code></pre> <p>You now have the default branch and the new windows branch:</p> <pre><code>$ mq branches windows 65:5fd4ef0b96c9 default 64:06c1a56a3c08 (inactive) </code></pre> <p><strong>Now create an Unix branch.</strong> </p> <p>First switch back to the base default branch:</p> <pre><code>$ mq up default 1 files updated, 0 files merged, 1 files removed, 0 files unresolved </code></pre> <p>Create a new unix branch and add a unix-specific patch:</p> <pre><code>$ mq branch unix marked working directory as branch unix $ hg qnew unixpatch ... blahblah $ hg qref $ hg qpop -a $ mq ci -m 'adding unix branch' $ mq branches unix 66:c51bb2c7b413 windows 65:5fd4ef0b96c9 default 64:06c1a56a3c08 (inactive) </code></pre> <h3>Usage</h3> <p><em>Don't forget to <code>qpop -a</code> before operating on the mq repos...</em></p> <p>Push all the windows patches</p> <pre><code>$ mq up windows xx files updated, yy files merged, zz files removed, ww files unresolved $ hg qpush -a </code></pre> <h2>Three physical repos</h2> <p>Maintaining three separate (mercurial queue) branches can look a bit scary. If so, you can just use three different MQ repositories: one for each platform, each of them versioned in a different place.</p> <p>For example :</p> <pre><code>$ cd mqs $ hg qclone mq-windows windows $ hg qclone mq-unix unix $ hg qclone mq-mac mac </code></pre> <p>To work on different platforms, just switch folders (repos). The concept is similar to the first approach. But instead of having three internal branches in one MQ repo, you use three separate MQ repos.</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