| 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 tag</title> |
| 8 |
<link rel="stylesheet" href="../style.css" type="text/css" /> |
| 9 |
</head> |
| 10 |
<body> |
| 11 |
<div class="document" id="hg-tag"> |
| 12 |
<span id="hg-tag-1"></span> |
| 13 |
<h1 class="title">hg tag</h1> |
| 14 |
<h2 class="subtitle" id="add-one-or-more-tags-for-the-current-or-given-revision">add one or more tags for the current or given revision</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 tag [-f] [-l] [-m TEXT] [-d DATE] [-u USER] [-r REV] NAME... |
| 28 |
</pre> |
| 29 |
</div> |
| 30 |
<div class="section" id="description"> |
| 31 |
<h1><a class="toc-backref" href="#contents">Description</a></h1> |
| 32 |
<p>Name a particular revision using <name>.</p> |
| 33 |
<p>Tags are used to name particular revisions of the repository and are |
| 34 |
very useful to compare different revisions, to go back to significant |
| 35 |
earlier versions or to mark branch points as releases, etc. Changing |
| 36 |
an existing tag is normally disallowed; use -f/--force to override.</p> |
| 37 |
<p>If no revision is given, the parent of the working directory is |
| 38 |
used.</p> |
| 39 |
<p>To facilitate version control, distribution, and merging of tags, |
| 40 |
they are stored as a file named ".hgtags" which is managed similarly |
| 41 |
to other project files and can be hand-edited if necessary. This |
| 42 |
also means that tagging creates a new commit. The file |
| 43 |
".hg/localtags" is used for local tags (not shared among |
| 44 |
repositories).</p> |
| 45 |
<p>Tag commits are usually made at the head of a branch. If the parent |
| 46 |
of the working directory is not a branch head, <a class="reference external" href="hg-tag.html"><tt class="docutils literal">hg tag</tt></a> aborts; use |
| 47 |
-f/--force to force the tag commit to be based on a non-head |
| 48 |
changeset.</p> |
| 49 |
<p>See <a class="reference external" href="topic-dates.html"><tt class="docutils literal">hg help dates</tt></a> for a list of formats valid for -d/--date.</p> |
| 50 |
<p>Since tag names have priority over branch names during revision |
| 51 |
lookup, using an existing branch name as a tag name is discouraged.</p> |
| 52 |
<p>Returns 0 on success.</p> |
| 53 |
</div> |
| 54 |
<div class="section" id="options"> |
| 55 |
<h1><a class="toc-backref" href="#contents">Options</a></h1> |
| 56 |
<table class="docutils option-list" frame="void" rules="none"> |
| 57 |
<col class="option" /> |
| 58 |
<col class="description" /> |
| 59 |
<tbody valign="top"> |
| 60 |
<tr><td class="option-group"> |
| 61 |
<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> |
| 62 |
<td>force tag</td></tr> |
| 63 |
<tr><td class="option-group"> |
| 64 |
<kbd><span class="option">-l</span>, <span class="option">--local</span></kbd></td> |
| 65 |
<td>make the tag local</td></tr> |
| 66 |
<tr><td class="option-group" colspan="2"> |
| 67 |
<kbd><span class="option">-r</span>, <span class="option">--rev <var><REV></var></span></kbd></td> |
| 68 |
</tr> |
| 69 |
<tr><td> </td><td>revision to tag</td></tr> |
| 70 |
<tr><td class="option-group"> |
| 71 |
<kbd><span class="option">--remove</span></kbd></td> |
| 72 |
<td>remove a tag</td></tr> |
| 73 |
<tr><td class="option-group"> |
| 74 |
<kbd><span class="option">-e</span>, <span class="option">--edit</span></kbd></td> |
| 75 |
<td>invoke editor on commit messages</td></tr> |
| 76 |
<tr><td class="option-group" colspan="2"> |
| 77 |
<kbd><span class="option">-m</span>, <span class="option">--message <var><TEXT></var></span></kbd></td> |
| 78 |
</tr> |
| 79 |
<tr><td> </td><td>use text as commit message</td></tr> |
| 80 |
<tr><td class="option-group" colspan="2"> |
| 81 |
<kbd><span class="option">-d</span>, <span class="option">--date <var><DATE></var></span></kbd></td> |
| 82 |
</tr> |
| 83 |
<tr><td> </td><td>record the specified date as commit date</td></tr> |
| 84 |
<tr><td class="option-group" colspan="2"> |
| 85 |
<kbd><span class="option">-u</span>, <span class="option">--user <var><USER></var></span></kbd></td> |
| 86 |
</tr> |
| 87 |
<tr><td> </td><td>record the specified user as committer</td></tr> |
| 88 |
</tbody> |
| 89 |
</table> |
| 90 |
</div> |
| 91 |
</div> |
| 92 |
</body> |
| 93 |
</html> |