Debian Codegraph @

doc/html/hg-resolve.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 resolve</title>
8 <link rel="stylesheet" href="../style.css" type="text/css" />
9 </head>
10 <body>
11 <div class="document" id="hg-resolve">
12 <span id="hg-resolve-1"></span>
13 <h1 class="title">hg resolve</h1>
14 <h2 class="subtitle" id="redo-merges-or-set-view-the-merge-status-of-files">redo merges or set/view the merge status of 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 resolve [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>Merges with unresolved conflicts are often the result of
33 non-interactive merging using the <tt class="docutils literal">internal:merge</tt> configuration
34 setting, or a command-line merge tool like <tt class="docutils literal">diff3</tt>. The resolve
35 command is used to manage the files involved in a merge, after
36 <a class="reference external" href="hg-merge.html"><tt class="docutils literal">hg merge</tt></a> has been run, and before <a class="reference external" href="hg-commit.html"><tt class="docutils literal">hg commit</tt></a> is run (i.e. the
37 working directory must have two parents). See <a class="reference external" href="topic-merge-tools.html"><tt class="docutils literal">hg help
38 <span class="pre">merge-tools</span></tt></a> for information on configuring merge tools.</p>
39 <p>The resolve command can be used in the following ways:</p>
40 <ul class="simple">
41 <li><a class="reference external" href="hg-resolve.html"><tt class="docutils literal">hg resolve <span class="pre">[--re-merge]</span> <span class="pre">[--tool</span> TOOL] <span class="pre">FILE...</span></tt></a>: attempt to re-merge
42 the specified files, discarding any previous merge attempts. Re-merging
43 is not performed for files already marked as resolved. Use <tt class="docutils literal"><span class="pre">--all/-a</span></tt>
44 to select all unresolved files. <tt class="docutils literal"><span class="pre">--tool</span></tt> can be used to specify
45 the merge tool used for the given files. It overrides the HGMERGE
46 environment variable and your configuration files. Previous file
47 contents are saved with a <tt class="docutils literal">.orig</tt> suffix.</li>
48 <li><a class="reference external" href="hg-resolve.html"><tt class="docutils literal">hg resolve <span class="pre">-m</span> [FILE]</tt></a>: mark a file as having been resolved
49 (e.g. after having manually fixed-up the files). The default is
50 to mark all unresolved files.</li>
51 <li><a class="reference external" href="hg-resolve.html"><tt class="docutils literal">hg resolve <span class="pre">-u</span> <span class="pre">[FILE]...</span></tt></a>: mark a file as unresolved. The
52 default is to mark all resolved files.</li>
53 <li><a class="reference external" href="hg-resolve.html"><tt class="docutils literal">hg resolve <span class="pre">-l</span></tt></a>: list files which had or still have conflicts.
54 In the printed list, <tt class="docutils literal">U</tt> = unresolved and <tt class="docutils literal">R</tt> = resolved.
55 You can use <tt class="docutils literal">set:unresolved()</tt> or <tt class="docutils literal">set:resolved()</tt> to filter
56 the list. See <a class="reference external" href="topic-filesets.html"><tt class="docutils literal">hg help filesets</tt></a> for details.</li>
57 </ul>
58 <div class="admonition note">
59 <p class="first admonition-title">Note</p>
60 <p class="last">Mercurial will not let you commit files with unresolved merge
61 conflicts. You must use <a class="reference external" href="hg-resolve.html"><tt class="docutils literal">hg resolve <span class="pre">-m</span> ...</tt></a> before you can
62 commit after a conflicting merge.</p>
63 </div>
64 <div class="verbose docutils container">
65 <p>Template:</p>
66 <p>The following keywords are supported in addition to the common template
67 keywords and functions. See also <a class="reference external" href="hg.1.html#templates"><tt class="docutils literal">hg help templates</tt></a>.</p>
68 <table class="docutils field-list" frame="void" rules="none">
69 <col class="field-name" />
70 <col class="field-body" />
71 <tbody valign="top">
72 <tr class="field"><th class="field-name">mergestatus:</th><td class="field-body">String. Character denoting merge conflicts, <tt class="docutils literal">U</tt> or <tt class="docutils literal">R</tt>.</td>
73 </tr>
74 <tr class="field"><th class="field-name">path:</th><td class="field-body">String. Repository-absolute path of the file.</td>
75 </tr>
76 </tbody>
77 </table>
78 </div>
79 <p>Returns 0 on success, 1 if any files fail a resolve attempt.</p>
80 </div>
81 <div class="section" id="options">
82 <h1><a class="toc-backref" href="#contents">Options</a></h1>
83 <table class="docutils option-list" frame="void" rules="none">
84 <col class="option" />
85 <col class="description" />
86 <tbody valign="top">
87 <tr><td class="option-group">
88 <kbd><span class="option">-a</span>, <span class="option">--all</span></kbd></td>
89 <td>select all unresolved files</td></tr>
90 <tr><td class="option-group">
91 <kbd><span class="option">-l</span>, <span class="option">--list</span></kbd></td>
92 <td>list state of files needing merge</td></tr>
93 <tr><td class="option-group">
94 <kbd><span class="option">-m</span>, <span class="option">--mark</span></kbd></td>
95 <td>mark files as resolved</td></tr>
96 <tr><td class="option-group">
97 <kbd><span class="option">-u</span>, <span class="option">--unmark</span></kbd></td>
98 <td>mark files as unresolved</td></tr>
99 <tr><td class="option-group" colspan="2">
100 <kbd><span class="option">-n</span>, <span class="option">--no-status</span></kbd></td>
101 </tr>
102 <tr><td>&nbsp;</td><td>hide status prefix</td></tr>
103 <tr><td class="option-group">
104 <kbd><span class="option">--re-merge</span></kbd></td>
105 <td>re-merge files</td></tr>
106 <tr><td class="option-group" colspan="2">
107 <kbd><span class="option">-t</span>, <span class="option">--tool <var>&lt;TOOL&gt;</var></span></kbd></td>
108 </tr>
109 <tr><td>&nbsp;</td><td>specify merge tool</td></tr>
110 <tr><td class="option-group" colspan="2">
111 <kbd><span class="option">-I</span>, <span class="option">--include <var>&lt;PATTERN[+]&gt;</var></span></kbd></td>
112 </tr>
113 <tr><td>&nbsp;</td><td>include names matching the given patterns</td></tr>
114 <tr><td class="option-group" colspan="2">
115 <kbd><span class="option">-X</span>, <span class="option">--exclude <var>&lt;PATTERN[+]&gt;</var></span></kbd></td>
116 </tr>
117 <tr><td>&nbsp;</td><td>exclude names matching the given patterns</td></tr>
118 <tr><td class="option-group" colspan="2">
119 <kbd><span class="option">-T</span>, <span class="option">--template <var>&lt;TEMPLATE&gt;</var></span></kbd></td>
120 </tr>
121 <tr><td>&nbsp;</td><td>display with template</td></tr>
122 </tbody>
123 </table>
124 <p>[+] marked option can be specified multiple times</p>
125 </div>
126 </div>
127 </body>
128 </html>