| 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>churn</title> |
| 8 |
<link rel="stylesheet" href="../style.css" type="text/css" /> |
| 9 |
</head> |
| 10 |
<body> |
| 11 |
<div class="document" id="churn"> |
| 12 |
<span id="ext-churn"></span> |
| 13 |
<h1 class="title">churn</h1> |
| 14 |
|
| 15 |
<div class="contents htmlonly topic" id="contents"> |
| 16 |
<p class="topic-title"><a class="reference internal" href="#top">Contents</a></p> |
| 17 |
<ul class="simple"> |
| 18 |
<li><a class="reference internal" href="#commands" id="toc-entry-1">Commands</a><ul> |
| 19 |
<li><a class="reference internal" href="#repository-maintenance" id="toc-entry-2">Repository maintenance</a></li> |
| 20 |
</ul> |
| 21 |
</li> |
| 22 |
</ul> |
| 23 |
</div> |
| 24 |
<p>command to display statistics about repository history</p> |
| 25 |
<div class="section" id="commands"> |
| 26 |
<h1><a class="toc-backref" href="#contents">Commands</a></h1> |
| 27 |
<div class="section" id="repository-maintenance"> |
| 28 |
<h2><a class="toc-backref" href="#contents">Repository maintenance</a></h2> |
| 29 |
<div class="section" id="churn-1"> |
| 30 |
<h3>churn</h3> |
| 31 |
<p>histogram of changes to the repository:</p> |
| 32 |
<pre class="literal-block"> |
| 33 |
hg churn [-d DATE] [-r REV] [--aliases FILE] [FILE] |
| 34 |
</pre> |
| 35 |
<p>This command will display a histogram representing the number |
| 36 |
of changed lines or revisions, grouped according to the given |
| 37 |
template. The default template will group changes by author. |
| 38 |
The --dateformat option may be used to group the results by |
| 39 |
date instead.</p> |
| 40 |
<p>Statistics are based on the number of changed lines, or |
| 41 |
alternatively the number of matching revisions if the |
| 42 |
--changesets option is specified.</p> |
| 43 |
<p>Examples:</p> |
| 44 |
<pre class="literal-block"> |
| 45 |
# display count of changed lines for every committer |
| 46 |
hg churn -T "{author|email}" |
| 47 |
|
| 48 |
# display daily activity graph |
| 49 |
hg churn -f "%H" -s -c |
| 50 |
|
| 51 |
# display activity of developers by month |
| 52 |
hg churn -f "%Y-%m" -s -c |
| 53 |
|
| 54 |
# display count of lines changed in every year |
| 55 |
hg churn -f "%Y" -s |
| 56 |
|
| 57 |
# display count of lines changed in a time range |
| 58 |
hg churn -d "2020-04 to 2020-09" |
| 59 |
</pre> |
| 60 |
<p>It is possible to map alternate email addresses to a main address |
| 61 |
by providing a file using the following format:</p> |
| 62 |
<pre class="literal-block"> |
| 63 |
<alias email> = <actual email> |
| 64 |
</pre> |
| 65 |
<p>Such a file may be specified with the --aliases option, otherwise |
| 66 |
a .hgchurn file will be looked for in the working directory root. |
| 67 |
Aliases will be split from the rightmost "=".</p> |
| 68 |
<p>Options:</p> |
| 69 |
<table class="docutils option-list" frame="void" rules="none"> |
| 70 |
<col class="option" /> |
| 71 |
<col class="description" /> |
| 72 |
<tbody valign="top"> |
| 73 |
<tr><td class="option-group" colspan="2"> |
| 74 |
<kbd><span class="option">-r</span>, <span class="option">--rev <var><REV[+]></var></span></kbd></td> |
| 75 |
</tr> |
| 76 |
<tr><td> </td><td>count rate for the specified revision or revset</td></tr> |
| 77 |
<tr><td class="option-group" colspan="2"> |
| 78 |
<kbd><span class="option">-d</span>, <span class="option">--date <var><DATE></var></span></kbd></td> |
| 79 |
</tr> |
| 80 |
<tr><td> </td><td>count rate for revisions matching date spec</td></tr> |
| 81 |
<tr><td class="option-group" colspan="2"> |
| 82 |
<kbd><span class="option">-t</span>, <span class="option">--oldtemplate <var><TEMPLATE></var></span></kbd></td> |
| 83 |
</tr> |
| 84 |
<tr><td> </td><td>template to group changesets (DEPRECATED)</td></tr> |
| 85 |
<tr><td class="option-group" colspan="2"> |
| 86 |
<kbd><span class="option">-T</span>, <span class="option">--template <var><TEMPLATE></var></span></kbd></td> |
| 87 |
</tr> |
| 88 |
<tr><td> </td><td>template to group changesets (default: {author|email})</td></tr> |
| 89 |
<tr><td class="option-group" colspan="2"> |
| 90 |
<kbd><span class="option">-f</span>, <span class="option">--dateformat <var><FORMAT></var></span></kbd></td> |
| 91 |
</tr> |
| 92 |
<tr><td> </td><td>strftime-compatible format for grouping by date</td></tr> |
| 93 |
<tr><td class="option-group" colspan="2"> |
| 94 |
<kbd><span class="option">-c</span>, <span class="option">--changesets</span></kbd></td> |
| 95 |
</tr> |
| 96 |
<tr><td> </td><td>count rate by number of changesets</td></tr> |
| 97 |
<tr><td class="option-group"> |
| 98 |
<kbd><span class="option">-s</span>, <span class="option">--sort</span></kbd></td> |
| 99 |
<td>sort by key (default: sort by count)</td></tr> |
| 100 |
<tr><td class="option-group"> |
| 101 |
<kbd><span class="option">--diffstat</span></kbd></td> |
| 102 |
<td>display added/removed lines separately</td></tr> |
| 103 |
<tr><td class="option-group" colspan="2"> |
| 104 |
<kbd><span class="option">--aliases <var><FILE></var></span></kbd></td> |
| 105 |
</tr> |
| 106 |
<tr><td> </td><td>file with email aliases</td></tr> |
| 107 |
<tr><td class="option-group" colspan="2"> |
| 108 |
<kbd><span class="option">-I</span>, <span class="option">--include <var><PATTERN[+]></var></span></kbd></td> |
| 109 |
</tr> |
| 110 |
<tr><td> </td><td>include names matching the given patterns</td></tr> |
| 111 |
<tr><td class="option-group" colspan="2"> |
| 112 |
<kbd><span class="option">-X</span>, <span class="option">--exclude <var><PATTERN[+]></var></span></kbd></td> |
| 113 |
</tr> |
| 114 |
<tr><td> </td><td>exclude names matching the given patterns</td></tr> |
| 115 |
</tbody> |
| 116 |
</table> |
| 117 |
<p>[+] marked option can be specified multiple times</p> |
| 118 |
</div> |
| 119 |
</div> |
| 120 |
</div> |
| 121 |
</div> |
| 122 |
</body> |
| 123 |
</html> |