How does TortoiseHg's Shelve command fit into Kiln's Branch/Merge Paradigm? - Kiln Knowledge Exchange most recent 30 from http://kiln.stackexchange.com2013-05-18T19:51:06Zhttp://kiln.stackexchange.com/feeds/question/664http://www.creativecommons.org/licenses/by-nc/2.5/rdfhttp://kiln.stackexchange.com/questions/664/how-does-tortoisehgs-shelve-command-fit-into-kilns-branch-merge-paradigmHow does TortoiseHg's Shelve command fit into Kiln's Branch/Merge Paradigm?David2010-02-18T22:57:27Z2013-02-26T06:49:13Z
<p>I've noticed the Shelve command in TortoiseHg menus but discussion of it on this site (as yet) is nonexistant and documentation in the TortoiseHg is sparse as well.</p>
<p>What is Shelve, how does it fit into Kiln, and under what circumstances is it useful?</p>
<ul>
<li>Is this a means of saving some incomplete work without committing, such as when you are interrupted mid-task with a more pressing issue?</li>
<li>Is this an "out" for those times in Subversion where you would commit only some your current changes (often with disastrous results)?</li>
<li>Do commits and pushes with outstanding shelved items get communicated to Kiln in any way? (i.e. is it possible for Kiln to ever have tooling around this feature, or is it a phenomenon only for your local repository?)</li>
</ul>
http://kiln.stackexchange.com/questions/664/how-does-tortoisehgs-shelve-command-fit-into-kilns-branch-merge-paradigm/665#665Answer by Tyler Hicks-Wright for How does TortoiseHg's Shelve command fit into Kiln's Branch/Merge Paradigm?Tyler Hicks-Wright2010-02-18T23:16:21Z2010-02-18T23:16:21Z<p>Shelve is a way to put incomplete, uncommitted changes aside for the moment, freeing you to work with other repositories. The usual use case is this:</p>
<ol>
<li>I'm working on a new feature.</li>
<li>I get blocked by a bug.</li>
<li>My colleague fixes said bug in her repo and pushes the fix.</li>
<li>I try to <code>hg fetch</code> (or <code>hg merge</code>) her fix, but Mercurial complains that I have uncommitted changes.</li>
<li>I use <code>hgtk shelve</code> to put those changes aside for the moment.</li>
<li>Run <code>hg fetch</code>.</li>
<li>Use <code>hgtk shelve</code> to unshelve my changes and continue on my way.</li>
</ol>
<p>Shelve only stores the changes locally, they are not transmitted to any other repo when you push, or if someone pulls from your repo.</p>
<p>Be aware that it can get a bit messy if you try to shelve a file without unshelving it first. Likewise, you'll have to merge if you start working on a file you shelved without unshelving it first.</p>
<p>It's a useful little feature, and can help make the Mercurial workflow a little more flexible and forgiving.</p>
<blockquote>
<p>Note:</p>
<p>You might notice that there is also a
<a href="http://mercurial.selenic.com/wiki/ShelveExtension" rel="nofollow">shelve
extension</a>
for Mercurial, which gives you <code>hg
shelve</code>. TortoiseHg's <code>hgtk shelve</code> is
based on this extension (and is
bundled with TortoiseHg), but is
generally better maintained. If you
want the command line version, add the
following lines to your
<code>Mercurial.ini</code> instead of using the
extension:</p>
<pre><code>[extensions]
...
tortoisehg.util.hgshelve=
...
</code></pre>
</blockquote>