Debian Codegraph @

doc/html/hg-addremove.html

raw
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 addremove</title>
8 <link rel="stylesheet" href="../style.css" type="text/css" />
9 </head>
10 <body>
11 <div class="document" id="hg-addremove">
12 <span id="hg-addremove-1"></span>
13 <h1 class="title">hg addremove</h1>
14 <h2 class="subtitle" id="add-all-new-files-delete-all-missing-files">add all new files, delete all missing files</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 addremove [OPTION]... [FILE]...
28 </pre>
29 </div>
30 <div class="section" id="description">
31 <h1><a class="toc-backref" href="#contents">Description</a></h1>
32 <p>Add all new files and remove all missing files from the
33 repository.</p>
34 <p>Unless names are given, new files are ignored if they match any of
35 the patterns in <tt class="docutils literal">.hgignore</tt>. As with add, these changes take
36 effect at the next commit.</p>
37 <p>Use the -s/--similarity option to detect renamed files. This
38 option takes a percentage between 0 (disabled) and 100 (files must
39 be identical) as its parameter. With a parameter greater than 0,
40 this compares every removed file with every added file and records
41 those similar enough as renames. Detecting renamed files this way
42 can be expensive. After using this option, <a class="reference external" href="hg-status.html"><tt class="docutils literal">hg status <span class="pre">-C</span></tt></a> can be
43 used to check which files were identified as moved or renamed. If
44 not specified, -s/--similarity defaults to 100 and only renames of
45 identical files are detected.</p>
46 <div class="verbose docutils container">
47 <p>Examples:</p>
48 <blockquote>
49 <ul>
50 <li><p class="first">A number of files (bar.c and foo.c) are new,
51 while foobar.c has been removed (without using <a class="reference external" href="hg-remove.html"><tt class="docutils literal">hg remove</tt></a>)
52 from the repository:</p>
53 <pre class="literal-block">
54 $ ls
55 bar.c foo.c
56 $ hg status
57 ! foobar.c
58 ? bar.c
59 ? foo.c
60 $ hg addremove
61 adding bar.c
62 adding foo.c
63 removing foobar.c
64 $ hg status
65 A bar.c
66 A foo.c
67 R foobar.c
68 </pre>
69 </li>
70 <li><p class="first">A file foobar.c was moved to foo.c without using <a class="reference external" href="hg-rename.html"><tt class="docutils literal">hg rename</tt></a>.
71 Afterwards, it was edited slightly:</p>
72 <pre class="literal-block">
73 $ ls
74 foo.c
75 $ hg status
76 ! foobar.c
77 ? foo.c
78 $ hg addremove --similarity 90
79 removing foobar.c
80 adding foo.c
81 recording removal of foobar.c as rename to foo.c (94% similar)
82 $ hg status -C
83 A foo.c
84 foobar.c
85 R foobar.c
86 </pre>
87 </li>
88 </ul>
89 </blockquote>
90 </div>
91 <p>Returns 0 if all files are successfully added.</p>
92 </div>
93 <div class="section" id="options">
94 <h1><a class="toc-backref" href="#contents">Options</a></h1>
95 <table class="docutils option-list" frame="void" rules="none">
96 <col class="option" />
97 <col class="description" />
98 <tbody valign="top">
99 <tr><td class="option-group" colspan="2">
100 <kbd><span class="option">-s</span>, <span class="option">--similarity <var>&lt;SIMILARITY&gt;</var></span></kbd></td>
101 </tr>
102 <tr><td>&nbsp;</td><td>guess renamed files by similarity (0&lt;=s&lt;=100)</td></tr>
103 <tr><td class="option-group">
104 <kbd><span class="option">-S</span>, <span class="option">--subrepos</span></kbd></td>
105 <td>recurse into subrepositories</td></tr>
106 <tr><td class="option-group" colspan="2">
107 <kbd><span class="option">-I</span>, <span class="option">--include <var>&lt;PATTERN[+]&gt;</var></span></kbd></td>
108 </tr>
109 <tr><td>&nbsp;</td><td>include names matching the given patterns</td></tr>
110 <tr><td class="option-group" colspan="2">
111 <kbd><span class="option">-X</span>, <span class="option">--exclude <var>&lt;PATTERN[+]&gt;</var></span></kbd></td>
112 </tr>
113 <tr><td>&nbsp;</td><td>exclude names matching the given patterns</td></tr>
114 <tr><td class="option-group">
115 <kbd><span class="option">-n</span>, <span class="option">--dry-run</span></kbd></td>
116 <td>do not perform actions, just print output</td></tr>
117 </tbody>
118 </table>
119 <p>[+] marked option can be specified multiple times</p>
120 </div>
121 </div>
122 </body>
123 </html>