| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| 4 |
<head> |
| 5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 6 |
<meta name="generator" content="Docutils 0.21.2: https://docutils.sourceforge.io/" /> |
| 7 |
<title>hg unshelve</title> |
| 8 |
<link rel="stylesheet" href="../style.css" type="text/css" /> |
| 9 |
</head> |
| 10 |
<body> |
| 11 |
<div class="document" id="hg-unshelve"> |
| 12 |
<span id="hg-unshelve-1"></span> |
| 13 |
<h1 class="title">hg unshelve</h1> |
| 14 |
<h2 class="subtitle" id="restore-a-shelved-change-to-the-working-directory">restore a shelved change to the working directory</h2> |
| 15 |
|
| 16 |
<div class="contents htmlonly topic" id="contents"> |
| 17 |
<p class="topic-title"><a class="reference internal" href="#top">Contents</a></p> |
| 18 |
<ul class="simple"> |
| 19 |
<li><a class="reference internal" href="#synopsis" id="toc-entry-1">Synopsis</a></li> |
| 20 |
<li><a class="reference internal" href="#description" id="toc-entry-2">Description</a></li> |
| 21 |
<li><a class="reference internal" href="#options" id="toc-entry-3">Options</a></li> |
| 22 |
</ul> |
| 23 |
</div> |
| 24 |
<div class="section" id="synopsis"> |
| 25 |
<h1><a class="toc-backref" href="#contents">Synopsis</a></h1> |
| 26 |
<pre class="literal-block"> |
| 27 |
hg unshelve [OPTION]... [[-n] SHELVED] |
| 28 |
</pre> |
| 29 |
</div> |
| 30 |
<div class="section" id="description"> |
| 31 |
<h1><a class="toc-backref" href="#contents">Description</a></h1> |
| 32 |
<p>This command accepts an optional name of a shelved change to |
| 33 |
restore. If none is given, the most recent shelved change is used.</p> |
| 34 |
<p>If a shelved change is applied successfully, the bundle that |
| 35 |
contains the shelved changes is moved to a backup location |
| 36 |
(.hg/shelve-backup).</p> |
| 37 |
<p>Since you can restore a shelved change on top of an arbitrary |
| 38 |
commit, it is possible that unshelving will result in a conflict |
| 39 |
between your changes and the commits you are unshelving onto. If |
| 40 |
this occurs, you must resolve the conflict, then use |
| 41 |
<tt class="docutils literal"><span class="pre">--continue</span></tt> to complete the unshelve operation. (The bundle |
| 42 |
will not be moved until you successfully complete the unshelve.)</p> |
| 43 |
<p>(Alternatively, you can use <tt class="docutils literal"><span class="pre">--abort</span></tt> to abandon an unshelve |
| 44 |
that causes a conflict. This reverts the unshelved changes, and |
| 45 |
leaves the bundle in place.)</p> |
| 46 |
<p>If bare shelved change (without interactive, include and exclude |
| 47 |
option) was done on newly created branch it would restore branch |
| 48 |
information to the working directory.</p> |
| 49 |
<p>After a successful unshelve, the shelved changes are stored in a |
| 50 |
backup directory. Only the N most recent backups are kept. N |
| 51 |
defaults to 10 but can be overridden using the <tt class="docutils literal">shelve.maxbackups</tt> |
| 52 |
configuration option.</p> |
| 53 |
<div class="verbose docutils container"> |
| 54 |
<p>Timestamp in seconds is used to decide order of backups. More |
| 55 |
than <tt class="docutils literal">maxbackups</tt> backups are kept, if same timestamp |
| 56 |
prevents from deciding exact order of them, for safety.</p> |
| 57 |
<p>Selected changes can be unshelved with <tt class="docutils literal"><span class="pre">--interactive</span></tt> flag. |
| 58 |
The working directory is updated with the selected changes, and |
| 59 |
only the unselected changes remain shelved. |
| 60 |
Note: The whole shelve is applied to working directory first before |
| 61 |
running interactively. So, this will bring up all the conflicts between |
| 62 |
working directory and the shelve, irrespective of which changes will be |
| 63 |
unshelved.</p> |
| 64 |
</div> |
| 65 |
</div> |
| 66 |
<div class="section" id="options"> |
| 67 |
<h1><a class="toc-backref" href="#contents">Options</a></h1> |
| 68 |
<table class="docutils option-list" frame="void" rules="none"> |
| 69 |
<col class="option" /> |
| 70 |
<col class="description" /> |
| 71 |
<tbody valign="top"> |
| 72 |
<tr><td class="option-group"> |
| 73 |
<kbd><span class="option">-a</span>, <span class="option">--abort</span></kbd></td> |
| 74 |
<td>abort an incomplete unshelve operation</td></tr> |
| 75 |
<tr><td class="option-group"> |
| 76 |
<kbd><span class="option">-c</span>, <span class="option">--continue</span></kbd></td> |
| 77 |
<td>continue an incomplete unshelve operation</td></tr> |
| 78 |
<tr><td class="option-group" colspan="2"> |
| 79 |
<kbd><span class="option">-i</span>, <span class="option">--interactive</span></kbd></td> |
| 80 |
</tr> |
| 81 |
<tr><td> </td><td>use interactive mode (EXPERIMENTAL)</td></tr> |
| 82 |
<tr><td class="option-group"> |
| 83 |
<kbd><span class="option">-k</span>, <span class="option">--keep</span></kbd></td> |
| 84 |
<td>keep shelve after unshelving</td></tr> |
| 85 |
<tr><td class="option-group" colspan="2"> |
| 86 |
<kbd><span class="option">-n</span>, <span class="option">--name <var><NAME></var></span></kbd></td> |
| 87 |
</tr> |
| 88 |
<tr><td> </td><td>restore shelved change with given name</td></tr> |
| 89 |
<tr><td class="option-group" colspan="2"> |
| 90 |
<kbd><span class="option">-t</span>, <span class="option">--tool <var><VALUE></var></span></kbd></td> |
| 91 |
</tr> |
| 92 |
<tr><td> </td><td>specify merge tool</td></tr> |
| 93 |
<tr><td class="option-group"> |
| 94 |
<kbd><span class="option">--date <var><DATE></var></span></kbd></td> |
| 95 |
<td>set date for temporary commits (DEPRECATED)</td></tr> |
| 96 |
</tbody> |
| 97 |
</table> |
| 98 |
</div> |
| 99 |
</div> |
| 100 |
</body> |
| 101 |
</html> |