##// END OF EJS Templates
hgweb: make anchor name actually match its href on help index page
av6 -
r30019:6ca3c54f default
parent child Browse files
Show More
@@ -1,48 +1,48 b''
1 {header}
1 {header}
2 <title>Help: {title}</title>
2 <title>Help: {title}</title>
3 <link rel="alternate" type="application/atom+xml"
3 <link rel="alternate" type="application/atom+xml"
4 href="{url|urlescape}atom-log" title="Atom feed for {repo|escape}"/>
4 href="{url|urlescape}atom-log" title="Atom feed for {repo|escape}"/>
5 <link rel="alternate" type="application/rss+xml"
5 <link rel="alternate" type="application/rss+xml"
6 href="{url|urlescape}rss-log" title="RSS feed for {repo|escape}"/>
6 href="{url|urlescape}rss-log" title="RSS feed for {repo|escape}"/>
7 </head>
7 </head>
8 <body>
8 <body>
9
9
10 <div class="page_header">
10 <div class="page_header">
11 <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a>
11 <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a>
12 <a href="/">Mercurial</a> {pathdef%breadcrumb} / help
12 <a href="/">Mercurial</a> {pathdef%breadcrumb} / help
13 </div>
13 </div>
14
14
15 <div class="page_nav">
15 <div class="page_nav">
16 <a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a> |
16 <a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a> |
17 <a href="{url|urlescape}shortlog{sessionvars%urlparameter}">shortlog</a> |
17 <a href="{url|urlescape}shortlog{sessionvars%urlparameter}">shortlog</a> |
18 <a href="{url|urlescape}log{sessionvars%urlparameter}">changelog</a> |
18 <a href="{url|urlescape}log{sessionvars%urlparameter}">changelog</a> |
19 <a href="{url|urlescape}graph{sessionvars%urlparameter}">graph</a> |
19 <a href="{url|urlescape}graph{sessionvars%urlparameter}">graph</a> |
20 <a href="{url|urlescape}tags{sessionvars%urlparameter}">tags</a> |
20 <a href="{url|urlescape}tags{sessionvars%urlparameter}">tags</a> |
21 <a href="{url|urlescape}bookmarks{sessionvars%urlparameter}">bookmarks</a> |
21 <a href="{url|urlescape}bookmarks{sessionvars%urlparameter}">bookmarks</a> |
22 <a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a> |
22 <a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a> |
23 <a href="{url|urlescape}file{sessionvars%urlparameter}">files</a> |
23 <a href="{url|urlescape}file{sessionvars%urlparameter}">files</a> |
24 {if(subindex,
24 {if(subindex,
25 '<a href="{url|urlescape}help{sessionvars%urlparameter}">help</a>',
25 '<a href="{url|urlescape}help{sessionvars%urlparameter}">help</a>',
26 'help'
26 'help'
27 )}
27 )}
28 <br/>
28 <br/>
29 </div>
29 </div>
30
30
31 <div class="title">&nbsp;</div>
31 <div class="title">&nbsp;</div>
32 <table cellspacing="0">
32 <table cellspacing="0">
33 <tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr>
33 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
34 {topics % helpentry}
34 {topics % helpentry}
35
35
36 {if(earlycommands, '
36 {if(earlycommands, '
37 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
37 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
38 {earlycommands % helpentry}
38 {earlycommands % helpentry}
39 ')}
39 ')}
40
40
41 {if(othercommands, '
41 {if(othercommands, '
42 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
42 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
43 {othercommands % helpentry}
43 {othercommands % helpentry}
44 ')}
44 ')}
45
45
46 </table>
46 </table>
47
47
48 {footer}
48 {footer}
@@ -1,52 +1,52 b''
1 {header}
1 {header}
2 <title>Help: {title}</title>
2 <title>Help: {title}</title>
3 <link rel="alternate" type="application/atom+xml" href="{url|urlescape}atom-log" title="Atom feed for {repo|escape}"/>
3 <link rel="alternate" type="application/atom+xml" href="{url|urlescape}atom-log" title="Atom feed for {repo|escape}"/>
4 <link rel="alternate" type="application/rss+xml" href="{url|urlescape}rss-log" title="RSS feed for {repo|escape}"/>
4 <link rel="alternate" type="application/rss+xml" href="{url|urlescape}rss-log" title="RSS feed for {repo|escape}"/>
5 </head>
5 </head>
6
6
7 <body>
7 <body>
8 <div id="container">
8 <div id="container">
9 <div class="page-header">
9 <div class="page-header">
10 <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / help</h1>
10 <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / help</h1>
11
11
12 <form action="{url|urlescape}log">
12 <form action="{url|urlescape}log">
13 {sessionvars%hiddenformentry}
13 {sessionvars%hiddenformentry}
14 <dl class="search">
14 <dl class="search">
15 <dt><label>Search: </label></dt>
15 <dt><label>Search: </label></dt>
16 <dd><input type="text" name="rev" /></dd>
16 <dd><input type="text" name="rev" /></dd>
17 </dl>
17 </dl>
18 </form>
18 </form>
19
19
20 <ul class="page-nav">
20 <ul class="page-nav">
21 <li><a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a></li>
21 <li><a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a></li>
22 <li><a href="{url|urlescape}shortlog{sessionvars%urlparameter}">shortlog</a></li>
22 <li><a href="{url|urlescape}shortlog{sessionvars%urlparameter}">shortlog</a></li>
23 <li><a href="{url|urlescape}changelog{sessionvars%urlparameter}">changelog</a></li>
23 <li><a href="{url|urlescape}changelog{sessionvars%urlparameter}">changelog</a></li>
24 <li><a href="{url|urlescape}graph{sessionvars%urlparameter}">graph</a></li>
24 <li><a href="{url|urlescape}graph{sessionvars%urlparameter}">graph</a></li>
25 <li><a href="{url|urlescape}tags{sessionvars%urlparameter}">tags</a></li>
25 <li><a href="{url|urlescape}tags{sessionvars%urlparameter}">tags</a></li>
26 <li><a href="{url|urlescape}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
26 <li><a href="{url|urlescape}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
27 <li><a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a></li>
27 <li><a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a></li>
28 <li><a href="{url|urlescape}file{sessionvars%urlparameter}">files</a></li>
28 <li><a href="{url|urlescape}file{sessionvars%urlparameter}">files</a></li>
29 {if(subindex,
29 {if(subindex,
30 '<li><a href="{url|urlescape}help{sessionvars%urlparameter}">help</a></li>',
30 '<li><a href="{url|urlescape}help{sessionvars%urlparameter}">help</a></li>',
31 '<li class="current">help</li>'
31 '<li class="current">help</li>'
32 )}
32 )}
33 </ul>
33 </ul>
34 </div>
34 </div>
35
35
36 <h2 class="no-link no-border">help</h2>
36 <h2 class="no-link no-border">help</h2>
37 <table cellspacing="0">
37 <table cellspacing="0">
38 <tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr>
38 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
39 {topics % helpentry}
39 {topics % helpentry}
40
40
41 {if(earlycommands, '
41 {if(earlycommands, '
42 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
42 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
43 {earlycommands % helpentry}
43 {earlycommands % helpentry}
44 ')}
44 ')}
45
45
46 {if(othercommands, '
46 {if(othercommands, '
47 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
47 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
48 {othercommands % helpentry}
48 {othercommands % helpentry}
49 ')}
49 ')}
50 </table>
50 </table>
51
51
52 {footer}
52 {footer}
@@ -1,52 +1,52 b''
1 {header}
1 {header}
2 <title>Help: {title}</title>
2 <title>Help: {title}</title>
3 </head>
3 </head>
4 <body>
4 <body>
5
5
6 <div class="container">
6 <div class="container">
7 <div class="menu">
7 <div class="menu">
8 <div class="logo">
8 <div class="logo">
9 <a href="{logourl}">
9 <a href="{logourl}">
10 <img src="{staticurl|urlescape}{logoimg}" alt="mercurial" /></a>
10 <img src="{staticurl|urlescape}{logoimg}" alt="mercurial" /></a>
11 </div>
11 </div>
12 <ul>
12 <ul>
13 <li><a href="{url|urlescape}shortlog{sessionvars%urlparameter}">log</a></li>
13 <li><a href="{url|urlescape}shortlog{sessionvars%urlparameter}">log</a></li>
14 <li><a href="{url|urlescape}graph{sessionvars%urlparameter}">graph</a></li>
14 <li><a href="{url|urlescape}graph{sessionvars%urlparameter}">graph</a></li>
15 <li><a href="{url|urlescape}tags{sessionvars%urlparameter}">tags</a></li>
15 <li><a href="{url|urlescape}tags{sessionvars%urlparameter}">tags</a></li>
16 <li><a href="{url|urlescape}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
16 <li><a href="{url|urlescape}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
17 <li><a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a></li>
17 <li><a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a></li>
18 </ul>
18 </ul>
19 <ul>
19 <ul>
20 {if(subindex,
20 {if(subindex,
21 '<li><a href="{url|urlescape}help{sessionvars%urlparameter}">help</a></li>',
21 '<li><a href="{url|urlescape}help{sessionvars%urlparameter}">help</a></li>',
22 '<li class="active">help</li>'
22 '<li class="active">help</li>'
23 )}
23 )}
24 </ul>
24 </ul>
25 </div>
25 </div>
26
26
27 <div class="main">
27 <div class="main">
28 <h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
28 <h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
29 <form class="search" action="{url|urlescape}log">
29 <form class="search" action="{url|urlescape}log">
30 {sessionvars%hiddenformentry}
30 {sessionvars%hiddenformentry}
31 <p><input name="rev" id="search1" type="text" size="30" /></p>
31 <p><input name="rev" id="search1" type="text" size="30" /></p>
32 <div id="hint">{searchhint}</div>
32 <div id="hint">{searchhint}</div>
33 </form>
33 </form>
34 <table class="bigtable">
34 <table class="bigtable">
35 <tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr>
35 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
36 {topics % helpentry}
36 {topics % helpentry}
37
37
38 {if(earlycommands, '
38 {if(earlycommands, '
39 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
39 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
40 {earlycommands % helpentry}
40 {earlycommands % helpentry}
41 ')}
41 ')}
42
42
43 {if(othercommands, '
43 {if(othercommands, '
44 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
44 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
45 {othercommands % helpentry}
45 {othercommands % helpentry}
46 ')}
46 ')}
47
47
48 </table>
48 </table>
49 </div>
49 </div>
50 </div>
50 </div>
51
51
52 {footer}
52 {footer}
@@ -1,3177 +1,3177 b''
1 Short help:
1 Short help:
2
2
3 $ hg
3 $ hg
4 Mercurial Distributed SCM
4 Mercurial Distributed SCM
5
5
6 basic commands:
6 basic commands:
7
7
8 add add the specified files on the next commit
8 add add the specified files on the next commit
9 annotate show changeset information by line for each file
9 annotate show changeset information by line for each file
10 clone make a copy of an existing repository
10 clone make a copy of an existing repository
11 commit commit the specified files or all outstanding changes
11 commit commit the specified files or all outstanding changes
12 diff diff repository (or selected files)
12 diff diff repository (or selected files)
13 export dump the header and diffs for one or more changesets
13 export dump the header and diffs for one or more changesets
14 forget forget the specified files on the next commit
14 forget forget the specified files on the next commit
15 init create a new repository in the given directory
15 init create a new repository in the given directory
16 log show revision history of entire repository or files
16 log show revision history of entire repository or files
17 merge merge another revision into working directory
17 merge merge another revision into working directory
18 pull pull changes from the specified source
18 pull pull changes from the specified source
19 push push changes to the specified destination
19 push push changes to the specified destination
20 remove remove the specified files on the next commit
20 remove remove the specified files on the next commit
21 serve start stand-alone webserver
21 serve start stand-alone webserver
22 status show changed files in the working directory
22 status show changed files in the working directory
23 summary summarize working directory state
23 summary summarize working directory state
24 update update working directory (or switch revisions)
24 update update working directory (or switch revisions)
25
25
26 (use 'hg help' for the full list of commands or 'hg -v' for details)
26 (use 'hg help' for the full list of commands or 'hg -v' for details)
27
27
28 $ hg -q
28 $ hg -q
29 add add the specified files on the next commit
29 add add the specified files on the next commit
30 annotate show changeset information by line for each file
30 annotate show changeset information by line for each file
31 clone make a copy of an existing repository
31 clone make a copy of an existing repository
32 commit commit the specified files or all outstanding changes
32 commit commit the specified files or all outstanding changes
33 diff diff repository (or selected files)
33 diff diff repository (or selected files)
34 export dump the header and diffs for one or more changesets
34 export dump the header and diffs for one or more changesets
35 forget forget the specified files on the next commit
35 forget forget the specified files on the next commit
36 init create a new repository in the given directory
36 init create a new repository in the given directory
37 log show revision history of entire repository or files
37 log show revision history of entire repository or files
38 merge merge another revision into working directory
38 merge merge another revision into working directory
39 pull pull changes from the specified source
39 pull pull changes from the specified source
40 push push changes to the specified destination
40 push push changes to the specified destination
41 remove remove the specified files on the next commit
41 remove remove the specified files on the next commit
42 serve start stand-alone webserver
42 serve start stand-alone webserver
43 status show changed files in the working directory
43 status show changed files in the working directory
44 summary summarize working directory state
44 summary summarize working directory state
45 update update working directory (or switch revisions)
45 update update working directory (or switch revisions)
46
46
47 $ hg help
47 $ hg help
48 Mercurial Distributed SCM
48 Mercurial Distributed SCM
49
49
50 list of commands:
50 list of commands:
51
51
52 add add the specified files on the next commit
52 add add the specified files on the next commit
53 addremove add all new files, delete all missing files
53 addremove add all new files, delete all missing files
54 annotate show changeset information by line for each file
54 annotate show changeset information by line for each file
55 archive create an unversioned archive of a repository revision
55 archive create an unversioned archive of a repository revision
56 backout reverse effect of earlier changeset
56 backout reverse effect of earlier changeset
57 bisect subdivision search of changesets
57 bisect subdivision search of changesets
58 bookmarks create a new bookmark or list existing bookmarks
58 bookmarks create a new bookmark or list existing bookmarks
59 branch set or show the current branch name
59 branch set or show the current branch name
60 branches list repository named branches
60 branches list repository named branches
61 bundle create a changegroup file
61 bundle create a changegroup file
62 cat output the current or given revision of files
62 cat output the current or given revision of files
63 clone make a copy of an existing repository
63 clone make a copy of an existing repository
64 commit commit the specified files or all outstanding changes
64 commit commit the specified files or all outstanding changes
65 config show combined config settings from all hgrc files
65 config show combined config settings from all hgrc files
66 copy mark files as copied for the next commit
66 copy mark files as copied for the next commit
67 diff diff repository (or selected files)
67 diff diff repository (or selected files)
68 export dump the header and diffs for one or more changesets
68 export dump the header and diffs for one or more changesets
69 files list tracked files
69 files list tracked files
70 forget forget the specified files on the next commit
70 forget forget the specified files on the next commit
71 graft copy changes from other branches onto the current branch
71 graft copy changes from other branches onto the current branch
72 grep search for a pattern in specified files and revisions
72 grep search for a pattern in specified files and revisions
73 heads show branch heads
73 heads show branch heads
74 help show help for a given topic or a help overview
74 help show help for a given topic or a help overview
75 identify identify the working directory or specified revision
75 identify identify the working directory or specified revision
76 import import an ordered set of patches
76 import import an ordered set of patches
77 incoming show new changesets found in source
77 incoming show new changesets found in source
78 init create a new repository in the given directory
78 init create a new repository in the given directory
79 log show revision history of entire repository or files
79 log show revision history of entire repository or files
80 manifest output the current or given revision of the project manifest
80 manifest output the current or given revision of the project manifest
81 merge merge another revision into working directory
81 merge merge another revision into working directory
82 outgoing show changesets not found in the destination
82 outgoing show changesets not found in the destination
83 paths show aliases for remote repositories
83 paths show aliases for remote repositories
84 phase set or show the current phase name
84 phase set or show the current phase name
85 pull pull changes from the specified source
85 pull pull changes from the specified source
86 push push changes to the specified destination
86 push push changes to the specified destination
87 recover roll back an interrupted transaction
87 recover roll back an interrupted transaction
88 remove remove the specified files on the next commit
88 remove remove the specified files on the next commit
89 rename rename files; equivalent of copy + remove
89 rename rename files; equivalent of copy + remove
90 resolve redo merges or set/view the merge status of files
90 resolve redo merges or set/view the merge status of files
91 revert restore files to their checkout state
91 revert restore files to their checkout state
92 root print the root (top) of the current working directory
92 root print the root (top) of the current working directory
93 serve start stand-alone webserver
93 serve start stand-alone webserver
94 status show changed files in the working directory
94 status show changed files in the working directory
95 summary summarize working directory state
95 summary summarize working directory state
96 tag add one or more tags for the current or given revision
96 tag add one or more tags for the current or given revision
97 tags list repository tags
97 tags list repository tags
98 unbundle apply one or more changegroup files
98 unbundle apply one or more changegroup files
99 update update working directory (or switch revisions)
99 update update working directory (or switch revisions)
100 verify verify the integrity of the repository
100 verify verify the integrity of the repository
101 version output version and copyright information
101 version output version and copyright information
102
102
103 additional help topics:
103 additional help topics:
104
104
105 config Configuration Files
105 config Configuration Files
106 dates Date Formats
106 dates Date Formats
107 diffs Diff Formats
107 diffs Diff Formats
108 environment Environment Variables
108 environment Environment Variables
109 extensions Using Additional Features
109 extensions Using Additional Features
110 filesets Specifying File Sets
110 filesets Specifying File Sets
111 glossary Glossary
111 glossary Glossary
112 hgignore Syntax for Mercurial Ignore Files
112 hgignore Syntax for Mercurial Ignore Files
113 hgweb Configuring hgweb
113 hgweb Configuring hgweb
114 internals Technical implementation topics
114 internals Technical implementation topics
115 merge-tools Merge Tools
115 merge-tools Merge Tools
116 multirevs Specifying Multiple Revisions
116 multirevs Specifying Multiple Revisions
117 patterns File Name Patterns
117 patterns File Name Patterns
118 phases Working with Phases
118 phases Working with Phases
119 revisions Specifying Single Revisions
119 revisions Specifying Single Revisions
120 revsets Specifying Revision Sets
120 revsets Specifying Revision Sets
121 scripting Using Mercurial from scripts and automation
121 scripting Using Mercurial from scripts and automation
122 subrepos Subrepositories
122 subrepos Subrepositories
123 templating Template Usage
123 templating Template Usage
124 urls URL Paths
124 urls URL Paths
125
125
126 (use 'hg help -v' to show built-in aliases and global options)
126 (use 'hg help -v' to show built-in aliases and global options)
127
127
128 $ hg -q help
128 $ hg -q help
129 add add the specified files on the next commit
129 add add the specified files on the next commit
130 addremove add all new files, delete all missing files
130 addremove add all new files, delete all missing files
131 annotate show changeset information by line for each file
131 annotate show changeset information by line for each file
132 archive create an unversioned archive of a repository revision
132 archive create an unversioned archive of a repository revision
133 backout reverse effect of earlier changeset
133 backout reverse effect of earlier changeset
134 bisect subdivision search of changesets
134 bisect subdivision search of changesets
135 bookmarks create a new bookmark or list existing bookmarks
135 bookmarks create a new bookmark or list existing bookmarks
136 branch set or show the current branch name
136 branch set or show the current branch name
137 branches list repository named branches
137 branches list repository named branches
138 bundle create a changegroup file
138 bundle create a changegroup file
139 cat output the current or given revision of files
139 cat output the current or given revision of files
140 clone make a copy of an existing repository
140 clone make a copy of an existing repository
141 commit commit the specified files or all outstanding changes
141 commit commit the specified files or all outstanding changes
142 config show combined config settings from all hgrc files
142 config show combined config settings from all hgrc files
143 copy mark files as copied for the next commit
143 copy mark files as copied for the next commit
144 diff diff repository (or selected files)
144 diff diff repository (or selected files)
145 export dump the header and diffs for one or more changesets
145 export dump the header and diffs for one or more changesets
146 files list tracked files
146 files list tracked files
147 forget forget the specified files on the next commit
147 forget forget the specified files on the next commit
148 graft copy changes from other branches onto the current branch
148 graft copy changes from other branches onto the current branch
149 grep search for a pattern in specified files and revisions
149 grep search for a pattern in specified files and revisions
150 heads show branch heads
150 heads show branch heads
151 help show help for a given topic or a help overview
151 help show help for a given topic or a help overview
152 identify identify the working directory or specified revision
152 identify identify the working directory or specified revision
153 import import an ordered set of patches
153 import import an ordered set of patches
154 incoming show new changesets found in source
154 incoming show new changesets found in source
155 init create a new repository in the given directory
155 init create a new repository in the given directory
156 log show revision history of entire repository or files
156 log show revision history of entire repository or files
157 manifest output the current or given revision of the project manifest
157 manifest output the current or given revision of the project manifest
158 merge merge another revision into working directory
158 merge merge another revision into working directory
159 outgoing show changesets not found in the destination
159 outgoing show changesets not found in the destination
160 paths show aliases for remote repositories
160 paths show aliases for remote repositories
161 phase set or show the current phase name
161 phase set or show the current phase name
162 pull pull changes from the specified source
162 pull pull changes from the specified source
163 push push changes to the specified destination
163 push push changes to the specified destination
164 recover roll back an interrupted transaction
164 recover roll back an interrupted transaction
165 remove remove the specified files on the next commit
165 remove remove the specified files on the next commit
166 rename rename files; equivalent of copy + remove
166 rename rename files; equivalent of copy + remove
167 resolve redo merges or set/view the merge status of files
167 resolve redo merges or set/view the merge status of files
168 revert restore files to their checkout state
168 revert restore files to their checkout state
169 root print the root (top) of the current working directory
169 root print the root (top) of the current working directory
170 serve start stand-alone webserver
170 serve start stand-alone webserver
171 status show changed files in the working directory
171 status show changed files in the working directory
172 summary summarize working directory state
172 summary summarize working directory state
173 tag add one or more tags for the current or given revision
173 tag add one or more tags for the current or given revision
174 tags list repository tags
174 tags list repository tags
175 unbundle apply one or more changegroup files
175 unbundle apply one or more changegroup files
176 update update working directory (or switch revisions)
176 update update working directory (or switch revisions)
177 verify verify the integrity of the repository
177 verify verify the integrity of the repository
178 version output version and copyright information
178 version output version and copyright information
179
179
180 additional help topics:
180 additional help topics:
181
181
182 config Configuration Files
182 config Configuration Files
183 dates Date Formats
183 dates Date Formats
184 diffs Diff Formats
184 diffs Diff Formats
185 environment Environment Variables
185 environment Environment Variables
186 extensions Using Additional Features
186 extensions Using Additional Features
187 filesets Specifying File Sets
187 filesets Specifying File Sets
188 glossary Glossary
188 glossary Glossary
189 hgignore Syntax for Mercurial Ignore Files
189 hgignore Syntax for Mercurial Ignore Files
190 hgweb Configuring hgweb
190 hgweb Configuring hgweb
191 internals Technical implementation topics
191 internals Technical implementation topics
192 merge-tools Merge Tools
192 merge-tools Merge Tools
193 multirevs Specifying Multiple Revisions
193 multirevs Specifying Multiple Revisions
194 patterns File Name Patterns
194 patterns File Name Patterns
195 phases Working with Phases
195 phases Working with Phases
196 revisions Specifying Single Revisions
196 revisions Specifying Single Revisions
197 revsets Specifying Revision Sets
197 revsets Specifying Revision Sets
198 scripting Using Mercurial from scripts and automation
198 scripting Using Mercurial from scripts and automation
199 subrepos Subrepositories
199 subrepos Subrepositories
200 templating Template Usage
200 templating Template Usage
201 urls URL Paths
201 urls URL Paths
202
202
203 Test extension help:
203 Test extension help:
204 $ hg help extensions --config extensions.rebase= --config extensions.children=
204 $ hg help extensions --config extensions.rebase= --config extensions.children=
205 Using Additional Features
205 Using Additional Features
206 """""""""""""""""""""""""
206 """""""""""""""""""""""""
207
207
208 Mercurial has the ability to add new features through the use of
208 Mercurial has the ability to add new features through the use of
209 extensions. Extensions may add new commands, add options to existing
209 extensions. Extensions may add new commands, add options to existing
210 commands, change the default behavior of commands, or implement hooks.
210 commands, change the default behavior of commands, or implement hooks.
211
211
212 To enable the "foo" extension, either shipped with Mercurial or in the
212 To enable the "foo" extension, either shipped with Mercurial or in the
213 Python search path, create an entry for it in your configuration file,
213 Python search path, create an entry for it in your configuration file,
214 like this:
214 like this:
215
215
216 [extensions]
216 [extensions]
217 foo =
217 foo =
218
218
219 You may also specify the full path to an extension:
219 You may also specify the full path to an extension:
220
220
221 [extensions]
221 [extensions]
222 myfeature = ~/.hgext/myfeature.py
222 myfeature = ~/.hgext/myfeature.py
223
223
224 See 'hg help config' for more information on configuration files.
224 See 'hg help config' for more information on configuration files.
225
225
226 Extensions are not loaded by default for a variety of reasons: they can
226 Extensions are not loaded by default for a variety of reasons: they can
227 increase startup overhead; they may be meant for advanced usage only; they
227 increase startup overhead; they may be meant for advanced usage only; they
228 may provide potentially dangerous abilities (such as letting you destroy
228 may provide potentially dangerous abilities (such as letting you destroy
229 or modify history); they might not be ready for prime time; or they may
229 or modify history); they might not be ready for prime time; or they may
230 alter some usual behaviors of stock Mercurial. It is thus up to the user
230 alter some usual behaviors of stock Mercurial. It is thus up to the user
231 to activate extensions as needed.
231 to activate extensions as needed.
232
232
233 To explicitly disable an extension enabled in a configuration file of
233 To explicitly disable an extension enabled in a configuration file of
234 broader scope, prepend its path with !:
234 broader scope, prepend its path with !:
235
235
236 [extensions]
236 [extensions]
237 # disabling extension bar residing in /path/to/extension/bar.py
237 # disabling extension bar residing in /path/to/extension/bar.py
238 bar = !/path/to/extension/bar.py
238 bar = !/path/to/extension/bar.py
239 # ditto, but no path was supplied for extension baz
239 # ditto, but no path was supplied for extension baz
240 baz = !
240 baz = !
241
241
242 enabled extensions:
242 enabled extensions:
243
243
244 chgserver command server extension for cHg (EXPERIMENTAL) (?)
244 chgserver command server extension for cHg (EXPERIMENTAL) (?)
245 children command to display child changesets (DEPRECATED)
245 children command to display child changesets (DEPRECATED)
246 rebase command to move sets of revisions to a different ancestor
246 rebase command to move sets of revisions to a different ancestor
247
247
248 disabled extensions:
248 disabled extensions:
249
249
250 acl hooks for controlling repository access
250 acl hooks for controlling repository access
251 blackbox log repository events to a blackbox for debugging
251 blackbox log repository events to a blackbox for debugging
252 bugzilla hooks for integrating with the Bugzilla bug tracker
252 bugzilla hooks for integrating with the Bugzilla bug tracker
253 censor erase file content at a given revision
253 censor erase file content at a given revision
254 churn command to display statistics about repository history
254 churn command to display statistics about repository history
255 clonebundles advertise pre-generated bundles to seed clones
255 clonebundles advertise pre-generated bundles to seed clones
256 color colorize output from some commands
256 color colorize output from some commands
257 convert import revisions from foreign VCS repositories into
257 convert import revisions from foreign VCS repositories into
258 Mercurial
258 Mercurial
259 eol automatically manage newlines in repository files
259 eol automatically manage newlines in repository files
260 extdiff command to allow external programs to compare revisions
260 extdiff command to allow external programs to compare revisions
261 factotum http authentication with factotum
261 factotum http authentication with factotum
262 gpg commands to sign and verify changesets
262 gpg commands to sign and verify changesets
263 hgk browse the repository in a graphical way
263 hgk browse the repository in a graphical way
264 highlight syntax highlighting for hgweb (requires Pygments)
264 highlight syntax highlighting for hgweb (requires Pygments)
265 histedit interactive history editing
265 histedit interactive history editing
266 keyword expand keywords in tracked files
266 keyword expand keywords in tracked files
267 largefiles track large binary files
267 largefiles track large binary files
268 mq manage a stack of patches
268 mq manage a stack of patches
269 notify hooks for sending email push notifications
269 notify hooks for sending email push notifications
270 pager browse command output with an external pager
270 pager browse command output with an external pager
271 patchbomb command to send changesets as (a series of) patch emails
271 patchbomb command to send changesets as (a series of) patch emails
272 purge command to delete untracked files from the working
272 purge command to delete untracked files from the working
273 directory
273 directory
274 relink recreates hardlinks between repository clones
274 relink recreates hardlinks between repository clones
275 schemes extend schemes with shortcuts to repository swarms
275 schemes extend schemes with shortcuts to repository swarms
276 share share a common history between several working directories
276 share share a common history between several working directories
277 shelve save and restore changes to the working directory
277 shelve save and restore changes to the working directory
278 strip strip changesets and their descendants from history
278 strip strip changesets and their descendants from history
279 transplant command to transplant changesets from another branch
279 transplant command to transplant changesets from another branch
280 win32mbcs allow the use of MBCS paths with problematic encodings
280 win32mbcs allow the use of MBCS paths with problematic encodings
281 zeroconf discover and advertise repositories on the local network
281 zeroconf discover and advertise repositories on the local network
282
282
283 Verify that extension keywords appear in help templates
283 Verify that extension keywords appear in help templates
284
284
285 $ hg help --config extensions.transplant= templating|grep transplant > /dev/null
285 $ hg help --config extensions.transplant= templating|grep transplant > /dev/null
286
286
287 Test short command list with verbose option
287 Test short command list with verbose option
288
288
289 $ hg -v help shortlist
289 $ hg -v help shortlist
290 Mercurial Distributed SCM
290 Mercurial Distributed SCM
291
291
292 basic commands:
292 basic commands:
293
293
294 add add the specified files on the next commit
294 add add the specified files on the next commit
295 annotate, blame
295 annotate, blame
296 show changeset information by line for each file
296 show changeset information by line for each file
297 clone make a copy of an existing repository
297 clone make a copy of an existing repository
298 commit, ci commit the specified files or all outstanding changes
298 commit, ci commit the specified files or all outstanding changes
299 diff diff repository (or selected files)
299 diff diff repository (or selected files)
300 export dump the header and diffs for one or more changesets
300 export dump the header and diffs for one or more changesets
301 forget forget the specified files on the next commit
301 forget forget the specified files on the next commit
302 init create a new repository in the given directory
302 init create a new repository in the given directory
303 log, history show revision history of entire repository or files
303 log, history show revision history of entire repository or files
304 merge merge another revision into working directory
304 merge merge another revision into working directory
305 pull pull changes from the specified source
305 pull pull changes from the specified source
306 push push changes to the specified destination
306 push push changes to the specified destination
307 remove, rm remove the specified files on the next commit
307 remove, rm remove the specified files on the next commit
308 serve start stand-alone webserver
308 serve start stand-alone webserver
309 status, st show changed files in the working directory
309 status, st show changed files in the working directory
310 summary, sum summarize working directory state
310 summary, sum summarize working directory state
311 update, up, checkout, co
311 update, up, checkout, co
312 update working directory (or switch revisions)
312 update working directory (or switch revisions)
313
313
314 global options ([+] can be repeated):
314 global options ([+] can be repeated):
315
315
316 -R --repository REPO repository root directory or name of overlay bundle
316 -R --repository REPO repository root directory or name of overlay bundle
317 file
317 file
318 --cwd DIR change working directory
318 --cwd DIR change working directory
319 -y --noninteractive do not prompt, automatically pick the first choice for
319 -y --noninteractive do not prompt, automatically pick the first choice for
320 all prompts
320 all prompts
321 -q --quiet suppress output
321 -q --quiet suppress output
322 -v --verbose enable additional output
322 -v --verbose enable additional output
323 --config CONFIG [+] set/override config option (use 'section.name=value')
323 --config CONFIG [+] set/override config option (use 'section.name=value')
324 --debug enable debugging output
324 --debug enable debugging output
325 --debugger start debugger
325 --debugger start debugger
326 --encoding ENCODE set the charset encoding (default: ascii)
326 --encoding ENCODE set the charset encoding (default: ascii)
327 --encodingmode MODE set the charset encoding mode (default: strict)
327 --encodingmode MODE set the charset encoding mode (default: strict)
328 --traceback always print a traceback on exception
328 --traceback always print a traceback on exception
329 --time time how long the command takes
329 --time time how long the command takes
330 --profile print command execution profile
330 --profile print command execution profile
331 --version output version information and exit
331 --version output version information and exit
332 -h --help display help and exit
332 -h --help display help and exit
333 --hidden consider hidden changesets
333 --hidden consider hidden changesets
334
334
335 (use 'hg help' for the full list of commands)
335 (use 'hg help' for the full list of commands)
336
336
337 $ hg add -h
337 $ hg add -h
338 hg add [OPTION]... [FILE]...
338 hg add [OPTION]... [FILE]...
339
339
340 add the specified files on the next commit
340 add the specified files on the next commit
341
341
342 Schedule files to be version controlled and added to the repository.
342 Schedule files to be version controlled and added to the repository.
343
343
344 The files will be added to the repository at the next commit. To undo an
344 The files will be added to the repository at the next commit. To undo an
345 add before that, see 'hg forget'.
345 add before that, see 'hg forget'.
346
346
347 If no names are given, add all files to the repository (except files
347 If no names are given, add all files to the repository (except files
348 matching ".hgignore").
348 matching ".hgignore").
349
349
350 Returns 0 if all files are successfully added.
350 Returns 0 if all files are successfully added.
351
351
352 options ([+] can be repeated):
352 options ([+] can be repeated):
353
353
354 -I --include PATTERN [+] include names matching the given patterns
354 -I --include PATTERN [+] include names matching the given patterns
355 -X --exclude PATTERN [+] exclude names matching the given patterns
355 -X --exclude PATTERN [+] exclude names matching the given patterns
356 -S --subrepos recurse into subrepositories
356 -S --subrepos recurse into subrepositories
357 -n --dry-run do not perform actions, just print output
357 -n --dry-run do not perform actions, just print output
358
358
359 (some details hidden, use --verbose to show complete help)
359 (some details hidden, use --verbose to show complete help)
360
360
361 Verbose help for add
361 Verbose help for add
362
362
363 $ hg add -hv
363 $ hg add -hv
364 hg add [OPTION]... [FILE]...
364 hg add [OPTION]... [FILE]...
365
365
366 add the specified files on the next commit
366 add the specified files on the next commit
367
367
368 Schedule files to be version controlled and added to the repository.
368 Schedule files to be version controlled and added to the repository.
369
369
370 The files will be added to the repository at the next commit. To undo an
370 The files will be added to the repository at the next commit. To undo an
371 add before that, see 'hg forget'.
371 add before that, see 'hg forget'.
372
372
373 If no names are given, add all files to the repository (except files
373 If no names are given, add all files to the repository (except files
374 matching ".hgignore").
374 matching ".hgignore").
375
375
376 Examples:
376 Examples:
377
377
378 - New (unknown) files are added automatically by 'hg add':
378 - New (unknown) files are added automatically by 'hg add':
379
379
380 $ ls
380 $ ls
381 foo.c
381 foo.c
382 $ hg status
382 $ hg status
383 ? foo.c
383 ? foo.c
384 $ hg add
384 $ hg add
385 adding foo.c
385 adding foo.c
386 $ hg status
386 $ hg status
387 A foo.c
387 A foo.c
388
388
389 - Specific files to be added can be specified:
389 - Specific files to be added can be specified:
390
390
391 $ ls
391 $ ls
392 bar.c foo.c
392 bar.c foo.c
393 $ hg status
393 $ hg status
394 ? bar.c
394 ? bar.c
395 ? foo.c
395 ? foo.c
396 $ hg add bar.c
396 $ hg add bar.c
397 $ hg status
397 $ hg status
398 A bar.c
398 A bar.c
399 ? foo.c
399 ? foo.c
400
400
401 Returns 0 if all files are successfully added.
401 Returns 0 if all files are successfully added.
402
402
403 options ([+] can be repeated):
403 options ([+] can be repeated):
404
404
405 -I --include PATTERN [+] include names matching the given patterns
405 -I --include PATTERN [+] include names matching the given patterns
406 -X --exclude PATTERN [+] exclude names matching the given patterns
406 -X --exclude PATTERN [+] exclude names matching the given patterns
407 -S --subrepos recurse into subrepositories
407 -S --subrepos recurse into subrepositories
408 -n --dry-run do not perform actions, just print output
408 -n --dry-run do not perform actions, just print output
409
409
410 global options ([+] can be repeated):
410 global options ([+] can be repeated):
411
411
412 -R --repository REPO repository root directory or name of overlay bundle
412 -R --repository REPO repository root directory or name of overlay bundle
413 file
413 file
414 --cwd DIR change working directory
414 --cwd DIR change working directory
415 -y --noninteractive do not prompt, automatically pick the first choice for
415 -y --noninteractive do not prompt, automatically pick the first choice for
416 all prompts
416 all prompts
417 -q --quiet suppress output
417 -q --quiet suppress output
418 -v --verbose enable additional output
418 -v --verbose enable additional output
419 --config CONFIG [+] set/override config option (use 'section.name=value')
419 --config CONFIG [+] set/override config option (use 'section.name=value')
420 --debug enable debugging output
420 --debug enable debugging output
421 --debugger start debugger
421 --debugger start debugger
422 --encoding ENCODE set the charset encoding (default: ascii)
422 --encoding ENCODE set the charset encoding (default: ascii)
423 --encodingmode MODE set the charset encoding mode (default: strict)
423 --encodingmode MODE set the charset encoding mode (default: strict)
424 --traceback always print a traceback on exception
424 --traceback always print a traceback on exception
425 --time time how long the command takes
425 --time time how long the command takes
426 --profile print command execution profile
426 --profile print command execution profile
427 --version output version information and exit
427 --version output version information and exit
428 -h --help display help and exit
428 -h --help display help and exit
429 --hidden consider hidden changesets
429 --hidden consider hidden changesets
430
430
431 Test the textwidth config option
431 Test the textwidth config option
432
432
433 $ hg root -h --config ui.textwidth=50
433 $ hg root -h --config ui.textwidth=50
434 hg root
434 hg root
435
435
436 print the root (top) of the current working
436 print the root (top) of the current working
437 directory
437 directory
438
438
439 Print the root directory of the current
439 Print the root directory of the current
440 repository.
440 repository.
441
441
442 Returns 0 on success.
442 Returns 0 on success.
443
443
444 (some details hidden, use --verbose to show
444 (some details hidden, use --verbose to show
445 complete help)
445 complete help)
446
446
447 Test help option with version option
447 Test help option with version option
448
448
449 $ hg add -h --version
449 $ hg add -h --version
450 Mercurial Distributed SCM (version *) (glob)
450 Mercurial Distributed SCM (version *) (glob)
451 (see https://mercurial-scm.org for more information)
451 (see https://mercurial-scm.org for more information)
452
452
453 Copyright (C) 2005-2016 Matt Mackall and others
453 Copyright (C) 2005-2016 Matt Mackall and others
454 This is free software; see the source for copying conditions. There is NO
454 This is free software; see the source for copying conditions. There is NO
455 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
455 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
456
456
457 $ hg add --skjdfks
457 $ hg add --skjdfks
458 hg add: option --skjdfks not recognized
458 hg add: option --skjdfks not recognized
459 hg add [OPTION]... [FILE]...
459 hg add [OPTION]... [FILE]...
460
460
461 add the specified files on the next commit
461 add the specified files on the next commit
462
462
463 options ([+] can be repeated):
463 options ([+] can be repeated):
464
464
465 -I --include PATTERN [+] include names matching the given patterns
465 -I --include PATTERN [+] include names matching the given patterns
466 -X --exclude PATTERN [+] exclude names matching the given patterns
466 -X --exclude PATTERN [+] exclude names matching the given patterns
467 -S --subrepos recurse into subrepositories
467 -S --subrepos recurse into subrepositories
468 -n --dry-run do not perform actions, just print output
468 -n --dry-run do not perform actions, just print output
469
469
470 (use 'hg add -h' to show more help)
470 (use 'hg add -h' to show more help)
471 [255]
471 [255]
472
472
473 Test ambiguous command help
473 Test ambiguous command help
474
474
475 $ hg help ad
475 $ hg help ad
476 list of commands:
476 list of commands:
477
477
478 add add the specified files on the next commit
478 add add the specified files on the next commit
479 addremove add all new files, delete all missing files
479 addremove add all new files, delete all missing files
480
480
481 (use 'hg help -v ad' to show built-in aliases and global options)
481 (use 'hg help -v ad' to show built-in aliases and global options)
482
482
483 Test command without options
483 Test command without options
484
484
485 $ hg help verify
485 $ hg help verify
486 hg verify
486 hg verify
487
487
488 verify the integrity of the repository
488 verify the integrity of the repository
489
489
490 Verify the integrity of the current repository.
490 Verify the integrity of the current repository.
491
491
492 This will perform an extensive check of the repository's integrity,
492 This will perform an extensive check of the repository's integrity,
493 validating the hashes and checksums of each entry in the changelog,
493 validating the hashes and checksums of each entry in the changelog,
494 manifest, and tracked files, as well as the integrity of their crosslinks
494 manifest, and tracked files, as well as the integrity of their crosslinks
495 and indices.
495 and indices.
496
496
497 Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more
497 Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more
498 information about recovery from corruption of the repository.
498 information about recovery from corruption of the repository.
499
499
500 Returns 0 on success, 1 if errors are encountered.
500 Returns 0 on success, 1 if errors are encountered.
501
501
502 (some details hidden, use --verbose to show complete help)
502 (some details hidden, use --verbose to show complete help)
503
503
504 $ hg help diff
504 $ hg help diff
505 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
505 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
506
506
507 diff repository (or selected files)
507 diff repository (or selected files)
508
508
509 Show differences between revisions for the specified files.
509 Show differences between revisions for the specified files.
510
510
511 Differences between files are shown using the unified diff format.
511 Differences between files are shown using the unified diff format.
512
512
513 Note:
513 Note:
514 'hg diff' may generate unexpected results for merges, as it will
514 'hg diff' may generate unexpected results for merges, as it will
515 default to comparing against the working directory's first parent
515 default to comparing against the working directory's first parent
516 changeset if no revisions are specified.
516 changeset if no revisions are specified.
517
517
518 When two revision arguments are given, then changes are shown between
518 When two revision arguments are given, then changes are shown between
519 those revisions. If only one revision is specified then that revision is
519 those revisions. If only one revision is specified then that revision is
520 compared to the working directory, and, when no revisions are specified,
520 compared to the working directory, and, when no revisions are specified,
521 the working directory files are compared to its first parent.
521 the working directory files are compared to its first parent.
522
522
523 Alternatively you can specify -c/--change with a revision to see the
523 Alternatively you can specify -c/--change with a revision to see the
524 changes in that changeset relative to its first parent.
524 changes in that changeset relative to its first parent.
525
525
526 Without the -a/--text option, diff will avoid generating diffs of files it
526 Without the -a/--text option, diff will avoid generating diffs of files it
527 detects as binary. With -a, diff will generate a diff anyway, probably
527 detects as binary. With -a, diff will generate a diff anyway, probably
528 with undesirable results.
528 with undesirable results.
529
529
530 Use the -g/--git option to generate diffs in the git extended diff format.
530 Use the -g/--git option to generate diffs in the git extended diff format.
531 For more information, read 'hg help diffs'.
531 For more information, read 'hg help diffs'.
532
532
533 Returns 0 on success.
533 Returns 0 on success.
534
534
535 options ([+] can be repeated):
535 options ([+] can be repeated):
536
536
537 -r --rev REV [+] revision
537 -r --rev REV [+] revision
538 -c --change REV change made by revision
538 -c --change REV change made by revision
539 -a --text treat all files as text
539 -a --text treat all files as text
540 -g --git use git extended diff format
540 -g --git use git extended diff format
541 --nodates omit dates from diff headers
541 --nodates omit dates from diff headers
542 --noprefix omit a/ and b/ prefixes from filenames
542 --noprefix omit a/ and b/ prefixes from filenames
543 -p --show-function show which function each change is in
543 -p --show-function show which function each change is in
544 --reverse produce a diff that undoes the changes
544 --reverse produce a diff that undoes the changes
545 -w --ignore-all-space ignore white space when comparing lines
545 -w --ignore-all-space ignore white space when comparing lines
546 -b --ignore-space-change ignore changes in the amount of white space
546 -b --ignore-space-change ignore changes in the amount of white space
547 -B --ignore-blank-lines ignore changes whose lines are all blank
547 -B --ignore-blank-lines ignore changes whose lines are all blank
548 -U --unified NUM number of lines of context to show
548 -U --unified NUM number of lines of context to show
549 --stat output diffstat-style summary of changes
549 --stat output diffstat-style summary of changes
550 --root DIR produce diffs relative to subdirectory
550 --root DIR produce diffs relative to subdirectory
551 -I --include PATTERN [+] include names matching the given patterns
551 -I --include PATTERN [+] include names matching the given patterns
552 -X --exclude PATTERN [+] exclude names matching the given patterns
552 -X --exclude PATTERN [+] exclude names matching the given patterns
553 -S --subrepos recurse into subrepositories
553 -S --subrepos recurse into subrepositories
554
554
555 (some details hidden, use --verbose to show complete help)
555 (some details hidden, use --verbose to show complete help)
556
556
557 $ hg help status
557 $ hg help status
558 hg status [OPTION]... [FILE]...
558 hg status [OPTION]... [FILE]...
559
559
560 aliases: st
560 aliases: st
561
561
562 show changed files in the working directory
562 show changed files in the working directory
563
563
564 Show status of files in the repository. If names are given, only files
564 Show status of files in the repository. If names are given, only files
565 that match are shown. Files that are clean or ignored or the source of a
565 that match are shown. Files that are clean or ignored or the source of a
566 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
566 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
567 -C/--copies or -A/--all are given. Unless options described with "show
567 -C/--copies or -A/--all are given. Unless options described with "show
568 only ..." are given, the options -mardu are used.
568 only ..." are given, the options -mardu are used.
569
569
570 Option -q/--quiet hides untracked (unknown and ignored) files unless
570 Option -q/--quiet hides untracked (unknown and ignored) files unless
571 explicitly requested with -u/--unknown or -i/--ignored.
571 explicitly requested with -u/--unknown or -i/--ignored.
572
572
573 Note:
573 Note:
574 'hg status' may appear to disagree with diff if permissions have
574 'hg status' may appear to disagree with diff if permissions have
575 changed or a merge has occurred. The standard diff format does not
575 changed or a merge has occurred. The standard diff format does not
576 report permission changes and diff only reports changes relative to one
576 report permission changes and diff only reports changes relative to one
577 merge parent.
577 merge parent.
578
578
579 If one revision is given, it is used as the base revision. If two
579 If one revision is given, it is used as the base revision. If two
580 revisions are given, the differences between them are shown. The --change
580 revisions are given, the differences between them are shown. The --change
581 option can also be used as a shortcut to list the changed files of a
581 option can also be used as a shortcut to list the changed files of a
582 revision from its first parent.
582 revision from its first parent.
583
583
584 The codes used to show the status of files are:
584 The codes used to show the status of files are:
585
585
586 M = modified
586 M = modified
587 A = added
587 A = added
588 R = removed
588 R = removed
589 C = clean
589 C = clean
590 ! = missing (deleted by non-hg command, but still tracked)
590 ! = missing (deleted by non-hg command, but still tracked)
591 ? = not tracked
591 ? = not tracked
592 I = ignored
592 I = ignored
593 = origin of the previous file (with --copies)
593 = origin of the previous file (with --copies)
594
594
595 Returns 0 on success.
595 Returns 0 on success.
596
596
597 options ([+] can be repeated):
597 options ([+] can be repeated):
598
598
599 -A --all show status of all files
599 -A --all show status of all files
600 -m --modified show only modified files
600 -m --modified show only modified files
601 -a --added show only added files
601 -a --added show only added files
602 -r --removed show only removed files
602 -r --removed show only removed files
603 -d --deleted show only deleted (but tracked) files
603 -d --deleted show only deleted (but tracked) files
604 -c --clean show only files without changes
604 -c --clean show only files without changes
605 -u --unknown show only unknown (not tracked) files
605 -u --unknown show only unknown (not tracked) files
606 -i --ignored show only ignored files
606 -i --ignored show only ignored files
607 -n --no-status hide status prefix
607 -n --no-status hide status prefix
608 -C --copies show source of copied files
608 -C --copies show source of copied files
609 -0 --print0 end filenames with NUL, for use with xargs
609 -0 --print0 end filenames with NUL, for use with xargs
610 --rev REV [+] show difference from revision
610 --rev REV [+] show difference from revision
611 --change REV list the changed files of a revision
611 --change REV list the changed files of a revision
612 -I --include PATTERN [+] include names matching the given patterns
612 -I --include PATTERN [+] include names matching the given patterns
613 -X --exclude PATTERN [+] exclude names matching the given patterns
613 -X --exclude PATTERN [+] exclude names matching the given patterns
614 -S --subrepos recurse into subrepositories
614 -S --subrepos recurse into subrepositories
615
615
616 (some details hidden, use --verbose to show complete help)
616 (some details hidden, use --verbose to show complete help)
617
617
618 $ hg -q help status
618 $ hg -q help status
619 hg status [OPTION]... [FILE]...
619 hg status [OPTION]... [FILE]...
620
620
621 show changed files in the working directory
621 show changed files in the working directory
622
622
623 $ hg help foo
623 $ hg help foo
624 abort: no such help topic: foo
624 abort: no such help topic: foo
625 (try 'hg help --keyword foo')
625 (try 'hg help --keyword foo')
626 [255]
626 [255]
627
627
628 $ hg skjdfks
628 $ hg skjdfks
629 hg: unknown command 'skjdfks'
629 hg: unknown command 'skjdfks'
630 Mercurial Distributed SCM
630 Mercurial Distributed SCM
631
631
632 basic commands:
632 basic commands:
633
633
634 add add the specified files on the next commit
634 add add the specified files on the next commit
635 annotate show changeset information by line for each file
635 annotate show changeset information by line for each file
636 clone make a copy of an existing repository
636 clone make a copy of an existing repository
637 commit commit the specified files or all outstanding changes
637 commit commit the specified files or all outstanding changes
638 diff diff repository (or selected files)
638 diff diff repository (or selected files)
639 export dump the header and diffs for one or more changesets
639 export dump the header and diffs for one or more changesets
640 forget forget the specified files on the next commit
640 forget forget the specified files on the next commit
641 init create a new repository in the given directory
641 init create a new repository in the given directory
642 log show revision history of entire repository or files
642 log show revision history of entire repository or files
643 merge merge another revision into working directory
643 merge merge another revision into working directory
644 pull pull changes from the specified source
644 pull pull changes from the specified source
645 push push changes to the specified destination
645 push push changes to the specified destination
646 remove remove the specified files on the next commit
646 remove remove the specified files on the next commit
647 serve start stand-alone webserver
647 serve start stand-alone webserver
648 status show changed files in the working directory
648 status show changed files in the working directory
649 summary summarize working directory state
649 summary summarize working directory state
650 update update working directory (or switch revisions)
650 update update working directory (or switch revisions)
651
651
652 (use 'hg help' for the full list of commands or 'hg -v' for details)
652 (use 'hg help' for the full list of commands or 'hg -v' for details)
653 [255]
653 [255]
654
654
655
655
656 Make sure that we don't run afoul of the help system thinking that
656 Make sure that we don't run afoul of the help system thinking that
657 this is a section and erroring out weirdly.
657 this is a section and erroring out weirdly.
658
658
659 $ hg .log
659 $ hg .log
660 hg: unknown command '.log'
660 hg: unknown command '.log'
661 (did you mean log?)
661 (did you mean log?)
662 [255]
662 [255]
663
663
664 $ hg log.
664 $ hg log.
665 hg: unknown command 'log.'
665 hg: unknown command 'log.'
666 (did you mean log?)
666 (did you mean log?)
667 [255]
667 [255]
668 $ hg pu.lh
668 $ hg pu.lh
669 hg: unknown command 'pu.lh'
669 hg: unknown command 'pu.lh'
670 (did you mean one of pull, push?)
670 (did you mean one of pull, push?)
671 [255]
671 [255]
672
672
673 $ cat > helpext.py <<EOF
673 $ cat > helpext.py <<EOF
674 > import os
674 > import os
675 > from mercurial import cmdutil, commands
675 > from mercurial import cmdutil, commands
676 >
676 >
677 > cmdtable = {}
677 > cmdtable = {}
678 > command = cmdutil.command(cmdtable)
678 > command = cmdutil.command(cmdtable)
679 >
679 >
680 > @command('nohelp',
680 > @command('nohelp',
681 > [('', 'longdesc', 3, 'x'*90),
681 > [('', 'longdesc', 3, 'x'*90),
682 > ('n', '', None, 'normal desc'),
682 > ('n', '', None, 'normal desc'),
683 > ('', 'newline', '', 'line1\nline2')],
683 > ('', 'newline', '', 'line1\nline2')],
684 > 'hg nohelp',
684 > 'hg nohelp',
685 > norepo=True)
685 > norepo=True)
686 > @command('debugoptDEP', [('', 'dopt', None, 'option is (DEPRECATED)')])
686 > @command('debugoptDEP', [('', 'dopt', None, 'option is (DEPRECATED)')])
687 > @command('debugoptEXP', [('', 'eopt', None, 'option is (EXPERIMENTAL)')])
687 > @command('debugoptEXP', [('', 'eopt', None, 'option is (EXPERIMENTAL)')])
688 > def nohelp(ui, *args, **kwargs):
688 > def nohelp(ui, *args, **kwargs):
689 > pass
689 > pass
690 >
690 >
691 > def uisetup(ui):
691 > def uisetup(ui):
692 > ui.setconfig('alias', 'shellalias', '!echo hi', 'helpext')
692 > ui.setconfig('alias', 'shellalias', '!echo hi', 'helpext')
693 > ui.setconfig('alias', 'hgalias', 'summary', 'helpext')
693 > ui.setconfig('alias', 'hgalias', 'summary', 'helpext')
694 >
694 >
695 > EOF
695 > EOF
696 $ echo '[extensions]' >> $HGRCPATH
696 $ echo '[extensions]' >> $HGRCPATH
697 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
697 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
698
698
699 Test for aliases
699 Test for aliases
700
700
701 $ hg help hgalias
701 $ hg help hgalias
702 hg hgalias [--remote]
702 hg hgalias [--remote]
703
703
704 alias for: hg summary
704 alias for: hg summary
705
705
706 summarize working directory state
706 summarize working directory state
707
707
708 This generates a brief summary of the working directory state, including
708 This generates a brief summary of the working directory state, including
709 parents, branch, commit status, phase and available updates.
709 parents, branch, commit status, phase and available updates.
710
710
711 With the --remote option, this will check the default paths for incoming
711 With the --remote option, this will check the default paths for incoming
712 and outgoing changes. This can be time-consuming.
712 and outgoing changes. This can be time-consuming.
713
713
714 Returns 0 on success.
714 Returns 0 on success.
715
715
716 defined by: helpext
716 defined by: helpext
717
717
718 options:
718 options:
719
719
720 --remote check for push and pull
720 --remote check for push and pull
721
721
722 (some details hidden, use --verbose to show complete help)
722 (some details hidden, use --verbose to show complete help)
723
723
724 $ hg help shellalias
724 $ hg help shellalias
725 hg shellalias
725 hg shellalias
726
726
727 shell alias for:
727 shell alias for:
728
728
729 echo hi
729 echo hi
730
730
731 defined by: helpext
731 defined by: helpext
732
732
733 (some details hidden, use --verbose to show complete help)
733 (some details hidden, use --verbose to show complete help)
734
734
735 Test command with no help text
735 Test command with no help text
736
736
737 $ hg help nohelp
737 $ hg help nohelp
738 hg nohelp
738 hg nohelp
739
739
740 (no help text available)
740 (no help text available)
741
741
742 options:
742 options:
743
743
744 --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
744 --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
745 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3)
745 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3)
746 -n -- normal desc
746 -n -- normal desc
747 --newline VALUE line1 line2
747 --newline VALUE line1 line2
748
748
749 (some details hidden, use --verbose to show complete help)
749 (some details hidden, use --verbose to show complete help)
750
750
751 $ hg help -k nohelp
751 $ hg help -k nohelp
752 Commands:
752 Commands:
753
753
754 nohelp hg nohelp
754 nohelp hg nohelp
755
755
756 Extension Commands:
756 Extension Commands:
757
757
758 nohelp (no help text available)
758 nohelp (no help text available)
759
759
760 Test that default list of commands omits extension commands
760 Test that default list of commands omits extension commands
761
761
762 $ hg help
762 $ hg help
763 Mercurial Distributed SCM
763 Mercurial Distributed SCM
764
764
765 list of commands:
765 list of commands:
766
766
767 add add the specified files on the next commit
767 add add the specified files on the next commit
768 addremove add all new files, delete all missing files
768 addremove add all new files, delete all missing files
769 annotate show changeset information by line for each file
769 annotate show changeset information by line for each file
770 archive create an unversioned archive of a repository revision
770 archive create an unversioned archive of a repository revision
771 backout reverse effect of earlier changeset
771 backout reverse effect of earlier changeset
772 bisect subdivision search of changesets
772 bisect subdivision search of changesets
773 bookmarks create a new bookmark or list existing bookmarks
773 bookmarks create a new bookmark or list existing bookmarks
774 branch set or show the current branch name
774 branch set or show the current branch name
775 branches list repository named branches
775 branches list repository named branches
776 bundle create a changegroup file
776 bundle create a changegroup file
777 cat output the current or given revision of files
777 cat output the current or given revision of files
778 clone make a copy of an existing repository
778 clone make a copy of an existing repository
779 commit commit the specified files or all outstanding changes
779 commit commit the specified files or all outstanding changes
780 config show combined config settings from all hgrc files
780 config show combined config settings from all hgrc files
781 copy mark files as copied for the next commit
781 copy mark files as copied for the next commit
782 diff diff repository (or selected files)
782 diff diff repository (or selected files)
783 export dump the header and diffs for one or more changesets
783 export dump the header and diffs for one or more changesets
784 files list tracked files
784 files list tracked files
785 forget forget the specified files on the next commit
785 forget forget the specified files on the next commit
786 graft copy changes from other branches onto the current branch
786 graft copy changes from other branches onto the current branch
787 grep search for a pattern in specified files and revisions
787 grep search for a pattern in specified files and revisions
788 heads show branch heads
788 heads show branch heads
789 help show help for a given topic or a help overview
789 help show help for a given topic or a help overview
790 identify identify the working directory or specified revision
790 identify identify the working directory or specified revision
791 import import an ordered set of patches
791 import import an ordered set of patches
792 incoming show new changesets found in source
792 incoming show new changesets found in source
793 init create a new repository in the given directory
793 init create a new repository in the given directory
794 log show revision history of entire repository or files
794 log show revision history of entire repository or files
795 manifest output the current or given revision of the project manifest
795 manifest output the current or given revision of the project manifest
796 merge merge another revision into working directory
796 merge merge another revision into working directory
797 outgoing show changesets not found in the destination
797 outgoing show changesets not found in the destination
798 paths show aliases for remote repositories
798 paths show aliases for remote repositories
799 phase set or show the current phase name
799 phase set or show the current phase name
800 pull pull changes from the specified source
800 pull pull changes from the specified source
801 push push changes to the specified destination
801 push push changes to the specified destination
802 recover roll back an interrupted transaction
802 recover roll back an interrupted transaction
803 remove remove the specified files on the next commit
803 remove remove the specified files on the next commit
804 rename rename files; equivalent of copy + remove
804 rename rename files; equivalent of copy + remove
805 resolve redo merges or set/view the merge status of files
805 resolve redo merges or set/view the merge status of files
806 revert restore files to their checkout state
806 revert restore files to their checkout state
807 root print the root (top) of the current working directory
807 root print the root (top) of the current working directory
808 serve start stand-alone webserver
808 serve start stand-alone webserver
809 status show changed files in the working directory
809 status show changed files in the working directory
810 summary summarize working directory state
810 summary summarize working directory state
811 tag add one or more tags for the current or given revision
811 tag add one or more tags for the current or given revision
812 tags list repository tags
812 tags list repository tags
813 unbundle apply one or more changegroup files
813 unbundle apply one or more changegroup files
814 update update working directory (or switch revisions)
814 update update working directory (or switch revisions)
815 verify verify the integrity of the repository
815 verify verify the integrity of the repository
816 version output version and copyright information
816 version output version and copyright information
817
817
818 enabled extensions:
818 enabled extensions:
819
819
820 helpext (no help text available)
820 helpext (no help text available)
821
821
822 additional help topics:
822 additional help topics:
823
823
824 config Configuration Files
824 config Configuration Files
825 dates Date Formats
825 dates Date Formats
826 diffs Diff Formats
826 diffs Diff Formats
827 environment Environment Variables
827 environment Environment Variables
828 extensions Using Additional Features
828 extensions Using Additional Features
829 filesets Specifying File Sets
829 filesets Specifying File Sets
830 glossary Glossary
830 glossary Glossary
831 hgignore Syntax for Mercurial Ignore Files
831 hgignore Syntax for Mercurial Ignore Files
832 hgweb Configuring hgweb
832 hgweb Configuring hgweb
833 internals Technical implementation topics
833 internals Technical implementation topics
834 merge-tools Merge Tools
834 merge-tools Merge Tools
835 multirevs Specifying Multiple Revisions
835 multirevs Specifying Multiple Revisions
836 patterns File Name Patterns
836 patterns File Name Patterns
837 phases Working with Phases
837 phases Working with Phases
838 revisions Specifying Single Revisions
838 revisions Specifying Single Revisions
839 revsets Specifying Revision Sets
839 revsets Specifying Revision Sets
840 scripting Using Mercurial from scripts and automation
840 scripting Using Mercurial from scripts and automation
841 subrepos Subrepositories
841 subrepos Subrepositories
842 templating Template Usage
842 templating Template Usage
843 urls URL Paths
843 urls URL Paths
844
844
845 (use 'hg help -v' to show built-in aliases and global options)
845 (use 'hg help -v' to show built-in aliases and global options)
846
846
847
847
848 Test list of internal help commands
848 Test list of internal help commands
849
849
850 $ hg help debug
850 $ hg help debug
851 debug commands (internal and unsupported):
851 debug commands (internal and unsupported):
852
852
853 debugancestor
853 debugancestor
854 find the ancestor revision of two revisions in a given index
854 find the ancestor revision of two revisions in a given index
855 debugapplystreamclonebundle
855 debugapplystreamclonebundle
856 apply a stream clone bundle file
856 apply a stream clone bundle file
857 debugbuilddag
857 debugbuilddag
858 builds a repo with a given DAG from scratch in the current
858 builds a repo with a given DAG from scratch in the current
859 empty repo
859 empty repo
860 debugbundle lists the contents of a bundle
860 debugbundle lists the contents of a bundle
861 debugcheckstate
861 debugcheckstate
862 validate the correctness of the current dirstate
862 validate the correctness of the current dirstate
863 debugcommands
863 debugcommands
864 list all available commands and options
864 list all available commands and options
865 debugcomplete
865 debugcomplete
866 returns the completion list associated with the given command
866 returns the completion list associated with the given command
867 debugcreatestreamclonebundle
867 debugcreatestreamclonebundle
868 create a stream clone bundle file
868 create a stream clone bundle file
869 debugdag format the changelog or an index DAG as a concise textual
869 debugdag format the changelog or an index DAG as a concise textual
870 description
870 description
871 debugdata dump the contents of a data file revision
871 debugdata dump the contents of a data file revision
872 debugdate parse and display a date
872 debugdate parse and display a date
873 debugdeltachain
873 debugdeltachain
874 dump information about delta chains in a revlog
874 dump information about delta chains in a revlog
875 debugdirstate
875 debugdirstate
876 show the contents of the current dirstate
876 show the contents of the current dirstate
877 debugdiscovery
877 debugdiscovery
878 runs the changeset discovery protocol in isolation
878 runs the changeset discovery protocol in isolation
879 debugextensions
879 debugextensions
880 show information about active extensions
880 show information about active extensions
881 debugfileset parse and apply a fileset specification
881 debugfileset parse and apply a fileset specification
882 debugfsinfo show information detected about current filesystem
882 debugfsinfo show information detected about current filesystem
883 debuggetbundle
883 debuggetbundle
884 retrieves a bundle from a repo
884 retrieves a bundle from a repo
885 debugignore display the combined ignore pattern and information about
885 debugignore display the combined ignore pattern and information about
886 ignored files
886 ignored files
887 debugindex dump the contents of an index file
887 debugindex dump the contents of an index file
888 debugindexdot
888 debugindexdot
889 dump an index DAG as a graphviz dot file
889 dump an index DAG as a graphviz dot file
890 debuginstall test Mercurial installation
890 debuginstall test Mercurial installation
891 debugknown test whether node ids are known to a repo
891 debugknown test whether node ids are known to a repo
892 debuglocks show or modify state of locks
892 debuglocks show or modify state of locks
893 debugmergestate
893 debugmergestate
894 print merge state
894 print merge state
895 debugnamecomplete
895 debugnamecomplete
896 complete "names" - tags, open branch names, bookmark names
896 complete "names" - tags, open branch names, bookmark names
897 debugobsolete
897 debugobsolete
898 create arbitrary obsolete marker
898 create arbitrary obsolete marker
899 debugoptDEP (no help text available)
899 debugoptDEP (no help text available)
900 debugoptEXP (no help text available)
900 debugoptEXP (no help text available)
901 debugpathcomplete
901 debugpathcomplete
902 complete part or all of a tracked path
902 complete part or all of a tracked path
903 debugpushkey access the pushkey key/value protocol
903 debugpushkey access the pushkey key/value protocol
904 debugpvec (no help text available)
904 debugpvec (no help text available)
905 debugrebuilddirstate
905 debugrebuilddirstate
906 rebuild the dirstate as it would look like for the given
906 rebuild the dirstate as it would look like for the given
907 revision
907 revision
908 debugrebuildfncache
908 debugrebuildfncache
909 rebuild the fncache file
909 rebuild the fncache file
910 debugrename dump rename information
910 debugrename dump rename information
911 debugrevlog show data and statistics about a revlog
911 debugrevlog show data and statistics about a revlog
912 debugrevspec parse and apply a revision specification
912 debugrevspec parse and apply a revision specification
913 debugsetparents
913 debugsetparents
914 manually set the parents of the current working directory
914 manually set the parents of the current working directory
915 debugsub (no help text available)
915 debugsub (no help text available)
916 debugsuccessorssets
916 debugsuccessorssets
917 show set of successors for revision
917 show set of successors for revision
918 debugtemplate
918 debugtemplate
919 parse and apply a template
919 parse and apply a template
920 debugwalk show how files match on given patterns
920 debugwalk show how files match on given patterns
921 debugwireargs
921 debugwireargs
922 (no help text available)
922 (no help text available)
923
923
924 (use 'hg help -v debug' to show built-in aliases and global options)
924 (use 'hg help -v debug' to show built-in aliases and global options)
925
925
926 internals topic renders index of available sub-topics
926 internals topic renders index of available sub-topics
927
927
928 $ hg help internals
928 $ hg help internals
929 Technical implementation topics
929 Technical implementation topics
930 """""""""""""""""""""""""""""""
930 """""""""""""""""""""""""""""""
931
931
932 bundles Bundles
932 bundles Bundles
933 changegroups Changegroups
933 changegroups Changegroups
934 requirements Repository Requirements
934 requirements Repository Requirements
935 revlogs Revision Logs
935 revlogs Revision Logs
936 wireprotocol Wire Protocol
936 wireprotocol Wire Protocol
937
937
938 sub-topics can be accessed
938 sub-topics can be accessed
939
939
940 $ hg help internals.changegroups
940 $ hg help internals.changegroups
941 Changegroups
941 Changegroups
942 """"""""""""
942 """"""""""""
943
943
944 Changegroups are representations of repository revlog data, specifically
944 Changegroups are representations of repository revlog data, specifically
945 the changelog, manifest, and filelogs.
945 the changelog, manifest, and filelogs.
946
946
947 There are 3 versions of changegroups: "1", "2", and "3". From a high-
947 There are 3 versions of changegroups: "1", "2", and "3". From a high-
948 level, versions "1" and "2" are almost exactly the same, with the only
948 level, versions "1" and "2" are almost exactly the same, with the only
949 difference being a header on entries in the changeset segment. Version "3"
949 difference being a header on entries in the changeset segment. Version "3"
950 adds support for exchanging treemanifests and includes revlog flags in the
950 adds support for exchanging treemanifests and includes revlog flags in the
951 delta header.
951 delta header.
952
952
953 Changegroups consists of 3 logical segments:
953 Changegroups consists of 3 logical segments:
954
954
955 +---------------------------------+
955 +---------------------------------+
956 | | | |
956 | | | |
957 | changeset | manifest | filelogs |
957 | changeset | manifest | filelogs |
958 | | | |
958 | | | |
959 +---------------------------------+
959 +---------------------------------+
960
960
961 The principle building block of each segment is a *chunk*. A *chunk* is a
961 The principle building block of each segment is a *chunk*. A *chunk* is a
962 framed piece of data:
962 framed piece of data:
963
963
964 +---------------------------------------+
964 +---------------------------------------+
965 | | |
965 | | |
966 | length | data |
966 | length | data |
967 | (32 bits) | <length> bytes |
967 | (32 bits) | <length> bytes |
968 | | |
968 | | |
969 +---------------------------------------+
969 +---------------------------------------+
970
970
971 Each chunk starts with a 32-bit big-endian signed integer indicating the
971 Each chunk starts with a 32-bit big-endian signed integer indicating the
972 length of the raw data that follows.
972 length of the raw data that follows.
973
973
974 There is a special case chunk that has 0 length ("0x00000000"). We call
974 There is a special case chunk that has 0 length ("0x00000000"). We call
975 this an *empty chunk*.
975 this an *empty chunk*.
976
976
977 Delta Groups
977 Delta Groups
978 ============
978 ============
979
979
980 A *delta group* expresses the content of a revlog as a series of deltas,
980 A *delta group* expresses the content of a revlog as a series of deltas,
981 or patches against previous revisions.
981 or patches against previous revisions.
982
982
983 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
983 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
984 to signal the end of the delta group:
984 to signal the end of the delta group:
985
985
986 +------------------------------------------------------------------------+
986 +------------------------------------------------------------------------+
987 | | | | | |
987 | | | | | |
988 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
988 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
989 | (32 bits) | (various) | (32 bits) | (various) | (32 bits) |
989 | (32 bits) | (various) | (32 bits) | (various) | (32 bits) |
990 | | | | | |
990 | | | | | |
991 +------------------------------------------------------------+-----------+
991 +------------------------------------------------------------+-----------+
992
992
993 Each *chunk*'s data consists of the following:
993 Each *chunk*'s data consists of the following:
994
994
995 +-----------------------------------------+
995 +-----------------------------------------+
996 | | | |
996 | | | |
997 | delta header | mdiff header | delta |
997 | delta header | mdiff header | delta |
998 | (various) | (12 bytes) | (various) |
998 | (various) | (12 bytes) | (various) |
999 | | | |
999 | | | |
1000 +-----------------------------------------+
1000 +-----------------------------------------+
1001
1001
1002 The *length* field is the byte length of the remaining 3 logical pieces of
1002 The *length* field is the byte length of the remaining 3 logical pieces of
1003 data. The *delta* is a diff from an existing entry in the changelog.
1003 data. The *delta* is a diff from an existing entry in the changelog.
1004
1004
1005 The *delta header* is different between versions "1", "2", and "3" of the
1005 The *delta header* is different between versions "1", "2", and "3" of the
1006 changegroup format.
1006 changegroup format.
1007
1007
1008 Version 1:
1008 Version 1:
1009
1009
1010 +------------------------------------------------------+
1010 +------------------------------------------------------+
1011 | | | | |
1011 | | | | |
1012 | node | p1 node | p2 node | link node |
1012 | node | p1 node | p2 node | link node |
1013 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1013 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1014 | | | | |
1014 | | | | |
1015 +------------------------------------------------------+
1015 +------------------------------------------------------+
1016
1016
1017 Version 2:
1017 Version 2:
1018
1018
1019 +------------------------------------------------------------------+
1019 +------------------------------------------------------------------+
1020 | | | | | |
1020 | | | | | |
1021 | node | p1 node | p2 node | base node | link node |
1021 | node | p1 node | p2 node | base node | link node |
1022 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1022 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1023 | | | | | |
1023 | | | | | |
1024 +------------------------------------------------------------------+
1024 +------------------------------------------------------------------+
1025
1025
1026 Version 3:
1026 Version 3:
1027
1027
1028 +------------------------------------------------------------------------------+
1028 +------------------------------------------------------------------------------+
1029 | | | | | | |
1029 | | | | | | |
1030 | node | p1 node | p2 node | base node | link node | flags |
1030 | node | p1 node | p2 node | base node | link node | flags |
1031 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
1031 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
1032 | | | | | | |
1032 | | | | | | |
1033 +------------------------------------------------------------------------------+
1033 +------------------------------------------------------------------------------+
1034
1034
1035 The *mdiff header* consists of 3 32-bit big-endian signed integers
1035 The *mdiff header* consists of 3 32-bit big-endian signed integers
1036 describing offsets at which to apply the following delta content:
1036 describing offsets at which to apply the following delta content:
1037
1037
1038 +-------------------------------------+
1038 +-------------------------------------+
1039 | | | |
1039 | | | |
1040 | offset | old length | new length |
1040 | offset | old length | new length |
1041 | (32 bits) | (32 bits) | (32 bits) |
1041 | (32 bits) | (32 bits) | (32 bits) |
1042 | | | |
1042 | | | |
1043 +-------------------------------------+
1043 +-------------------------------------+
1044
1044
1045 In version 1, the delta is always applied against the previous node from
1045 In version 1, the delta is always applied against the previous node from
1046 the changegroup or the first parent if this is the first entry in the
1046 the changegroup or the first parent if this is the first entry in the
1047 changegroup.
1047 changegroup.
1048
1048
1049 In version 2, the delta base node is encoded in the entry in the
1049 In version 2, the delta base node is encoded in the entry in the
1050 changegroup. This allows the delta to be expressed against any parent,
1050 changegroup. This allows the delta to be expressed against any parent,
1051 which can result in smaller deltas and more efficient encoding of data.
1051 which can result in smaller deltas and more efficient encoding of data.
1052
1052
1053 Changeset Segment
1053 Changeset Segment
1054 =================
1054 =================
1055
1055
1056 The *changeset segment* consists of a single *delta group* holding
1056 The *changeset segment* consists of a single *delta group* holding
1057 changelog data. It is followed by an *empty chunk* to denote the boundary
1057 changelog data. It is followed by an *empty chunk* to denote the boundary
1058 to the *manifests segment*.
1058 to the *manifests segment*.
1059
1059
1060 Manifest Segment
1060 Manifest Segment
1061 ================
1061 ================
1062
1062
1063 The *manifest segment* consists of a single *delta group* holding manifest
1063 The *manifest segment* consists of a single *delta group* holding manifest
1064 data. It is followed by an *empty chunk* to denote the boundary to the
1064 data. It is followed by an *empty chunk* to denote the boundary to the
1065 *filelogs segment*.
1065 *filelogs segment*.
1066
1066
1067 Filelogs Segment
1067 Filelogs Segment
1068 ================
1068 ================
1069
1069
1070 The *filelogs* segment consists of multiple sub-segments, each
1070 The *filelogs* segment consists of multiple sub-segments, each
1071 corresponding to an individual file whose data is being described:
1071 corresponding to an individual file whose data is being described:
1072
1072
1073 +--------------------------------------+
1073 +--------------------------------------+
1074 | | | | |
1074 | | | | |
1075 | filelog0 | filelog1 | filelog2 | ... |
1075 | filelog0 | filelog1 | filelog2 | ... |
1076 | | | | |
1076 | | | | |
1077 +--------------------------------------+
1077 +--------------------------------------+
1078
1078
1079 In version "3" of the changegroup format, filelogs may include directory
1079 In version "3" of the changegroup format, filelogs may include directory
1080 logs when treemanifests are in use. directory logs are identified by
1080 logs when treemanifests are in use. directory logs are identified by
1081 having a trailing '/' on their filename (see below).
1081 having a trailing '/' on their filename (see below).
1082
1082
1083 The final filelog sub-segment is followed by an *empty chunk* to denote
1083 The final filelog sub-segment is followed by an *empty chunk* to denote
1084 the end of the segment and the overall changegroup.
1084 the end of the segment and the overall changegroup.
1085
1085
1086 Each filelog sub-segment consists of the following:
1086 Each filelog sub-segment consists of the following:
1087
1087
1088 +------------------------------------------+
1088 +------------------------------------------+
1089 | | | |
1089 | | | |
1090 | filename size | filename | delta group |
1090 | filename size | filename | delta group |
1091 | (32 bits) | (various) | (various) |
1091 | (32 bits) | (various) | (various) |
1092 | | | |
1092 | | | |
1093 +------------------------------------------+
1093 +------------------------------------------+
1094
1094
1095 That is, a *chunk* consisting of the filename (not terminated or padded)
1095 That is, a *chunk* consisting of the filename (not terminated or padded)
1096 followed by N chunks constituting the *delta group* for this file.
1096 followed by N chunks constituting the *delta group* for this file.
1097
1097
1098 Test list of commands with command with no help text
1098 Test list of commands with command with no help text
1099
1099
1100 $ hg help helpext
1100 $ hg help helpext
1101 helpext extension - no help text available
1101 helpext extension - no help text available
1102
1102
1103 list of commands:
1103 list of commands:
1104
1104
1105 nohelp (no help text available)
1105 nohelp (no help text available)
1106
1106
1107 (use 'hg help -v helpext' to show built-in aliases and global options)
1107 (use 'hg help -v helpext' to show built-in aliases and global options)
1108
1108
1109
1109
1110 test deprecated and experimental options are hidden in command help
1110 test deprecated and experimental options are hidden in command help
1111 $ hg help debugoptDEP
1111 $ hg help debugoptDEP
1112 hg debugoptDEP
1112 hg debugoptDEP
1113
1113
1114 (no help text available)
1114 (no help text available)
1115
1115
1116 options:
1116 options:
1117
1117
1118 (some details hidden, use --verbose to show complete help)
1118 (some details hidden, use --verbose to show complete help)
1119
1119
1120 $ hg help debugoptEXP
1120 $ hg help debugoptEXP
1121 hg debugoptEXP
1121 hg debugoptEXP
1122
1122
1123 (no help text available)
1123 (no help text available)
1124
1124
1125 options:
1125 options:
1126
1126
1127 (some details hidden, use --verbose to show complete help)
1127 (some details hidden, use --verbose to show complete help)
1128
1128
1129 test deprecated and experimental options is shown with -v
1129 test deprecated and experimental options is shown with -v
1130 $ hg help -v debugoptDEP | grep dopt
1130 $ hg help -v debugoptDEP | grep dopt
1131 --dopt option is (DEPRECATED)
1131 --dopt option is (DEPRECATED)
1132 $ hg help -v debugoptEXP | grep eopt
1132 $ hg help -v debugoptEXP | grep eopt
1133 --eopt option is (EXPERIMENTAL)
1133 --eopt option is (EXPERIMENTAL)
1134
1134
1135 #if gettext
1135 #if gettext
1136 test deprecated option is hidden with translation with untranslated description
1136 test deprecated option is hidden with translation with untranslated description
1137 (use many globy for not failing on changed transaction)
1137 (use many globy for not failing on changed transaction)
1138 $ LANGUAGE=sv hg help debugoptDEP
1138 $ LANGUAGE=sv hg help debugoptDEP
1139 hg debugoptDEP
1139 hg debugoptDEP
1140
1140
1141 (*) (glob)
1141 (*) (glob)
1142
1142
1143 options:
1143 options:
1144
1144
1145 (some details hidden, use --verbose to show complete help)
1145 (some details hidden, use --verbose to show complete help)
1146 #endif
1146 #endif
1147
1147
1148 Test commands that collide with topics (issue4240)
1148 Test commands that collide with topics (issue4240)
1149
1149
1150 $ hg config -hq
1150 $ hg config -hq
1151 hg config [-u] [NAME]...
1151 hg config [-u] [NAME]...
1152
1152
1153 show combined config settings from all hgrc files
1153 show combined config settings from all hgrc files
1154 $ hg showconfig -hq
1154 $ hg showconfig -hq
1155 hg config [-u] [NAME]...
1155 hg config [-u] [NAME]...
1156
1156
1157 show combined config settings from all hgrc files
1157 show combined config settings from all hgrc files
1158
1158
1159 Test a help topic
1159 Test a help topic
1160
1160
1161 $ hg help revs
1161 $ hg help revs
1162 Specifying Single Revisions
1162 Specifying Single Revisions
1163 """""""""""""""""""""""""""
1163 """""""""""""""""""""""""""
1164
1164
1165 Mercurial supports several ways to specify individual revisions.
1165 Mercurial supports several ways to specify individual revisions.
1166
1166
1167 A plain integer is treated as a revision number. Negative integers are
1167 A plain integer is treated as a revision number. Negative integers are
1168 treated as sequential offsets from the tip, with -1 denoting the tip, -2
1168 treated as sequential offsets from the tip, with -1 denoting the tip, -2
1169 denoting the revision prior to the tip, and so forth.
1169 denoting the revision prior to the tip, and so forth.
1170
1170
1171 A 40-digit hexadecimal string is treated as a unique revision identifier.
1171 A 40-digit hexadecimal string is treated as a unique revision identifier.
1172
1172
1173 A hexadecimal string less than 40 characters long is treated as a unique
1173 A hexadecimal string less than 40 characters long is treated as a unique
1174 revision identifier and is referred to as a short-form identifier. A
1174 revision identifier and is referred to as a short-form identifier. A
1175 short-form identifier is only valid if it is the prefix of exactly one
1175 short-form identifier is only valid if it is the prefix of exactly one
1176 full-length identifier.
1176 full-length identifier.
1177
1177
1178 Any other string is treated as a bookmark, tag, or branch name. A bookmark
1178 Any other string is treated as a bookmark, tag, or branch name. A bookmark
1179 is a movable pointer to a revision. A tag is a permanent name associated
1179 is a movable pointer to a revision. A tag is a permanent name associated
1180 with a revision. A branch name denotes the tipmost open branch head of
1180 with a revision. A branch name denotes the tipmost open branch head of
1181 that branch - or if they are all closed, the tipmost closed head of the
1181 that branch - or if they are all closed, the tipmost closed head of the
1182 branch. Bookmark, tag, and branch names must not contain the ":"
1182 branch. Bookmark, tag, and branch names must not contain the ":"
1183 character.
1183 character.
1184
1184
1185 The reserved name "tip" always identifies the most recent revision.
1185 The reserved name "tip" always identifies the most recent revision.
1186
1186
1187 The reserved name "null" indicates the null revision. This is the revision
1187 The reserved name "null" indicates the null revision. This is the revision
1188 of an empty repository, and the parent of revision 0.
1188 of an empty repository, and the parent of revision 0.
1189
1189
1190 The reserved name "." indicates the working directory parent. If no
1190 The reserved name "." indicates the working directory parent. If no
1191 working directory is checked out, it is equivalent to null. If an
1191 working directory is checked out, it is equivalent to null. If an
1192 uncommitted merge is in progress, "." is the revision of the first parent.
1192 uncommitted merge is in progress, "." is the revision of the first parent.
1193
1193
1194 Test repeated config section name
1194 Test repeated config section name
1195
1195
1196 $ hg help config.host
1196 $ hg help config.host
1197 "http_proxy.host"
1197 "http_proxy.host"
1198 Host name and (optional) port of the proxy server, for example
1198 Host name and (optional) port of the proxy server, for example
1199 "myproxy:8000".
1199 "myproxy:8000".
1200
1200
1201 "smtp.host"
1201 "smtp.host"
1202 Host name of mail server, e.g. "mail.example.com".
1202 Host name of mail server, e.g. "mail.example.com".
1203
1203
1204 Unrelated trailing paragraphs shouldn't be included
1204 Unrelated trailing paragraphs shouldn't be included
1205
1205
1206 $ hg help config.extramsg | grep '^$'
1206 $ hg help config.extramsg | grep '^$'
1207
1207
1208
1208
1209 Test capitalized section name
1209 Test capitalized section name
1210
1210
1211 $ hg help scripting.HGPLAIN > /dev/null
1211 $ hg help scripting.HGPLAIN > /dev/null
1212
1212
1213 Help subsection:
1213 Help subsection:
1214
1214
1215 $ hg help config.charsets |grep "Email example:" > /dev/null
1215 $ hg help config.charsets |grep "Email example:" > /dev/null
1216 [1]
1216 [1]
1217
1217
1218 Show nested definitions
1218 Show nested definitions
1219 ("profiling.type"[break]"ls"[break]"stat"[break])
1219 ("profiling.type"[break]"ls"[break]"stat"[break])
1220
1220
1221 $ hg help config.type | egrep '^$'|wc -l
1221 $ hg help config.type | egrep '^$'|wc -l
1222 \s*3 (re)
1222 \s*3 (re)
1223
1223
1224 Separate sections from subsections
1224 Separate sections from subsections
1225
1225
1226 $ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq
1226 $ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq
1227 "format"
1227 "format"
1228 --------
1228 --------
1229
1229
1230 "usegeneraldelta"
1230 "usegeneraldelta"
1231
1231
1232 "dotencode"
1232 "dotencode"
1233
1233
1234 "usefncache"
1234 "usefncache"
1235
1235
1236 "usestore"
1236 "usestore"
1237
1237
1238 "profiling"
1238 "profiling"
1239 -----------
1239 -----------
1240
1240
1241 "format"
1241 "format"
1242
1242
1243 "progress"
1243 "progress"
1244 ----------
1244 ----------
1245
1245
1246 "format"
1246 "format"
1247
1247
1248
1248
1249 Last item in help config.*:
1249 Last item in help config.*:
1250
1250
1251 $ hg help config.`hg help config|grep '^ "'| \
1251 $ hg help config.`hg help config|grep '^ "'| \
1252 > tail -1|sed 's![ "]*!!g'`| \
1252 > tail -1|sed 's![ "]*!!g'`| \
1253 > grep 'hg help -c config' > /dev/null
1253 > grep 'hg help -c config' > /dev/null
1254 [1]
1254 [1]
1255
1255
1256 note to use help -c for general hg help config:
1256 note to use help -c for general hg help config:
1257
1257
1258 $ hg help config |grep 'hg help -c config' > /dev/null
1258 $ hg help config |grep 'hg help -c config' > /dev/null
1259
1259
1260 Test templating help
1260 Test templating help
1261
1261
1262 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
1262 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
1263 desc String. The text of the changeset description.
1263 desc String. The text of the changeset description.
1264 diffstat String. Statistics of changes with the following format:
1264 diffstat String. Statistics of changes with the following format:
1265 firstline Any text. Returns the first line of text.
1265 firstline Any text. Returns the first line of text.
1266 nonempty Any text. Returns '(none)' if the string is empty.
1266 nonempty Any text. Returns '(none)' if the string is empty.
1267
1267
1268 Test deprecated items
1268 Test deprecated items
1269
1269
1270 $ hg help -v templating | grep currentbookmark
1270 $ hg help -v templating | grep currentbookmark
1271 currentbookmark
1271 currentbookmark
1272 $ hg help templating | (grep currentbookmark || true)
1272 $ hg help templating | (grep currentbookmark || true)
1273
1273
1274 Test help hooks
1274 Test help hooks
1275
1275
1276 $ cat > helphook1.py <<EOF
1276 $ cat > helphook1.py <<EOF
1277 > from mercurial import help
1277 > from mercurial import help
1278 >
1278 >
1279 > def rewrite(ui, topic, doc):
1279 > def rewrite(ui, topic, doc):
1280 > return doc + '\nhelphook1\n'
1280 > return doc + '\nhelphook1\n'
1281 >
1281 >
1282 > def extsetup(ui):
1282 > def extsetup(ui):
1283 > help.addtopichook('revsets', rewrite)
1283 > help.addtopichook('revsets', rewrite)
1284 > EOF
1284 > EOF
1285 $ cat > helphook2.py <<EOF
1285 $ cat > helphook2.py <<EOF
1286 > from mercurial import help
1286 > from mercurial import help
1287 >
1287 >
1288 > def rewrite(ui, topic, doc):
1288 > def rewrite(ui, topic, doc):
1289 > return doc + '\nhelphook2\n'
1289 > return doc + '\nhelphook2\n'
1290 >
1290 >
1291 > def extsetup(ui):
1291 > def extsetup(ui):
1292 > help.addtopichook('revsets', rewrite)
1292 > help.addtopichook('revsets', rewrite)
1293 > EOF
1293 > EOF
1294 $ echo '[extensions]' >> $HGRCPATH
1294 $ echo '[extensions]' >> $HGRCPATH
1295 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
1295 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
1296 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
1296 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
1297 $ hg help revsets | grep helphook
1297 $ hg help revsets | grep helphook
1298 helphook1
1298 helphook1
1299 helphook2
1299 helphook2
1300
1300
1301 help -c should only show debug --debug
1301 help -c should only show debug --debug
1302
1302
1303 $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$'
1303 $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$'
1304 [1]
1304 [1]
1305
1305
1306 help -c should only show deprecated for -v
1306 help -c should only show deprecated for -v
1307
1307
1308 $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$'
1308 $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$'
1309 [1]
1309 [1]
1310
1310
1311 Test -s / --system
1311 Test -s / --system
1312
1312
1313 $ hg help config.files -s windows |grep 'etc/mercurial' | \
1313 $ hg help config.files -s windows |grep 'etc/mercurial' | \
1314 > wc -l | sed -e 's/ //g'
1314 > wc -l | sed -e 's/ //g'
1315 0
1315 0
1316 $ hg help config.files --system unix | grep 'USER' | \
1316 $ hg help config.files --system unix | grep 'USER' | \
1317 > wc -l | sed -e 's/ //g'
1317 > wc -l | sed -e 's/ //g'
1318 0
1318 0
1319
1319
1320 Test -e / -c / -k combinations
1320 Test -e / -c / -k combinations
1321
1321
1322 $ hg help -c|egrep '^[A-Z].*:|^ debug'
1322 $ hg help -c|egrep '^[A-Z].*:|^ debug'
1323 Commands:
1323 Commands:
1324 $ hg help -e|egrep '^[A-Z].*:|^ debug'
1324 $ hg help -e|egrep '^[A-Z].*:|^ debug'
1325 Extensions:
1325 Extensions:
1326 $ hg help -k|egrep '^[A-Z].*:|^ debug'
1326 $ hg help -k|egrep '^[A-Z].*:|^ debug'
1327 Topics:
1327 Topics:
1328 Commands:
1328 Commands:
1329 Extensions:
1329 Extensions:
1330 Extension Commands:
1330 Extension Commands:
1331 $ hg help -c schemes
1331 $ hg help -c schemes
1332 abort: no such help topic: schemes
1332 abort: no such help topic: schemes
1333 (try 'hg help --keyword schemes')
1333 (try 'hg help --keyword schemes')
1334 [255]
1334 [255]
1335 $ hg help -e schemes |head -1
1335 $ hg help -e schemes |head -1
1336 schemes extension - extend schemes with shortcuts to repository swarms
1336 schemes extension - extend schemes with shortcuts to repository swarms
1337 $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):'
1337 $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):'
1338 Commands:
1338 Commands:
1339 $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):'
1339 $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):'
1340 Extensions:
1340 Extensions:
1341 $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):'
1341 $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):'
1342 Extensions:
1342 Extensions:
1343 Commands:
1343 Commands:
1344 $ hg help -c commit > /dev/null
1344 $ hg help -c commit > /dev/null
1345 $ hg help -e -c commit > /dev/null
1345 $ hg help -e -c commit > /dev/null
1346 $ hg help -e commit > /dev/null
1346 $ hg help -e commit > /dev/null
1347 abort: no such help topic: commit
1347 abort: no such help topic: commit
1348 (try 'hg help --keyword commit')
1348 (try 'hg help --keyword commit')
1349 [255]
1349 [255]
1350
1350
1351 Test keyword search help
1351 Test keyword search help
1352
1352
1353 $ cat > prefixedname.py <<EOF
1353 $ cat > prefixedname.py <<EOF
1354 > '''matched against word "clone"
1354 > '''matched against word "clone"
1355 > '''
1355 > '''
1356 > EOF
1356 > EOF
1357 $ echo '[extensions]' >> $HGRCPATH
1357 $ echo '[extensions]' >> $HGRCPATH
1358 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
1358 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
1359 $ hg help -k clone
1359 $ hg help -k clone
1360 Topics:
1360 Topics:
1361
1361
1362 config Configuration Files
1362 config Configuration Files
1363 extensions Using Additional Features
1363 extensions Using Additional Features
1364 glossary Glossary
1364 glossary Glossary
1365 phases Working with Phases
1365 phases Working with Phases
1366 subrepos Subrepositories
1366 subrepos Subrepositories
1367 urls URL Paths
1367 urls URL Paths
1368
1368
1369 Commands:
1369 Commands:
1370
1370
1371 bookmarks create a new bookmark or list existing bookmarks
1371 bookmarks create a new bookmark or list existing bookmarks
1372 clone make a copy of an existing repository
1372 clone make a copy of an existing repository
1373 paths show aliases for remote repositories
1373 paths show aliases for remote repositories
1374 update update working directory (or switch revisions)
1374 update update working directory (or switch revisions)
1375
1375
1376 Extensions:
1376 Extensions:
1377
1377
1378 clonebundles advertise pre-generated bundles to seed clones
1378 clonebundles advertise pre-generated bundles to seed clones
1379 prefixedname matched against word "clone"
1379 prefixedname matched against word "clone"
1380 relink recreates hardlinks between repository clones
1380 relink recreates hardlinks between repository clones
1381
1381
1382 Extension Commands:
1382 Extension Commands:
1383
1383
1384 qclone clone main and patch repository at same time
1384 qclone clone main and patch repository at same time
1385
1385
1386 Test unfound topic
1386 Test unfound topic
1387
1387
1388 $ hg help nonexistingtopicthatwillneverexisteverever
1388 $ hg help nonexistingtopicthatwillneverexisteverever
1389 abort: no such help topic: nonexistingtopicthatwillneverexisteverever
1389 abort: no such help topic: nonexistingtopicthatwillneverexisteverever
1390 (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever')
1390 (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever')
1391 [255]
1391 [255]
1392
1392
1393 Test unfound keyword
1393 Test unfound keyword
1394
1394
1395 $ hg help --keyword nonexistingwordthatwillneverexisteverever
1395 $ hg help --keyword nonexistingwordthatwillneverexisteverever
1396 abort: no matches
1396 abort: no matches
1397 (try 'hg help' for a list of topics)
1397 (try 'hg help' for a list of topics)
1398 [255]
1398 [255]
1399
1399
1400 Test omit indicating for help
1400 Test omit indicating for help
1401
1401
1402 $ cat > addverboseitems.py <<EOF
1402 $ cat > addverboseitems.py <<EOF
1403 > '''extension to test omit indicating.
1403 > '''extension to test omit indicating.
1404 >
1404 >
1405 > This paragraph is never omitted (for extension)
1405 > This paragraph is never omitted (for extension)
1406 >
1406 >
1407 > .. container:: verbose
1407 > .. container:: verbose
1408 >
1408 >
1409 > This paragraph is omitted,
1409 > This paragraph is omitted,
1410 > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension)
1410 > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension)
1411 >
1411 >
1412 > This paragraph is never omitted, too (for extension)
1412 > This paragraph is never omitted, too (for extension)
1413 > '''
1413 > '''
1414 >
1414 >
1415 > from mercurial import help, commands
1415 > from mercurial import help, commands
1416 > testtopic = """This paragraph is never omitted (for topic).
1416 > testtopic = """This paragraph is never omitted (for topic).
1417 >
1417 >
1418 > .. container:: verbose
1418 > .. container:: verbose
1419 >
1419 >
1420 > This paragraph is omitted,
1420 > This paragraph is omitted,
1421 > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic)
1421 > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic)
1422 >
1422 >
1423 > This paragraph is never omitted, too (for topic)
1423 > This paragraph is never omitted, too (for topic)
1424 > """
1424 > """
1425 > def extsetup(ui):
1425 > def extsetup(ui):
1426 > help.helptable.append((["topic-containing-verbose"],
1426 > help.helptable.append((["topic-containing-verbose"],
1427 > "This is the topic to test omit indicating.",
1427 > "This is the topic to test omit indicating.",
1428 > lambda ui: testtopic))
1428 > lambda ui: testtopic))
1429 > EOF
1429 > EOF
1430 $ echo '[extensions]' >> $HGRCPATH
1430 $ echo '[extensions]' >> $HGRCPATH
1431 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
1431 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
1432 $ hg help addverboseitems
1432 $ hg help addverboseitems
1433 addverboseitems extension - extension to test omit indicating.
1433 addverboseitems extension - extension to test omit indicating.
1434
1434
1435 This paragraph is never omitted (for extension)
1435 This paragraph is never omitted (for extension)
1436
1436
1437 This paragraph is never omitted, too (for extension)
1437 This paragraph is never omitted, too (for extension)
1438
1438
1439 (some details hidden, use --verbose to show complete help)
1439 (some details hidden, use --verbose to show complete help)
1440
1440
1441 no commands defined
1441 no commands defined
1442 $ hg help -v addverboseitems
1442 $ hg help -v addverboseitems
1443 addverboseitems extension - extension to test omit indicating.
1443 addverboseitems extension - extension to test omit indicating.
1444
1444
1445 This paragraph is never omitted (for extension)
1445 This paragraph is never omitted (for extension)
1446
1446
1447 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1447 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1448 extension)
1448 extension)
1449
1449
1450 This paragraph is never omitted, too (for extension)
1450 This paragraph is never omitted, too (for extension)
1451
1451
1452 no commands defined
1452 no commands defined
1453 $ hg help topic-containing-verbose
1453 $ hg help topic-containing-verbose
1454 This is the topic to test omit indicating.
1454 This is the topic to test omit indicating.
1455 """"""""""""""""""""""""""""""""""""""""""
1455 """"""""""""""""""""""""""""""""""""""""""
1456
1456
1457 This paragraph is never omitted (for topic).
1457 This paragraph is never omitted (for topic).
1458
1458
1459 This paragraph is never omitted, too (for topic)
1459 This paragraph is never omitted, too (for topic)
1460
1460
1461 (some details hidden, use --verbose to show complete help)
1461 (some details hidden, use --verbose to show complete help)
1462 $ hg help -v topic-containing-verbose
1462 $ hg help -v topic-containing-verbose
1463 This is the topic to test omit indicating.
1463 This is the topic to test omit indicating.
1464 """"""""""""""""""""""""""""""""""""""""""
1464 """"""""""""""""""""""""""""""""""""""""""
1465
1465
1466 This paragraph is never omitted (for topic).
1466 This paragraph is never omitted (for topic).
1467
1467
1468 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1468 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1469 topic)
1469 topic)
1470
1470
1471 This paragraph is never omitted, too (for topic)
1471 This paragraph is never omitted, too (for topic)
1472
1472
1473 Test section lookup
1473 Test section lookup
1474
1474
1475 $ hg help revset.merge
1475 $ hg help revset.merge
1476 "merge()"
1476 "merge()"
1477 Changeset is a merge changeset.
1477 Changeset is a merge changeset.
1478
1478
1479 $ hg help glossary.dag
1479 $ hg help glossary.dag
1480 DAG
1480 DAG
1481 The repository of changesets of a distributed version control system
1481 The repository of changesets of a distributed version control system
1482 (DVCS) can be described as a directed acyclic graph (DAG), consisting
1482 (DVCS) can be described as a directed acyclic graph (DAG), consisting
1483 of nodes and edges, where nodes correspond to changesets and edges
1483 of nodes and edges, where nodes correspond to changesets and edges
1484 imply a parent -> child relation. This graph can be visualized by
1484 imply a parent -> child relation. This graph can be visualized by
1485 graphical tools such as 'hg log --graph'. In Mercurial, the DAG is
1485 graphical tools such as 'hg log --graph'. In Mercurial, the DAG is
1486 limited by the requirement for children to have at most two parents.
1486 limited by the requirement for children to have at most two parents.
1487
1487
1488
1488
1489 $ hg help hgrc.paths
1489 $ hg help hgrc.paths
1490 "paths"
1490 "paths"
1491 -------
1491 -------
1492
1492
1493 Assigns symbolic names and behavior to repositories.
1493 Assigns symbolic names and behavior to repositories.
1494
1494
1495 Options are symbolic names defining the URL or directory that is the
1495 Options are symbolic names defining the URL or directory that is the
1496 location of the repository. Example:
1496 location of the repository. Example:
1497
1497
1498 [paths]
1498 [paths]
1499 my_server = https://example.com/my_repo
1499 my_server = https://example.com/my_repo
1500 local_path = /home/me/repo
1500 local_path = /home/me/repo
1501
1501
1502 These symbolic names can be used from the command line. To pull from
1502 These symbolic names can be used from the command line. To pull from
1503 "my_server": 'hg pull my_server'. To push to "local_path": 'hg push
1503 "my_server": 'hg pull my_server'. To push to "local_path": 'hg push
1504 local_path'.
1504 local_path'.
1505
1505
1506 Options containing colons (":") denote sub-options that can influence
1506 Options containing colons (":") denote sub-options that can influence
1507 behavior for that specific path. Example:
1507 behavior for that specific path. Example:
1508
1508
1509 [paths]
1509 [paths]
1510 my_server = https://example.com/my_path
1510 my_server = https://example.com/my_path
1511 my_server:pushurl = ssh://example.com/my_path
1511 my_server:pushurl = ssh://example.com/my_path
1512
1512
1513 The following sub-options can be defined:
1513 The following sub-options can be defined:
1514
1514
1515 "pushurl"
1515 "pushurl"
1516 The URL to use for push operations. If not defined, the location
1516 The URL to use for push operations. If not defined, the location
1517 defined by the path's main entry is used.
1517 defined by the path's main entry is used.
1518
1518
1519 "pushrev"
1519 "pushrev"
1520 A revset defining which revisions to push by default.
1520 A revset defining which revisions to push by default.
1521
1521
1522 When 'hg push' is executed without a "-r" argument, the revset defined
1522 When 'hg push' is executed without a "-r" argument, the revset defined
1523 by this sub-option is evaluated to determine what to push.
1523 by this sub-option is evaluated to determine what to push.
1524
1524
1525 For example, a value of "." will push the working directory's revision
1525 For example, a value of "." will push the working directory's revision
1526 by default.
1526 by default.
1527
1527
1528 Revsets specifying bookmarks will not result in the bookmark being
1528 Revsets specifying bookmarks will not result in the bookmark being
1529 pushed.
1529 pushed.
1530
1530
1531 The following special named paths exist:
1531 The following special named paths exist:
1532
1532
1533 "default"
1533 "default"
1534 The URL or directory to use when no source or remote is specified.
1534 The URL or directory to use when no source or remote is specified.
1535
1535
1536 'hg clone' will automatically define this path to the location the
1536 'hg clone' will automatically define this path to the location the
1537 repository was cloned from.
1537 repository was cloned from.
1538
1538
1539 "default-push"
1539 "default-push"
1540 (deprecated) The URL or directory for the default 'hg push' location.
1540 (deprecated) The URL or directory for the default 'hg push' location.
1541 "default:pushurl" should be used instead.
1541 "default:pushurl" should be used instead.
1542
1542
1543 $ hg help glossary.mcguffin
1543 $ hg help glossary.mcguffin
1544 abort: help section not found
1544 abort: help section not found
1545 [255]
1545 [255]
1546
1546
1547 $ hg help glossary.mc.guffin
1547 $ hg help glossary.mc.guffin
1548 abort: help section not found
1548 abort: help section not found
1549 [255]
1549 [255]
1550
1550
1551 $ hg help template.files
1551 $ hg help template.files
1552 files List of strings. All files modified, added, or removed by
1552 files List of strings. All files modified, added, or removed by
1553 this changeset.
1553 this changeset.
1554 files(pattern)
1554 files(pattern)
1555 All files of the current changeset matching the pattern. See
1555 All files of the current changeset matching the pattern. See
1556 'hg help patterns'.
1556 'hg help patterns'.
1557
1557
1558 Test section lookup by translated message
1558 Test section lookup by translated message
1559
1559
1560 str.lower() instead of encoding.lower(str) on translated message might
1560 str.lower() instead of encoding.lower(str) on translated message might
1561 make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z)
1561 make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z)
1562 as the second or later byte of multi-byte character.
1562 as the second or later byte of multi-byte character.
1563
1563
1564 For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932)
1564 For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932)
1565 contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this
1565 contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this
1566 replacement makes message meaningless.
1566 replacement makes message meaningless.
1567
1567
1568 This tests that section lookup by translated string isn't broken by
1568 This tests that section lookup by translated string isn't broken by
1569 such str.lower().
1569 such str.lower().
1570
1570
1571 $ python <<EOF
1571 $ python <<EOF
1572 > def escape(s):
1572 > def escape(s):
1573 > return ''.join('\u%x' % ord(uc) for uc in s.decode('cp932'))
1573 > return ''.join('\u%x' % ord(uc) for uc in s.decode('cp932'))
1574 > # translation of "record" in ja_JP.cp932
1574 > # translation of "record" in ja_JP.cp932
1575 > upper = "\x8bL\x98^"
1575 > upper = "\x8bL\x98^"
1576 > # str.lower()-ed section name should be treated as different one
1576 > # str.lower()-ed section name should be treated as different one
1577 > lower = "\x8bl\x98^"
1577 > lower = "\x8bl\x98^"
1578 > with open('ambiguous.py', 'w') as fp:
1578 > with open('ambiguous.py', 'w') as fp:
1579 > fp.write("""# ambiguous section names in ja_JP.cp932
1579 > fp.write("""# ambiguous section names in ja_JP.cp932
1580 > u'''summary of extension
1580 > u'''summary of extension
1581 >
1581 >
1582 > %s
1582 > %s
1583 > ----
1583 > ----
1584 >
1584 >
1585 > Upper name should show only this message
1585 > Upper name should show only this message
1586 >
1586 >
1587 > %s
1587 > %s
1588 > ----
1588 > ----
1589 >
1589 >
1590 > Lower name should show only this message
1590 > Lower name should show only this message
1591 >
1591 >
1592 > subsequent section
1592 > subsequent section
1593 > ------------------
1593 > ------------------
1594 >
1594 >
1595 > This should be hidden at 'hg help ambiguous' with section name.
1595 > This should be hidden at 'hg help ambiguous' with section name.
1596 > '''
1596 > '''
1597 > """ % (escape(upper), escape(lower)))
1597 > """ % (escape(upper), escape(lower)))
1598 > EOF
1598 > EOF
1599
1599
1600 $ cat >> $HGRCPATH <<EOF
1600 $ cat >> $HGRCPATH <<EOF
1601 > [extensions]
1601 > [extensions]
1602 > ambiguous = ./ambiguous.py
1602 > ambiguous = ./ambiguous.py
1603 > EOF
1603 > EOF
1604
1604
1605 $ python <<EOF | sh
1605 $ python <<EOF | sh
1606 > upper = "\x8bL\x98^"
1606 > upper = "\x8bL\x98^"
1607 > print "hg --encoding cp932 help -e ambiguous.%s" % upper
1607 > print "hg --encoding cp932 help -e ambiguous.%s" % upper
1608 > EOF
1608 > EOF
1609 \x8bL\x98^ (esc)
1609 \x8bL\x98^ (esc)
1610 ----
1610 ----
1611
1611
1612 Upper name should show only this message
1612 Upper name should show only this message
1613
1613
1614
1614
1615 $ python <<EOF | sh
1615 $ python <<EOF | sh
1616 > lower = "\x8bl\x98^"
1616 > lower = "\x8bl\x98^"
1617 > print "hg --encoding cp932 help -e ambiguous.%s" % lower
1617 > print "hg --encoding cp932 help -e ambiguous.%s" % lower
1618 > EOF
1618 > EOF
1619 \x8bl\x98^ (esc)
1619 \x8bl\x98^ (esc)
1620 ----
1620 ----
1621
1621
1622 Lower name should show only this message
1622 Lower name should show only this message
1623
1623
1624
1624
1625 $ cat >> $HGRCPATH <<EOF
1625 $ cat >> $HGRCPATH <<EOF
1626 > [extensions]
1626 > [extensions]
1627 > ambiguous = !
1627 > ambiguous = !
1628 > EOF
1628 > EOF
1629
1629
1630 Show help content of disabled extensions
1630 Show help content of disabled extensions
1631
1631
1632 $ cat >> $HGRCPATH <<EOF
1632 $ cat >> $HGRCPATH <<EOF
1633 > [extensions]
1633 > [extensions]
1634 > ambiguous = !./ambiguous.py
1634 > ambiguous = !./ambiguous.py
1635 > EOF
1635 > EOF
1636 $ hg help -e ambiguous
1636 $ hg help -e ambiguous
1637 ambiguous extension - (no help text available)
1637 ambiguous extension - (no help text available)
1638
1638
1639 (use 'hg help extensions' for information on enabling extensions)
1639 (use 'hg help extensions' for information on enabling extensions)
1640
1640
1641 Test dynamic list of merge tools only shows up once
1641 Test dynamic list of merge tools only shows up once
1642 $ hg help merge-tools
1642 $ hg help merge-tools
1643 Merge Tools
1643 Merge Tools
1644 """""""""""
1644 """""""""""
1645
1645
1646 To merge files Mercurial uses merge tools.
1646 To merge files Mercurial uses merge tools.
1647
1647
1648 A merge tool combines two different versions of a file into a merged file.
1648 A merge tool combines two different versions of a file into a merged file.
1649 Merge tools are given the two files and the greatest common ancestor of
1649 Merge tools are given the two files and the greatest common ancestor of
1650 the two file versions, so they can determine the changes made on both
1650 the two file versions, so they can determine the changes made on both
1651 branches.
1651 branches.
1652
1652
1653 Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg
1653 Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg
1654 backout' and in several extensions.
1654 backout' and in several extensions.
1655
1655
1656 Usually, the merge tool tries to automatically reconcile the files by
1656 Usually, the merge tool tries to automatically reconcile the files by
1657 combining all non-overlapping changes that occurred separately in the two
1657 combining all non-overlapping changes that occurred separately in the two
1658 different evolutions of the same initial base file. Furthermore, some
1658 different evolutions of the same initial base file. Furthermore, some
1659 interactive merge programs make it easier to manually resolve conflicting
1659 interactive merge programs make it easier to manually resolve conflicting
1660 merges, either in a graphical way, or by inserting some conflict markers.
1660 merges, either in a graphical way, or by inserting some conflict markers.
1661 Mercurial does not include any interactive merge programs but relies on
1661 Mercurial does not include any interactive merge programs but relies on
1662 external tools for that.
1662 external tools for that.
1663
1663
1664 Available merge tools
1664 Available merge tools
1665 =====================
1665 =====================
1666
1666
1667 External merge tools and their properties are configured in the merge-
1667 External merge tools and their properties are configured in the merge-
1668 tools configuration section - see hgrc(5) - but they can often just be
1668 tools configuration section - see hgrc(5) - but they can often just be
1669 named by their executable.
1669 named by their executable.
1670
1670
1671 A merge tool is generally usable if its executable can be found on the
1671 A merge tool is generally usable if its executable can be found on the
1672 system and if it can handle the merge. The executable is found if it is an
1672 system and if it can handle the merge. The executable is found if it is an
1673 absolute or relative executable path or the name of an application in the
1673 absolute or relative executable path or the name of an application in the
1674 executable search path. The tool is assumed to be able to handle the merge
1674 executable search path. The tool is assumed to be able to handle the merge
1675 if it can handle symlinks if the file is a symlink, if it can handle
1675 if it can handle symlinks if the file is a symlink, if it can handle
1676 binary files if the file is binary, and if a GUI is available if the tool
1676 binary files if the file is binary, and if a GUI is available if the tool
1677 requires a GUI.
1677 requires a GUI.
1678
1678
1679 There are some internal merge tools which can be used. The internal merge
1679 There are some internal merge tools which can be used. The internal merge
1680 tools are:
1680 tools are:
1681
1681
1682 ":dump"
1682 ":dump"
1683 Creates three versions of the files to merge, containing the contents of
1683 Creates three versions of the files to merge, containing the contents of
1684 local, other and base. These files can then be used to perform a merge
1684 local, other and base. These files can then be used to perform a merge
1685 manually. If the file to be merged is named "a.txt", these files will
1685 manually. If the file to be merged is named "a.txt", these files will
1686 accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and
1686 accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and
1687 they will be placed in the same directory as "a.txt".
1687 they will be placed in the same directory as "a.txt".
1688
1688
1689 ":fail"
1689 ":fail"
1690 Rather than attempting to merge files that were modified on both
1690 Rather than attempting to merge files that were modified on both
1691 branches, it marks them as unresolved. The resolve command must be used
1691 branches, it marks them as unresolved. The resolve command must be used
1692 to resolve these conflicts.
1692 to resolve these conflicts.
1693
1693
1694 ":local"
1694 ":local"
1695 Uses the local 'p1()' version of files as the merged version.
1695 Uses the local 'p1()' version of files as the merged version.
1696
1696
1697 ":merge"
1697 ":merge"
1698 Uses the internal non-interactive simple merge algorithm for merging
1698 Uses the internal non-interactive simple merge algorithm for merging
1699 files. It will fail if there are any conflicts and leave markers in the
1699 files. It will fail if there are any conflicts and leave markers in the
1700 partially merged file. Markers will have two sections, one for each side
1700 partially merged file. Markers will have two sections, one for each side
1701 of merge.
1701 of merge.
1702
1702
1703 ":merge-local"
1703 ":merge-local"
1704 Like :merge, but resolve all conflicts non-interactively in favor of the
1704 Like :merge, but resolve all conflicts non-interactively in favor of the
1705 local 'p1()' changes.
1705 local 'p1()' changes.
1706
1706
1707 ":merge-other"
1707 ":merge-other"
1708 Like :merge, but resolve all conflicts non-interactively in favor of the
1708 Like :merge, but resolve all conflicts non-interactively in favor of the
1709 other 'p2()' changes.
1709 other 'p2()' changes.
1710
1710
1711 ":merge3"
1711 ":merge3"
1712 Uses the internal non-interactive simple merge algorithm for merging
1712 Uses the internal non-interactive simple merge algorithm for merging
1713 files. It will fail if there are any conflicts and leave markers in the
1713 files. It will fail if there are any conflicts and leave markers in the
1714 partially merged file. Marker will have three sections, one from each
1714 partially merged file. Marker will have three sections, one from each
1715 side of the merge and one for the base content.
1715 side of the merge and one for the base content.
1716
1716
1717 ":other"
1717 ":other"
1718 Uses the other 'p2()' version of files as the merged version.
1718 Uses the other 'p2()' version of files as the merged version.
1719
1719
1720 ":prompt"
1720 ":prompt"
1721 Asks the user which of the local 'p1()' or the other 'p2()' version to
1721 Asks the user which of the local 'p1()' or the other 'p2()' version to
1722 keep as the merged version.
1722 keep as the merged version.
1723
1723
1724 ":tagmerge"
1724 ":tagmerge"
1725 Uses the internal tag merge algorithm (experimental).
1725 Uses the internal tag merge algorithm (experimental).
1726
1726
1727 ":union"
1727 ":union"
1728 Uses the internal non-interactive simple merge algorithm for merging
1728 Uses the internal non-interactive simple merge algorithm for merging
1729 files. It will use both left and right sides for conflict regions. No
1729 files. It will use both left and right sides for conflict regions. No
1730 markers are inserted.
1730 markers are inserted.
1731
1731
1732 Internal tools are always available and do not require a GUI but will by
1732 Internal tools are always available and do not require a GUI but will by
1733 default not handle symlinks or binary files.
1733 default not handle symlinks or binary files.
1734
1734
1735 Choosing a merge tool
1735 Choosing a merge tool
1736 =====================
1736 =====================
1737
1737
1738 Mercurial uses these rules when deciding which merge tool to use:
1738 Mercurial uses these rules when deciding which merge tool to use:
1739
1739
1740 1. If a tool has been specified with the --tool option to merge or
1740 1. If a tool has been specified with the --tool option to merge or
1741 resolve, it is used. If it is the name of a tool in the merge-tools
1741 resolve, it is used. If it is the name of a tool in the merge-tools
1742 configuration, its configuration is used. Otherwise the specified tool
1742 configuration, its configuration is used. Otherwise the specified tool
1743 must be executable by the shell.
1743 must be executable by the shell.
1744 2. If the "HGMERGE" environment variable is present, its value is used and
1744 2. If the "HGMERGE" environment variable is present, its value is used and
1745 must be executable by the shell.
1745 must be executable by the shell.
1746 3. If the filename of the file to be merged matches any of the patterns in
1746 3. If the filename of the file to be merged matches any of the patterns in
1747 the merge-patterns configuration section, the first usable merge tool
1747 the merge-patterns configuration section, the first usable merge tool
1748 corresponding to a matching pattern is used. Here, binary capabilities
1748 corresponding to a matching pattern is used. Here, binary capabilities
1749 of the merge tool are not considered.
1749 of the merge tool are not considered.
1750 4. If ui.merge is set it will be considered next. If the value is not the
1750 4. If ui.merge is set it will be considered next. If the value is not the
1751 name of a configured tool, the specified value is used and must be
1751 name of a configured tool, the specified value is used and must be
1752 executable by the shell. Otherwise the named tool is used if it is
1752 executable by the shell. Otherwise the named tool is used if it is
1753 usable.
1753 usable.
1754 5. If any usable merge tools are present in the merge-tools configuration
1754 5. If any usable merge tools are present in the merge-tools configuration
1755 section, the one with the highest priority is used.
1755 section, the one with the highest priority is used.
1756 6. If a program named "hgmerge" can be found on the system, it is used -
1756 6. If a program named "hgmerge" can be found on the system, it is used -
1757 but it will by default not be used for symlinks and binary files.
1757 but it will by default not be used for symlinks and binary files.
1758 7. If the file to be merged is not binary and is not a symlink, then
1758 7. If the file to be merged is not binary and is not a symlink, then
1759 internal ":merge" is used.
1759 internal ":merge" is used.
1760 8. The merge of the file fails and must be resolved before commit.
1760 8. The merge of the file fails and must be resolved before commit.
1761
1761
1762 Note:
1762 Note:
1763 After selecting a merge program, Mercurial will by default attempt to
1763 After selecting a merge program, Mercurial will by default attempt to
1764 merge the files using a simple merge algorithm first. Only if it
1764 merge the files using a simple merge algorithm first. Only if it
1765 doesn't succeed because of conflicting changes Mercurial will actually
1765 doesn't succeed because of conflicting changes Mercurial will actually
1766 execute the merge program. Whether to use the simple merge algorithm
1766 execute the merge program. Whether to use the simple merge algorithm
1767 first can be controlled by the premerge setting of the merge tool.
1767 first can be controlled by the premerge setting of the merge tool.
1768 Premerge is enabled by default unless the file is binary or a symlink.
1768 Premerge is enabled by default unless the file is binary or a symlink.
1769
1769
1770 See the merge-tools and ui sections of hgrc(5) for details on the
1770 See the merge-tools and ui sections of hgrc(5) for details on the
1771 configuration of merge tools.
1771 configuration of merge tools.
1772
1772
1773 Test usage of section marks in help documents
1773 Test usage of section marks in help documents
1774
1774
1775 $ cd "$TESTDIR"/../doc
1775 $ cd "$TESTDIR"/../doc
1776 $ python check-seclevel.py
1776 $ python check-seclevel.py
1777 $ cd $TESTTMP
1777 $ cd $TESTTMP
1778
1778
1779 #if serve
1779 #if serve
1780
1780
1781 Test the help pages in hgweb.
1781 Test the help pages in hgweb.
1782
1782
1783 Dish up an empty repo; serve it cold.
1783 Dish up an empty repo; serve it cold.
1784
1784
1785 $ hg init "$TESTTMP/test"
1785 $ hg init "$TESTTMP/test"
1786 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
1786 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
1787 $ cat hg.pid >> $DAEMON_PIDS
1787 $ cat hg.pid >> $DAEMON_PIDS
1788
1788
1789 $ get-with-headers.py 127.0.0.1:$HGPORT "help"
1789 $ get-with-headers.py 127.0.0.1:$HGPORT "help"
1790 200 Script output follows
1790 200 Script output follows
1791
1791
1792 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1792 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1793 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1793 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1794 <head>
1794 <head>
1795 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1795 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1796 <meta name="robots" content="index, nofollow" />
1796 <meta name="robots" content="index, nofollow" />
1797 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1797 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1798 <script type="text/javascript" src="/static/mercurial.js"></script>
1798 <script type="text/javascript" src="/static/mercurial.js"></script>
1799
1799
1800 <title>Help: Index</title>
1800 <title>Help: Index</title>
1801 </head>
1801 </head>
1802 <body>
1802 <body>
1803
1803
1804 <div class="container">
1804 <div class="container">
1805 <div class="menu">
1805 <div class="menu">
1806 <div class="logo">
1806 <div class="logo">
1807 <a href="https://mercurial-scm.org/">
1807 <a href="https://mercurial-scm.org/">
1808 <img src="/static/hglogo.png" alt="mercurial" /></a>
1808 <img src="/static/hglogo.png" alt="mercurial" /></a>
1809 </div>
1809 </div>
1810 <ul>
1810 <ul>
1811 <li><a href="/shortlog">log</a></li>
1811 <li><a href="/shortlog">log</a></li>
1812 <li><a href="/graph">graph</a></li>
1812 <li><a href="/graph">graph</a></li>
1813 <li><a href="/tags">tags</a></li>
1813 <li><a href="/tags">tags</a></li>
1814 <li><a href="/bookmarks">bookmarks</a></li>
1814 <li><a href="/bookmarks">bookmarks</a></li>
1815 <li><a href="/branches">branches</a></li>
1815 <li><a href="/branches">branches</a></li>
1816 </ul>
1816 </ul>
1817 <ul>
1817 <ul>
1818 <li class="active">help</li>
1818 <li class="active">help</li>
1819 </ul>
1819 </ul>
1820 </div>
1820 </div>
1821
1821
1822 <div class="main">
1822 <div class="main">
1823 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1823 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1824 <form class="search" action="/log">
1824 <form class="search" action="/log">
1825
1825
1826 <p><input name="rev" id="search1" type="text" size="30" /></p>
1826 <p><input name="rev" id="search1" type="text" size="30" /></p>
1827 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1827 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1828 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1828 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1829 </form>
1829 </form>
1830 <table class="bigtable">
1830 <table class="bigtable">
1831 <tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr>
1831 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
1832
1832
1833 <tr><td>
1833 <tr><td>
1834 <a href="/help/config">
1834 <a href="/help/config">
1835 config
1835 config
1836 </a>
1836 </a>
1837 </td><td>
1837 </td><td>
1838 Configuration Files
1838 Configuration Files
1839 </td></tr>
1839 </td></tr>
1840 <tr><td>
1840 <tr><td>
1841 <a href="/help/dates">
1841 <a href="/help/dates">
1842 dates
1842 dates
1843 </a>
1843 </a>
1844 </td><td>
1844 </td><td>
1845 Date Formats
1845 Date Formats
1846 </td></tr>
1846 </td></tr>
1847 <tr><td>
1847 <tr><td>
1848 <a href="/help/diffs">
1848 <a href="/help/diffs">
1849 diffs
1849 diffs
1850 </a>
1850 </a>
1851 </td><td>
1851 </td><td>
1852 Diff Formats
1852 Diff Formats
1853 </td></tr>
1853 </td></tr>
1854 <tr><td>
1854 <tr><td>
1855 <a href="/help/environment">
1855 <a href="/help/environment">
1856 environment
1856 environment
1857 </a>
1857 </a>
1858 </td><td>
1858 </td><td>
1859 Environment Variables
1859 Environment Variables
1860 </td></tr>
1860 </td></tr>
1861 <tr><td>
1861 <tr><td>
1862 <a href="/help/extensions">
1862 <a href="/help/extensions">
1863 extensions
1863 extensions
1864 </a>
1864 </a>
1865 </td><td>
1865 </td><td>
1866 Using Additional Features
1866 Using Additional Features
1867 </td></tr>
1867 </td></tr>
1868 <tr><td>
1868 <tr><td>
1869 <a href="/help/filesets">
1869 <a href="/help/filesets">
1870 filesets
1870 filesets
1871 </a>
1871 </a>
1872 </td><td>
1872 </td><td>
1873 Specifying File Sets
1873 Specifying File Sets
1874 </td></tr>
1874 </td></tr>
1875 <tr><td>
1875 <tr><td>
1876 <a href="/help/glossary">
1876 <a href="/help/glossary">
1877 glossary
1877 glossary
1878 </a>
1878 </a>
1879 </td><td>
1879 </td><td>
1880 Glossary
1880 Glossary
1881 </td></tr>
1881 </td></tr>
1882 <tr><td>
1882 <tr><td>
1883 <a href="/help/hgignore">
1883 <a href="/help/hgignore">
1884 hgignore
1884 hgignore
1885 </a>
1885 </a>
1886 </td><td>
1886 </td><td>
1887 Syntax for Mercurial Ignore Files
1887 Syntax for Mercurial Ignore Files
1888 </td></tr>
1888 </td></tr>
1889 <tr><td>
1889 <tr><td>
1890 <a href="/help/hgweb">
1890 <a href="/help/hgweb">
1891 hgweb
1891 hgweb
1892 </a>
1892 </a>
1893 </td><td>
1893 </td><td>
1894 Configuring hgweb
1894 Configuring hgweb
1895 </td></tr>
1895 </td></tr>
1896 <tr><td>
1896 <tr><td>
1897 <a href="/help/internals">
1897 <a href="/help/internals">
1898 internals
1898 internals
1899 </a>
1899 </a>
1900 </td><td>
1900 </td><td>
1901 Technical implementation topics
1901 Technical implementation topics
1902 </td></tr>
1902 </td></tr>
1903 <tr><td>
1903 <tr><td>
1904 <a href="/help/merge-tools">
1904 <a href="/help/merge-tools">
1905 merge-tools
1905 merge-tools
1906 </a>
1906 </a>
1907 </td><td>
1907 </td><td>
1908 Merge Tools
1908 Merge Tools
1909 </td></tr>
1909 </td></tr>
1910 <tr><td>
1910 <tr><td>
1911 <a href="/help/multirevs">
1911 <a href="/help/multirevs">
1912 multirevs
1912 multirevs
1913 </a>
1913 </a>
1914 </td><td>
1914 </td><td>
1915 Specifying Multiple Revisions
1915 Specifying Multiple Revisions
1916 </td></tr>
1916 </td></tr>
1917 <tr><td>
1917 <tr><td>
1918 <a href="/help/patterns">
1918 <a href="/help/patterns">
1919 patterns
1919 patterns
1920 </a>
1920 </a>
1921 </td><td>
1921 </td><td>
1922 File Name Patterns
1922 File Name Patterns
1923 </td></tr>
1923 </td></tr>
1924 <tr><td>
1924 <tr><td>
1925 <a href="/help/phases">
1925 <a href="/help/phases">
1926 phases
1926 phases
1927 </a>
1927 </a>
1928 </td><td>
1928 </td><td>
1929 Working with Phases
1929 Working with Phases
1930 </td></tr>
1930 </td></tr>
1931 <tr><td>
1931 <tr><td>
1932 <a href="/help/revisions">
1932 <a href="/help/revisions">
1933 revisions
1933 revisions
1934 </a>
1934 </a>
1935 </td><td>
1935 </td><td>
1936 Specifying Single Revisions
1936 Specifying Single Revisions
1937 </td></tr>
1937 </td></tr>
1938 <tr><td>
1938 <tr><td>
1939 <a href="/help/revsets">
1939 <a href="/help/revsets">
1940 revsets
1940 revsets
1941 </a>
1941 </a>
1942 </td><td>
1942 </td><td>
1943 Specifying Revision Sets
1943 Specifying Revision Sets
1944 </td></tr>
1944 </td></tr>
1945 <tr><td>
1945 <tr><td>
1946 <a href="/help/scripting">
1946 <a href="/help/scripting">
1947 scripting
1947 scripting
1948 </a>
1948 </a>
1949 </td><td>
1949 </td><td>
1950 Using Mercurial from scripts and automation
1950 Using Mercurial from scripts and automation
1951 </td></tr>
1951 </td></tr>
1952 <tr><td>
1952 <tr><td>
1953 <a href="/help/subrepos">
1953 <a href="/help/subrepos">
1954 subrepos
1954 subrepos
1955 </a>
1955 </a>
1956 </td><td>
1956 </td><td>
1957 Subrepositories
1957 Subrepositories
1958 </td></tr>
1958 </td></tr>
1959 <tr><td>
1959 <tr><td>
1960 <a href="/help/templating">
1960 <a href="/help/templating">
1961 templating
1961 templating
1962 </a>
1962 </a>
1963 </td><td>
1963 </td><td>
1964 Template Usage
1964 Template Usage
1965 </td></tr>
1965 </td></tr>
1966 <tr><td>
1966 <tr><td>
1967 <a href="/help/urls">
1967 <a href="/help/urls">
1968 urls
1968 urls
1969 </a>
1969 </a>
1970 </td><td>
1970 </td><td>
1971 URL Paths
1971 URL Paths
1972 </td></tr>
1972 </td></tr>
1973 <tr><td>
1973 <tr><td>
1974 <a href="/help/topic-containing-verbose">
1974 <a href="/help/topic-containing-verbose">
1975 topic-containing-verbose
1975 topic-containing-verbose
1976 </a>
1976 </a>
1977 </td><td>
1977 </td><td>
1978 This is the topic to test omit indicating.
1978 This is the topic to test omit indicating.
1979 </td></tr>
1979 </td></tr>
1980
1980
1981
1981
1982 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
1982 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
1983
1983
1984 <tr><td>
1984 <tr><td>
1985 <a href="/help/add">
1985 <a href="/help/add">
1986 add
1986 add
1987 </a>
1987 </a>
1988 </td><td>
1988 </td><td>
1989 add the specified files on the next commit
1989 add the specified files on the next commit
1990 </td></tr>
1990 </td></tr>
1991 <tr><td>
1991 <tr><td>
1992 <a href="/help/annotate">
1992 <a href="/help/annotate">
1993 annotate
1993 annotate
1994 </a>
1994 </a>
1995 </td><td>
1995 </td><td>
1996 show changeset information by line for each file
1996 show changeset information by line for each file
1997 </td></tr>
1997 </td></tr>
1998 <tr><td>
1998 <tr><td>
1999 <a href="/help/clone">
1999 <a href="/help/clone">
2000 clone
2000 clone
2001 </a>
2001 </a>
2002 </td><td>
2002 </td><td>
2003 make a copy of an existing repository
2003 make a copy of an existing repository
2004 </td></tr>
2004 </td></tr>
2005 <tr><td>
2005 <tr><td>
2006 <a href="/help/commit">
2006 <a href="/help/commit">
2007 commit
2007 commit
2008 </a>
2008 </a>
2009 </td><td>
2009 </td><td>
2010 commit the specified files or all outstanding changes
2010 commit the specified files or all outstanding changes
2011 </td></tr>
2011 </td></tr>
2012 <tr><td>
2012 <tr><td>
2013 <a href="/help/diff">
2013 <a href="/help/diff">
2014 diff
2014 diff
2015 </a>
2015 </a>
2016 </td><td>
2016 </td><td>
2017 diff repository (or selected files)
2017 diff repository (or selected files)
2018 </td></tr>
2018 </td></tr>
2019 <tr><td>
2019 <tr><td>
2020 <a href="/help/export">
2020 <a href="/help/export">
2021 export
2021 export
2022 </a>
2022 </a>
2023 </td><td>
2023 </td><td>
2024 dump the header and diffs for one or more changesets
2024 dump the header and diffs for one or more changesets
2025 </td></tr>
2025 </td></tr>
2026 <tr><td>
2026 <tr><td>
2027 <a href="/help/forget">
2027 <a href="/help/forget">
2028 forget
2028 forget
2029 </a>
2029 </a>
2030 </td><td>
2030 </td><td>
2031 forget the specified files on the next commit
2031 forget the specified files on the next commit
2032 </td></tr>
2032 </td></tr>
2033 <tr><td>
2033 <tr><td>
2034 <a href="/help/init">
2034 <a href="/help/init">
2035 init
2035 init
2036 </a>
2036 </a>
2037 </td><td>
2037 </td><td>
2038 create a new repository in the given directory
2038 create a new repository in the given directory
2039 </td></tr>
2039 </td></tr>
2040 <tr><td>
2040 <tr><td>
2041 <a href="/help/log">
2041 <a href="/help/log">
2042 log
2042 log
2043 </a>
2043 </a>
2044 </td><td>
2044 </td><td>
2045 show revision history of entire repository or files
2045 show revision history of entire repository or files
2046 </td></tr>
2046 </td></tr>
2047 <tr><td>
2047 <tr><td>
2048 <a href="/help/merge">
2048 <a href="/help/merge">
2049 merge
2049 merge
2050 </a>
2050 </a>
2051 </td><td>
2051 </td><td>
2052 merge another revision into working directory
2052 merge another revision into working directory
2053 </td></tr>
2053 </td></tr>
2054 <tr><td>
2054 <tr><td>
2055 <a href="/help/pull">
2055 <a href="/help/pull">
2056 pull
2056 pull
2057 </a>
2057 </a>
2058 </td><td>
2058 </td><td>
2059 pull changes from the specified source
2059 pull changes from the specified source
2060 </td></tr>
2060 </td></tr>
2061 <tr><td>
2061 <tr><td>
2062 <a href="/help/push">
2062 <a href="/help/push">
2063 push
2063 push
2064 </a>
2064 </a>
2065 </td><td>
2065 </td><td>
2066 push changes to the specified destination
2066 push changes to the specified destination
2067 </td></tr>
2067 </td></tr>
2068 <tr><td>
2068 <tr><td>
2069 <a href="/help/remove">
2069 <a href="/help/remove">
2070 remove
2070 remove
2071 </a>
2071 </a>
2072 </td><td>
2072 </td><td>
2073 remove the specified files on the next commit
2073 remove the specified files on the next commit
2074 </td></tr>
2074 </td></tr>
2075 <tr><td>
2075 <tr><td>
2076 <a href="/help/serve">
2076 <a href="/help/serve">
2077 serve
2077 serve
2078 </a>
2078 </a>
2079 </td><td>
2079 </td><td>
2080 start stand-alone webserver
2080 start stand-alone webserver
2081 </td></tr>
2081 </td></tr>
2082 <tr><td>
2082 <tr><td>
2083 <a href="/help/status">
2083 <a href="/help/status">
2084 status
2084 status
2085 </a>
2085 </a>
2086 </td><td>
2086 </td><td>
2087 show changed files in the working directory
2087 show changed files in the working directory
2088 </td></tr>
2088 </td></tr>
2089 <tr><td>
2089 <tr><td>
2090 <a href="/help/summary">
2090 <a href="/help/summary">
2091 summary
2091 summary
2092 </a>
2092 </a>
2093 </td><td>
2093 </td><td>
2094 summarize working directory state
2094 summarize working directory state
2095 </td></tr>
2095 </td></tr>
2096 <tr><td>
2096 <tr><td>
2097 <a href="/help/update">
2097 <a href="/help/update">
2098 update
2098 update
2099 </a>
2099 </a>
2100 </td><td>
2100 </td><td>
2101 update working directory (or switch revisions)
2101 update working directory (or switch revisions)
2102 </td></tr>
2102 </td></tr>
2103
2103
2104
2104
2105
2105
2106 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
2106 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
2107
2107
2108 <tr><td>
2108 <tr><td>
2109 <a href="/help/addremove">
2109 <a href="/help/addremove">
2110 addremove
2110 addremove
2111 </a>
2111 </a>
2112 </td><td>
2112 </td><td>
2113 add all new files, delete all missing files
2113 add all new files, delete all missing files
2114 </td></tr>
2114 </td></tr>
2115 <tr><td>
2115 <tr><td>
2116 <a href="/help/archive">
2116 <a href="/help/archive">
2117 archive
2117 archive
2118 </a>
2118 </a>
2119 </td><td>
2119 </td><td>
2120 create an unversioned archive of a repository revision
2120 create an unversioned archive of a repository revision
2121 </td></tr>
2121 </td></tr>
2122 <tr><td>
2122 <tr><td>
2123 <a href="/help/backout">
2123 <a href="/help/backout">
2124 backout
2124 backout
2125 </a>
2125 </a>
2126 </td><td>
2126 </td><td>
2127 reverse effect of earlier changeset
2127 reverse effect of earlier changeset
2128 </td></tr>
2128 </td></tr>
2129 <tr><td>
2129 <tr><td>
2130 <a href="/help/bisect">
2130 <a href="/help/bisect">
2131 bisect
2131 bisect
2132 </a>
2132 </a>
2133 </td><td>
2133 </td><td>
2134 subdivision search of changesets
2134 subdivision search of changesets
2135 </td></tr>
2135 </td></tr>
2136 <tr><td>
2136 <tr><td>
2137 <a href="/help/bookmarks">
2137 <a href="/help/bookmarks">
2138 bookmarks
2138 bookmarks
2139 </a>
2139 </a>
2140 </td><td>
2140 </td><td>
2141 create a new bookmark or list existing bookmarks
2141 create a new bookmark or list existing bookmarks
2142 </td></tr>
2142 </td></tr>
2143 <tr><td>
2143 <tr><td>
2144 <a href="/help/branch">
2144 <a href="/help/branch">
2145 branch
2145 branch
2146 </a>
2146 </a>
2147 </td><td>
2147 </td><td>
2148 set or show the current branch name
2148 set or show the current branch name
2149 </td></tr>
2149 </td></tr>
2150 <tr><td>
2150 <tr><td>
2151 <a href="/help/branches">
2151 <a href="/help/branches">
2152 branches
2152 branches
2153 </a>
2153 </a>
2154 </td><td>
2154 </td><td>
2155 list repository named branches
2155 list repository named branches
2156 </td></tr>
2156 </td></tr>
2157 <tr><td>
2157 <tr><td>
2158 <a href="/help/bundle">
2158 <a href="/help/bundle">
2159 bundle
2159 bundle
2160 </a>
2160 </a>
2161 </td><td>
2161 </td><td>
2162 create a changegroup file
2162 create a changegroup file
2163 </td></tr>
2163 </td></tr>
2164 <tr><td>
2164 <tr><td>
2165 <a href="/help/cat">
2165 <a href="/help/cat">
2166 cat
2166 cat
2167 </a>
2167 </a>
2168 </td><td>
2168 </td><td>
2169 output the current or given revision of files
2169 output the current or given revision of files
2170 </td></tr>
2170 </td></tr>
2171 <tr><td>
2171 <tr><td>
2172 <a href="/help/config">
2172 <a href="/help/config">
2173 config
2173 config
2174 </a>
2174 </a>
2175 </td><td>
2175 </td><td>
2176 show combined config settings from all hgrc files
2176 show combined config settings from all hgrc files
2177 </td></tr>
2177 </td></tr>
2178 <tr><td>
2178 <tr><td>
2179 <a href="/help/copy">
2179 <a href="/help/copy">
2180 copy
2180 copy
2181 </a>
2181 </a>
2182 </td><td>
2182 </td><td>
2183 mark files as copied for the next commit
2183 mark files as copied for the next commit
2184 </td></tr>
2184 </td></tr>
2185 <tr><td>
2185 <tr><td>
2186 <a href="/help/files">
2186 <a href="/help/files">
2187 files
2187 files
2188 </a>
2188 </a>
2189 </td><td>
2189 </td><td>
2190 list tracked files
2190 list tracked files
2191 </td></tr>
2191 </td></tr>
2192 <tr><td>
2192 <tr><td>
2193 <a href="/help/graft">
2193 <a href="/help/graft">
2194 graft
2194 graft
2195 </a>
2195 </a>
2196 </td><td>
2196 </td><td>
2197 copy changes from other branches onto the current branch
2197 copy changes from other branches onto the current branch
2198 </td></tr>
2198 </td></tr>
2199 <tr><td>
2199 <tr><td>
2200 <a href="/help/grep">
2200 <a href="/help/grep">
2201 grep
2201 grep
2202 </a>
2202 </a>
2203 </td><td>
2203 </td><td>
2204 search for a pattern in specified files and revisions
2204 search for a pattern in specified files and revisions
2205 </td></tr>
2205 </td></tr>
2206 <tr><td>
2206 <tr><td>
2207 <a href="/help/heads">
2207 <a href="/help/heads">
2208 heads
2208 heads
2209 </a>
2209 </a>
2210 </td><td>
2210 </td><td>
2211 show branch heads
2211 show branch heads
2212 </td></tr>
2212 </td></tr>
2213 <tr><td>
2213 <tr><td>
2214 <a href="/help/help">
2214 <a href="/help/help">
2215 help
2215 help
2216 </a>
2216 </a>
2217 </td><td>
2217 </td><td>
2218 show help for a given topic or a help overview
2218 show help for a given topic or a help overview
2219 </td></tr>
2219 </td></tr>
2220 <tr><td>
2220 <tr><td>
2221 <a href="/help/hgalias">
2221 <a href="/help/hgalias">
2222 hgalias
2222 hgalias
2223 </a>
2223 </a>
2224 </td><td>
2224 </td><td>
2225 summarize working directory state
2225 summarize working directory state
2226 </td></tr>
2226 </td></tr>
2227 <tr><td>
2227 <tr><td>
2228 <a href="/help/identify">
2228 <a href="/help/identify">
2229 identify
2229 identify
2230 </a>
2230 </a>
2231 </td><td>
2231 </td><td>
2232 identify the working directory or specified revision
2232 identify the working directory or specified revision
2233 </td></tr>
2233 </td></tr>
2234 <tr><td>
2234 <tr><td>
2235 <a href="/help/import">
2235 <a href="/help/import">
2236 import
2236 import
2237 </a>
2237 </a>
2238 </td><td>
2238 </td><td>
2239 import an ordered set of patches
2239 import an ordered set of patches
2240 </td></tr>
2240 </td></tr>
2241 <tr><td>
2241 <tr><td>
2242 <a href="/help/incoming">
2242 <a href="/help/incoming">
2243 incoming
2243 incoming
2244 </a>
2244 </a>
2245 </td><td>
2245 </td><td>
2246 show new changesets found in source
2246 show new changesets found in source
2247 </td></tr>
2247 </td></tr>
2248 <tr><td>
2248 <tr><td>
2249 <a href="/help/manifest">
2249 <a href="/help/manifest">
2250 manifest
2250 manifest
2251 </a>
2251 </a>
2252 </td><td>
2252 </td><td>
2253 output the current or given revision of the project manifest
2253 output the current or given revision of the project manifest
2254 </td></tr>
2254 </td></tr>
2255 <tr><td>
2255 <tr><td>
2256 <a href="/help/nohelp">
2256 <a href="/help/nohelp">
2257 nohelp
2257 nohelp
2258 </a>
2258 </a>
2259 </td><td>
2259 </td><td>
2260 (no help text available)
2260 (no help text available)
2261 </td></tr>
2261 </td></tr>
2262 <tr><td>
2262 <tr><td>
2263 <a href="/help/outgoing">
2263 <a href="/help/outgoing">
2264 outgoing
2264 outgoing
2265 </a>
2265 </a>
2266 </td><td>
2266 </td><td>
2267 show changesets not found in the destination
2267 show changesets not found in the destination
2268 </td></tr>
2268 </td></tr>
2269 <tr><td>
2269 <tr><td>
2270 <a href="/help/paths">
2270 <a href="/help/paths">
2271 paths
2271 paths
2272 </a>
2272 </a>
2273 </td><td>
2273 </td><td>
2274 show aliases for remote repositories
2274 show aliases for remote repositories
2275 </td></tr>
2275 </td></tr>
2276 <tr><td>
2276 <tr><td>
2277 <a href="/help/phase">
2277 <a href="/help/phase">
2278 phase
2278 phase
2279 </a>
2279 </a>
2280 </td><td>
2280 </td><td>
2281 set or show the current phase name
2281 set or show the current phase name
2282 </td></tr>
2282 </td></tr>
2283 <tr><td>
2283 <tr><td>
2284 <a href="/help/recover">
2284 <a href="/help/recover">
2285 recover
2285 recover
2286 </a>
2286 </a>
2287 </td><td>
2287 </td><td>
2288 roll back an interrupted transaction
2288 roll back an interrupted transaction
2289 </td></tr>
2289 </td></tr>
2290 <tr><td>
2290 <tr><td>
2291 <a href="/help/rename">
2291 <a href="/help/rename">
2292 rename
2292 rename
2293 </a>
2293 </a>
2294 </td><td>
2294 </td><td>
2295 rename files; equivalent of copy + remove
2295 rename files; equivalent of copy + remove
2296 </td></tr>
2296 </td></tr>
2297 <tr><td>
2297 <tr><td>
2298 <a href="/help/resolve">
2298 <a href="/help/resolve">
2299 resolve
2299 resolve
2300 </a>
2300 </a>
2301 </td><td>
2301 </td><td>
2302 redo merges or set/view the merge status of files
2302 redo merges or set/view the merge status of files
2303 </td></tr>
2303 </td></tr>
2304 <tr><td>
2304 <tr><td>
2305 <a href="/help/revert">
2305 <a href="/help/revert">
2306 revert
2306 revert
2307 </a>
2307 </a>
2308 </td><td>
2308 </td><td>
2309 restore files to their checkout state
2309 restore files to their checkout state
2310 </td></tr>
2310 </td></tr>
2311 <tr><td>
2311 <tr><td>
2312 <a href="/help/root">
2312 <a href="/help/root">
2313 root
2313 root
2314 </a>
2314 </a>
2315 </td><td>
2315 </td><td>
2316 print the root (top) of the current working directory
2316 print the root (top) of the current working directory
2317 </td></tr>
2317 </td></tr>
2318 <tr><td>
2318 <tr><td>
2319 <a href="/help/shellalias">
2319 <a href="/help/shellalias">
2320 shellalias
2320 shellalias
2321 </a>
2321 </a>
2322 </td><td>
2322 </td><td>
2323 (no help text available)
2323 (no help text available)
2324 </td></tr>
2324 </td></tr>
2325 <tr><td>
2325 <tr><td>
2326 <a href="/help/tag">
2326 <a href="/help/tag">
2327 tag
2327 tag
2328 </a>
2328 </a>
2329 </td><td>
2329 </td><td>
2330 add one or more tags for the current or given revision
2330 add one or more tags for the current or given revision
2331 </td></tr>
2331 </td></tr>
2332 <tr><td>
2332 <tr><td>
2333 <a href="/help/tags">
2333 <a href="/help/tags">
2334 tags
2334 tags
2335 </a>
2335 </a>
2336 </td><td>
2336 </td><td>
2337 list repository tags
2337 list repository tags
2338 </td></tr>
2338 </td></tr>
2339 <tr><td>
2339 <tr><td>
2340 <a href="/help/unbundle">
2340 <a href="/help/unbundle">
2341 unbundle
2341 unbundle
2342 </a>
2342 </a>
2343 </td><td>
2343 </td><td>
2344 apply one or more changegroup files
2344 apply one or more changegroup files
2345 </td></tr>
2345 </td></tr>
2346 <tr><td>
2346 <tr><td>
2347 <a href="/help/verify">
2347 <a href="/help/verify">
2348 verify
2348 verify
2349 </a>
2349 </a>
2350 </td><td>
2350 </td><td>
2351 verify the integrity of the repository
2351 verify the integrity of the repository
2352 </td></tr>
2352 </td></tr>
2353 <tr><td>
2353 <tr><td>
2354 <a href="/help/version">
2354 <a href="/help/version">
2355 version
2355 version
2356 </a>
2356 </a>
2357 </td><td>
2357 </td><td>
2358 output version and copyright information
2358 output version and copyright information
2359 </td></tr>
2359 </td></tr>
2360
2360
2361
2361
2362 </table>
2362 </table>
2363 </div>
2363 </div>
2364 </div>
2364 </div>
2365
2365
2366 <script type="text/javascript">process_dates()</script>
2366 <script type="text/javascript">process_dates()</script>
2367
2367
2368
2368
2369 </body>
2369 </body>
2370 </html>
2370 </html>
2371
2371
2372
2372
2373 $ get-with-headers.py 127.0.0.1:$HGPORT "help/add"
2373 $ get-with-headers.py 127.0.0.1:$HGPORT "help/add"
2374 200 Script output follows
2374 200 Script output follows
2375
2375
2376 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2376 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2377 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2377 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2378 <head>
2378 <head>
2379 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2379 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2380 <meta name="robots" content="index, nofollow" />
2380 <meta name="robots" content="index, nofollow" />
2381 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2381 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2382 <script type="text/javascript" src="/static/mercurial.js"></script>
2382 <script type="text/javascript" src="/static/mercurial.js"></script>
2383
2383
2384 <title>Help: add</title>
2384 <title>Help: add</title>
2385 </head>
2385 </head>
2386 <body>
2386 <body>
2387
2387
2388 <div class="container">
2388 <div class="container">
2389 <div class="menu">
2389 <div class="menu">
2390 <div class="logo">
2390 <div class="logo">
2391 <a href="https://mercurial-scm.org/">
2391 <a href="https://mercurial-scm.org/">
2392 <img src="/static/hglogo.png" alt="mercurial" /></a>
2392 <img src="/static/hglogo.png" alt="mercurial" /></a>
2393 </div>
2393 </div>
2394 <ul>
2394 <ul>
2395 <li><a href="/shortlog">log</a></li>
2395 <li><a href="/shortlog">log</a></li>
2396 <li><a href="/graph">graph</a></li>
2396 <li><a href="/graph">graph</a></li>
2397 <li><a href="/tags">tags</a></li>
2397 <li><a href="/tags">tags</a></li>
2398 <li><a href="/bookmarks">bookmarks</a></li>
2398 <li><a href="/bookmarks">bookmarks</a></li>
2399 <li><a href="/branches">branches</a></li>
2399 <li><a href="/branches">branches</a></li>
2400 </ul>
2400 </ul>
2401 <ul>
2401 <ul>
2402 <li class="active"><a href="/help">help</a></li>
2402 <li class="active"><a href="/help">help</a></li>
2403 </ul>
2403 </ul>
2404 </div>
2404 </div>
2405
2405
2406 <div class="main">
2406 <div class="main">
2407 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2407 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2408 <h3>Help: add</h3>
2408 <h3>Help: add</h3>
2409
2409
2410 <form class="search" action="/log">
2410 <form class="search" action="/log">
2411
2411
2412 <p><input name="rev" id="search1" type="text" size="30" /></p>
2412 <p><input name="rev" id="search1" type="text" size="30" /></p>
2413 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2413 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2414 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2414 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2415 </form>
2415 </form>
2416 <div id="doc">
2416 <div id="doc">
2417 <p>
2417 <p>
2418 hg add [OPTION]... [FILE]...
2418 hg add [OPTION]... [FILE]...
2419 </p>
2419 </p>
2420 <p>
2420 <p>
2421 add the specified files on the next commit
2421 add the specified files on the next commit
2422 </p>
2422 </p>
2423 <p>
2423 <p>
2424 Schedule files to be version controlled and added to the
2424 Schedule files to be version controlled and added to the
2425 repository.
2425 repository.
2426 </p>
2426 </p>
2427 <p>
2427 <p>
2428 The files will be added to the repository at the next commit. To
2428 The files will be added to the repository at the next commit. To
2429 undo an add before that, see 'hg forget'.
2429 undo an add before that, see 'hg forget'.
2430 </p>
2430 </p>
2431 <p>
2431 <p>
2432 If no names are given, add all files to the repository (except
2432 If no names are given, add all files to the repository (except
2433 files matching &quot;.hgignore&quot;).
2433 files matching &quot;.hgignore&quot;).
2434 </p>
2434 </p>
2435 <p>
2435 <p>
2436 Examples:
2436 Examples:
2437 </p>
2437 </p>
2438 <ul>
2438 <ul>
2439 <li> New (unknown) files are added automatically by 'hg add':
2439 <li> New (unknown) files are added automatically by 'hg add':
2440 <pre>
2440 <pre>
2441 \$ ls (re)
2441 \$ ls (re)
2442 foo.c
2442 foo.c
2443 \$ hg status (re)
2443 \$ hg status (re)
2444 ? foo.c
2444 ? foo.c
2445 \$ hg add (re)
2445 \$ hg add (re)
2446 adding foo.c
2446 adding foo.c
2447 \$ hg status (re)
2447 \$ hg status (re)
2448 A foo.c
2448 A foo.c
2449 </pre>
2449 </pre>
2450 <li> Specific files to be added can be specified:
2450 <li> Specific files to be added can be specified:
2451 <pre>
2451 <pre>
2452 \$ ls (re)
2452 \$ ls (re)
2453 bar.c foo.c
2453 bar.c foo.c
2454 \$ hg status (re)
2454 \$ hg status (re)
2455 ? bar.c
2455 ? bar.c
2456 ? foo.c
2456 ? foo.c
2457 \$ hg add bar.c (re)
2457 \$ hg add bar.c (re)
2458 \$ hg status (re)
2458 \$ hg status (re)
2459 A bar.c
2459 A bar.c
2460 ? foo.c
2460 ? foo.c
2461 </pre>
2461 </pre>
2462 </ul>
2462 </ul>
2463 <p>
2463 <p>
2464 Returns 0 if all files are successfully added.
2464 Returns 0 if all files are successfully added.
2465 </p>
2465 </p>
2466 <p>
2466 <p>
2467 options ([+] can be repeated):
2467 options ([+] can be repeated):
2468 </p>
2468 </p>
2469 <table>
2469 <table>
2470 <tr><td>-I</td>
2470 <tr><td>-I</td>
2471 <td>--include PATTERN [+]</td>
2471 <td>--include PATTERN [+]</td>
2472 <td>include names matching the given patterns</td></tr>
2472 <td>include names matching the given patterns</td></tr>
2473 <tr><td>-X</td>
2473 <tr><td>-X</td>
2474 <td>--exclude PATTERN [+]</td>
2474 <td>--exclude PATTERN [+]</td>
2475 <td>exclude names matching the given patterns</td></tr>
2475 <td>exclude names matching the given patterns</td></tr>
2476 <tr><td>-S</td>
2476 <tr><td>-S</td>
2477 <td>--subrepos</td>
2477 <td>--subrepos</td>
2478 <td>recurse into subrepositories</td></tr>
2478 <td>recurse into subrepositories</td></tr>
2479 <tr><td>-n</td>
2479 <tr><td>-n</td>
2480 <td>--dry-run</td>
2480 <td>--dry-run</td>
2481 <td>do not perform actions, just print output</td></tr>
2481 <td>do not perform actions, just print output</td></tr>
2482 </table>
2482 </table>
2483 <p>
2483 <p>
2484 global options ([+] can be repeated):
2484 global options ([+] can be repeated):
2485 </p>
2485 </p>
2486 <table>
2486 <table>
2487 <tr><td>-R</td>
2487 <tr><td>-R</td>
2488 <td>--repository REPO</td>
2488 <td>--repository REPO</td>
2489 <td>repository root directory or name of overlay bundle file</td></tr>
2489 <td>repository root directory or name of overlay bundle file</td></tr>
2490 <tr><td></td>
2490 <tr><td></td>
2491 <td>--cwd DIR</td>
2491 <td>--cwd DIR</td>
2492 <td>change working directory</td></tr>
2492 <td>change working directory</td></tr>
2493 <tr><td>-y</td>
2493 <tr><td>-y</td>
2494 <td>--noninteractive</td>
2494 <td>--noninteractive</td>
2495 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2495 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2496 <tr><td>-q</td>
2496 <tr><td>-q</td>
2497 <td>--quiet</td>
2497 <td>--quiet</td>
2498 <td>suppress output</td></tr>
2498 <td>suppress output</td></tr>
2499 <tr><td>-v</td>
2499 <tr><td>-v</td>
2500 <td>--verbose</td>
2500 <td>--verbose</td>
2501 <td>enable additional output</td></tr>
2501 <td>enable additional output</td></tr>
2502 <tr><td></td>
2502 <tr><td></td>
2503 <td>--config CONFIG [+]</td>
2503 <td>--config CONFIG [+]</td>
2504 <td>set/override config option (use 'section.name=value')</td></tr>
2504 <td>set/override config option (use 'section.name=value')</td></tr>
2505 <tr><td></td>
2505 <tr><td></td>
2506 <td>--debug</td>
2506 <td>--debug</td>
2507 <td>enable debugging output</td></tr>
2507 <td>enable debugging output</td></tr>
2508 <tr><td></td>
2508 <tr><td></td>
2509 <td>--debugger</td>
2509 <td>--debugger</td>
2510 <td>start debugger</td></tr>
2510 <td>start debugger</td></tr>
2511 <tr><td></td>
2511 <tr><td></td>
2512 <td>--encoding ENCODE</td>
2512 <td>--encoding ENCODE</td>
2513 <td>set the charset encoding (default: ascii)</td></tr>
2513 <td>set the charset encoding (default: ascii)</td></tr>
2514 <tr><td></td>
2514 <tr><td></td>
2515 <td>--encodingmode MODE</td>
2515 <td>--encodingmode MODE</td>
2516 <td>set the charset encoding mode (default: strict)</td></tr>
2516 <td>set the charset encoding mode (default: strict)</td></tr>
2517 <tr><td></td>
2517 <tr><td></td>
2518 <td>--traceback</td>
2518 <td>--traceback</td>
2519 <td>always print a traceback on exception</td></tr>
2519 <td>always print a traceback on exception</td></tr>
2520 <tr><td></td>
2520 <tr><td></td>
2521 <td>--time</td>
2521 <td>--time</td>
2522 <td>time how long the command takes</td></tr>
2522 <td>time how long the command takes</td></tr>
2523 <tr><td></td>
2523 <tr><td></td>
2524 <td>--profile</td>
2524 <td>--profile</td>
2525 <td>print command execution profile</td></tr>
2525 <td>print command execution profile</td></tr>
2526 <tr><td></td>
2526 <tr><td></td>
2527 <td>--version</td>
2527 <td>--version</td>
2528 <td>output version information and exit</td></tr>
2528 <td>output version information and exit</td></tr>
2529 <tr><td>-h</td>
2529 <tr><td>-h</td>
2530 <td>--help</td>
2530 <td>--help</td>
2531 <td>display help and exit</td></tr>
2531 <td>display help and exit</td></tr>
2532 <tr><td></td>
2532 <tr><td></td>
2533 <td>--hidden</td>
2533 <td>--hidden</td>
2534 <td>consider hidden changesets</td></tr>
2534 <td>consider hidden changesets</td></tr>
2535 </table>
2535 </table>
2536
2536
2537 </div>
2537 </div>
2538 </div>
2538 </div>
2539 </div>
2539 </div>
2540
2540
2541 <script type="text/javascript">process_dates()</script>
2541 <script type="text/javascript">process_dates()</script>
2542
2542
2543
2543
2544 </body>
2544 </body>
2545 </html>
2545 </html>
2546
2546
2547
2547
2548 $ get-with-headers.py 127.0.0.1:$HGPORT "help/remove"
2548 $ get-with-headers.py 127.0.0.1:$HGPORT "help/remove"
2549 200 Script output follows
2549 200 Script output follows
2550
2550
2551 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2551 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2552 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2552 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2553 <head>
2553 <head>
2554 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2554 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2555 <meta name="robots" content="index, nofollow" />
2555 <meta name="robots" content="index, nofollow" />
2556 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2556 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2557 <script type="text/javascript" src="/static/mercurial.js"></script>
2557 <script type="text/javascript" src="/static/mercurial.js"></script>
2558
2558
2559 <title>Help: remove</title>
2559 <title>Help: remove</title>
2560 </head>
2560 </head>
2561 <body>
2561 <body>
2562
2562
2563 <div class="container">
2563 <div class="container">
2564 <div class="menu">
2564 <div class="menu">
2565 <div class="logo">
2565 <div class="logo">
2566 <a href="https://mercurial-scm.org/">
2566 <a href="https://mercurial-scm.org/">
2567 <img src="/static/hglogo.png" alt="mercurial" /></a>
2567 <img src="/static/hglogo.png" alt="mercurial" /></a>
2568 </div>
2568 </div>
2569 <ul>
2569 <ul>
2570 <li><a href="/shortlog">log</a></li>
2570 <li><a href="/shortlog">log</a></li>
2571 <li><a href="/graph">graph</a></li>
2571 <li><a href="/graph">graph</a></li>
2572 <li><a href="/tags">tags</a></li>
2572 <li><a href="/tags">tags</a></li>
2573 <li><a href="/bookmarks">bookmarks</a></li>
2573 <li><a href="/bookmarks">bookmarks</a></li>
2574 <li><a href="/branches">branches</a></li>
2574 <li><a href="/branches">branches</a></li>
2575 </ul>
2575 </ul>
2576 <ul>
2576 <ul>
2577 <li class="active"><a href="/help">help</a></li>
2577 <li class="active"><a href="/help">help</a></li>
2578 </ul>
2578 </ul>
2579 </div>
2579 </div>
2580
2580
2581 <div class="main">
2581 <div class="main">
2582 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2582 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2583 <h3>Help: remove</h3>
2583 <h3>Help: remove</h3>
2584
2584
2585 <form class="search" action="/log">
2585 <form class="search" action="/log">
2586
2586
2587 <p><input name="rev" id="search1" type="text" size="30" /></p>
2587 <p><input name="rev" id="search1" type="text" size="30" /></p>
2588 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2588 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2589 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2589 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2590 </form>
2590 </form>
2591 <div id="doc">
2591 <div id="doc">
2592 <p>
2592 <p>
2593 hg remove [OPTION]... FILE...
2593 hg remove [OPTION]... FILE...
2594 </p>
2594 </p>
2595 <p>
2595 <p>
2596 aliases: rm
2596 aliases: rm
2597 </p>
2597 </p>
2598 <p>
2598 <p>
2599 remove the specified files on the next commit
2599 remove the specified files on the next commit
2600 </p>
2600 </p>
2601 <p>
2601 <p>
2602 Schedule the indicated files for removal from the current branch.
2602 Schedule the indicated files for removal from the current branch.
2603 </p>
2603 </p>
2604 <p>
2604 <p>
2605 This command schedules the files to be removed at the next commit.
2605 This command schedules the files to be removed at the next commit.
2606 To undo a remove before that, see 'hg revert'. To undo added
2606 To undo a remove before that, see 'hg revert'. To undo added
2607 files, see 'hg forget'.
2607 files, see 'hg forget'.
2608 </p>
2608 </p>
2609 <p>
2609 <p>
2610 -A/--after can be used to remove only files that have already
2610 -A/--after can be used to remove only files that have already
2611 been deleted, -f/--force can be used to force deletion, and -Af
2611 been deleted, -f/--force can be used to force deletion, and -Af
2612 can be used to remove files from the next revision without
2612 can be used to remove files from the next revision without
2613 deleting them from the working directory.
2613 deleting them from the working directory.
2614 </p>
2614 </p>
2615 <p>
2615 <p>
2616 The following table details the behavior of remove for different
2616 The following table details the behavior of remove for different
2617 file states (columns) and option combinations (rows). The file
2617 file states (columns) and option combinations (rows). The file
2618 states are Added [A], Clean [C], Modified [M] and Missing [!]
2618 states are Added [A], Clean [C], Modified [M] and Missing [!]
2619 (as reported by 'hg status'). The actions are Warn, Remove
2619 (as reported by 'hg status'). The actions are Warn, Remove
2620 (from branch) and Delete (from disk):
2620 (from branch) and Delete (from disk):
2621 </p>
2621 </p>
2622 <table>
2622 <table>
2623 <tr><td>opt/state</td>
2623 <tr><td>opt/state</td>
2624 <td>A</td>
2624 <td>A</td>
2625 <td>C</td>
2625 <td>C</td>
2626 <td>M</td>
2626 <td>M</td>
2627 <td>!</td></tr>
2627 <td>!</td></tr>
2628 <tr><td>none</td>
2628 <tr><td>none</td>
2629 <td>W</td>
2629 <td>W</td>
2630 <td>RD</td>
2630 <td>RD</td>
2631 <td>W</td>
2631 <td>W</td>
2632 <td>R</td></tr>
2632 <td>R</td></tr>
2633 <tr><td>-f</td>
2633 <tr><td>-f</td>
2634 <td>R</td>
2634 <td>R</td>
2635 <td>RD</td>
2635 <td>RD</td>
2636 <td>RD</td>
2636 <td>RD</td>
2637 <td>R</td></tr>
2637 <td>R</td></tr>
2638 <tr><td>-A</td>
2638 <tr><td>-A</td>
2639 <td>W</td>
2639 <td>W</td>
2640 <td>W</td>
2640 <td>W</td>
2641 <td>W</td>
2641 <td>W</td>
2642 <td>R</td></tr>
2642 <td>R</td></tr>
2643 <tr><td>-Af</td>
2643 <tr><td>-Af</td>
2644 <td>R</td>
2644 <td>R</td>
2645 <td>R</td>
2645 <td>R</td>
2646 <td>R</td>
2646 <td>R</td>
2647 <td>R</td></tr>
2647 <td>R</td></tr>
2648 </table>
2648 </table>
2649 <p>
2649 <p>
2650 <b>Note:</b>
2650 <b>Note:</b>
2651 </p>
2651 </p>
2652 <p>
2652 <p>
2653 'hg remove' never deletes files in Added [A] state from the
2653 'hg remove' never deletes files in Added [A] state from the
2654 working directory, not even if &quot;--force&quot; is specified.
2654 working directory, not even if &quot;--force&quot; is specified.
2655 </p>
2655 </p>
2656 <p>
2656 <p>
2657 Returns 0 on success, 1 if any warnings encountered.
2657 Returns 0 on success, 1 if any warnings encountered.
2658 </p>
2658 </p>
2659 <p>
2659 <p>
2660 options ([+] can be repeated):
2660 options ([+] can be repeated):
2661 </p>
2661 </p>
2662 <table>
2662 <table>
2663 <tr><td>-A</td>
2663 <tr><td>-A</td>
2664 <td>--after</td>
2664 <td>--after</td>
2665 <td>record delete for missing files</td></tr>
2665 <td>record delete for missing files</td></tr>
2666 <tr><td>-f</td>
2666 <tr><td>-f</td>
2667 <td>--force</td>
2667 <td>--force</td>
2668 <td>forget added files, delete modified files</td></tr>
2668 <td>forget added files, delete modified files</td></tr>
2669 <tr><td>-S</td>
2669 <tr><td>-S</td>
2670 <td>--subrepos</td>
2670 <td>--subrepos</td>
2671 <td>recurse into subrepositories</td></tr>
2671 <td>recurse into subrepositories</td></tr>
2672 <tr><td>-I</td>
2672 <tr><td>-I</td>
2673 <td>--include PATTERN [+]</td>
2673 <td>--include PATTERN [+]</td>
2674 <td>include names matching the given patterns</td></tr>
2674 <td>include names matching the given patterns</td></tr>
2675 <tr><td>-X</td>
2675 <tr><td>-X</td>
2676 <td>--exclude PATTERN [+]</td>
2676 <td>--exclude PATTERN [+]</td>
2677 <td>exclude names matching the given patterns</td></tr>
2677 <td>exclude names matching the given patterns</td></tr>
2678 </table>
2678 </table>
2679 <p>
2679 <p>
2680 global options ([+] can be repeated):
2680 global options ([+] can be repeated):
2681 </p>
2681 </p>
2682 <table>
2682 <table>
2683 <tr><td>-R</td>
2683 <tr><td>-R</td>
2684 <td>--repository REPO</td>
2684 <td>--repository REPO</td>
2685 <td>repository root directory or name of overlay bundle file</td></tr>
2685 <td>repository root directory or name of overlay bundle file</td></tr>
2686 <tr><td></td>
2686 <tr><td></td>
2687 <td>--cwd DIR</td>
2687 <td>--cwd DIR</td>
2688 <td>change working directory</td></tr>
2688 <td>change working directory</td></tr>
2689 <tr><td>-y</td>
2689 <tr><td>-y</td>
2690 <td>--noninteractive</td>
2690 <td>--noninteractive</td>
2691 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2691 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2692 <tr><td>-q</td>
2692 <tr><td>-q</td>
2693 <td>--quiet</td>
2693 <td>--quiet</td>
2694 <td>suppress output</td></tr>
2694 <td>suppress output</td></tr>
2695 <tr><td>-v</td>
2695 <tr><td>-v</td>
2696 <td>--verbose</td>
2696 <td>--verbose</td>
2697 <td>enable additional output</td></tr>
2697 <td>enable additional output</td></tr>
2698 <tr><td></td>
2698 <tr><td></td>
2699 <td>--config CONFIG [+]</td>
2699 <td>--config CONFIG [+]</td>
2700 <td>set/override config option (use 'section.name=value')</td></tr>
2700 <td>set/override config option (use 'section.name=value')</td></tr>
2701 <tr><td></td>
2701 <tr><td></td>
2702 <td>--debug</td>
2702 <td>--debug</td>
2703 <td>enable debugging output</td></tr>
2703 <td>enable debugging output</td></tr>
2704 <tr><td></td>
2704 <tr><td></td>
2705 <td>--debugger</td>
2705 <td>--debugger</td>
2706 <td>start debugger</td></tr>
2706 <td>start debugger</td></tr>
2707 <tr><td></td>
2707 <tr><td></td>
2708 <td>--encoding ENCODE</td>
2708 <td>--encoding ENCODE</td>
2709 <td>set the charset encoding (default: ascii)</td></tr>
2709 <td>set the charset encoding (default: ascii)</td></tr>
2710 <tr><td></td>
2710 <tr><td></td>
2711 <td>--encodingmode MODE</td>
2711 <td>--encodingmode MODE</td>
2712 <td>set the charset encoding mode (default: strict)</td></tr>
2712 <td>set the charset encoding mode (default: strict)</td></tr>
2713 <tr><td></td>
2713 <tr><td></td>
2714 <td>--traceback</td>
2714 <td>--traceback</td>
2715 <td>always print a traceback on exception</td></tr>
2715 <td>always print a traceback on exception</td></tr>
2716 <tr><td></td>
2716 <tr><td></td>
2717 <td>--time</td>
2717 <td>--time</td>
2718 <td>time how long the command takes</td></tr>
2718 <td>time how long the command takes</td></tr>
2719 <tr><td></td>
2719 <tr><td></td>
2720 <td>--profile</td>
2720 <td>--profile</td>
2721 <td>print command execution profile</td></tr>
2721 <td>print command execution profile</td></tr>
2722 <tr><td></td>
2722 <tr><td></td>
2723 <td>--version</td>
2723 <td>--version</td>
2724 <td>output version information and exit</td></tr>
2724 <td>output version information and exit</td></tr>
2725 <tr><td>-h</td>
2725 <tr><td>-h</td>
2726 <td>--help</td>
2726 <td>--help</td>
2727 <td>display help and exit</td></tr>
2727 <td>display help and exit</td></tr>
2728 <tr><td></td>
2728 <tr><td></td>
2729 <td>--hidden</td>
2729 <td>--hidden</td>
2730 <td>consider hidden changesets</td></tr>
2730 <td>consider hidden changesets</td></tr>
2731 </table>
2731 </table>
2732
2732
2733 </div>
2733 </div>
2734 </div>
2734 </div>
2735 </div>
2735 </div>
2736
2736
2737 <script type="text/javascript">process_dates()</script>
2737 <script type="text/javascript">process_dates()</script>
2738
2738
2739
2739
2740 </body>
2740 </body>
2741 </html>
2741 </html>
2742
2742
2743
2743
2744 $ get-with-headers.py 127.0.0.1:$HGPORT "help/revisions"
2744 $ get-with-headers.py 127.0.0.1:$HGPORT "help/revisions"
2745 200 Script output follows
2745 200 Script output follows
2746
2746
2747 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2747 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2748 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2748 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2749 <head>
2749 <head>
2750 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2750 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2751 <meta name="robots" content="index, nofollow" />
2751 <meta name="robots" content="index, nofollow" />
2752 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2752 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2753 <script type="text/javascript" src="/static/mercurial.js"></script>
2753 <script type="text/javascript" src="/static/mercurial.js"></script>
2754
2754
2755 <title>Help: revisions</title>
2755 <title>Help: revisions</title>
2756 </head>
2756 </head>
2757 <body>
2757 <body>
2758
2758
2759 <div class="container">
2759 <div class="container">
2760 <div class="menu">
2760 <div class="menu">
2761 <div class="logo">
2761 <div class="logo">
2762 <a href="https://mercurial-scm.org/">
2762 <a href="https://mercurial-scm.org/">
2763 <img src="/static/hglogo.png" alt="mercurial" /></a>
2763 <img src="/static/hglogo.png" alt="mercurial" /></a>
2764 </div>
2764 </div>
2765 <ul>
2765 <ul>
2766 <li><a href="/shortlog">log</a></li>
2766 <li><a href="/shortlog">log</a></li>
2767 <li><a href="/graph">graph</a></li>
2767 <li><a href="/graph">graph</a></li>
2768 <li><a href="/tags">tags</a></li>
2768 <li><a href="/tags">tags</a></li>
2769 <li><a href="/bookmarks">bookmarks</a></li>
2769 <li><a href="/bookmarks">bookmarks</a></li>
2770 <li><a href="/branches">branches</a></li>
2770 <li><a href="/branches">branches</a></li>
2771 </ul>
2771 </ul>
2772 <ul>
2772 <ul>
2773 <li class="active"><a href="/help">help</a></li>
2773 <li class="active"><a href="/help">help</a></li>
2774 </ul>
2774 </ul>
2775 </div>
2775 </div>
2776
2776
2777 <div class="main">
2777 <div class="main">
2778 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2778 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2779 <h3>Help: revisions</h3>
2779 <h3>Help: revisions</h3>
2780
2780
2781 <form class="search" action="/log">
2781 <form class="search" action="/log">
2782
2782
2783 <p><input name="rev" id="search1" type="text" size="30" /></p>
2783 <p><input name="rev" id="search1" type="text" size="30" /></p>
2784 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2784 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2785 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2785 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2786 </form>
2786 </form>
2787 <div id="doc">
2787 <div id="doc">
2788 <h1>Specifying Single Revisions</h1>
2788 <h1>Specifying Single Revisions</h1>
2789 <p>
2789 <p>
2790 Mercurial supports several ways to specify individual revisions.
2790 Mercurial supports several ways to specify individual revisions.
2791 </p>
2791 </p>
2792 <p>
2792 <p>
2793 A plain integer is treated as a revision number. Negative integers are
2793 A plain integer is treated as a revision number. Negative integers are
2794 treated as sequential offsets from the tip, with -1 denoting the tip,
2794 treated as sequential offsets from the tip, with -1 denoting the tip,
2795 -2 denoting the revision prior to the tip, and so forth.
2795 -2 denoting the revision prior to the tip, and so forth.
2796 </p>
2796 </p>
2797 <p>
2797 <p>
2798 A 40-digit hexadecimal string is treated as a unique revision
2798 A 40-digit hexadecimal string is treated as a unique revision
2799 identifier.
2799 identifier.
2800 </p>
2800 </p>
2801 <p>
2801 <p>
2802 A hexadecimal string less than 40 characters long is treated as a
2802 A hexadecimal string less than 40 characters long is treated as a
2803 unique revision identifier and is referred to as a short-form
2803 unique revision identifier and is referred to as a short-form
2804 identifier. A short-form identifier is only valid if it is the prefix
2804 identifier. A short-form identifier is only valid if it is the prefix
2805 of exactly one full-length identifier.
2805 of exactly one full-length identifier.
2806 </p>
2806 </p>
2807 <p>
2807 <p>
2808 Any other string is treated as a bookmark, tag, or branch name. A
2808 Any other string is treated as a bookmark, tag, or branch name. A
2809 bookmark is a movable pointer to a revision. A tag is a permanent name
2809 bookmark is a movable pointer to a revision. A tag is a permanent name
2810 associated with a revision. A branch name denotes the tipmost open branch head
2810 associated with a revision. A branch name denotes the tipmost open branch head
2811 of that branch - or if they are all closed, the tipmost closed head of the
2811 of that branch - or if they are all closed, the tipmost closed head of the
2812 branch. Bookmark, tag, and branch names must not contain the &quot;:&quot; character.
2812 branch. Bookmark, tag, and branch names must not contain the &quot;:&quot; character.
2813 </p>
2813 </p>
2814 <p>
2814 <p>
2815 The reserved name &quot;tip&quot; always identifies the most recent revision.
2815 The reserved name &quot;tip&quot; always identifies the most recent revision.
2816 </p>
2816 </p>
2817 <p>
2817 <p>
2818 The reserved name &quot;null&quot; indicates the null revision. This is the
2818 The reserved name &quot;null&quot; indicates the null revision. This is the
2819 revision of an empty repository, and the parent of revision 0.
2819 revision of an empty repository, and the parent of revision 0.
2820 </p>
2820 </p>
2821 <p>
2821 <p>
2822 The reserved name &quot;.&quot; indicates the working directory parent. If no
2822 The reserved name &quot;.&quot; indicates the working directory parent. If no
2823 working directory is checked out, it is equivalent to null. If an
2823 working directory is checked out, it is equivalent to null. If an
2824 uncommitted merge is in progress, &quot;.&quot; is the revision of the first
2824 uncommitted merge is in progress, &quot;.&quot; is the revision of the first
2825 parent.
2825 parent.
2826 </p>
2826 </p>
2827
2827
2828 </div>
2828 </div>
2829 </div>
2829 </div>
2830 </div>
2830 </div>
2831
2831
2832 <script type="text/javascript">process_dates()</script>
2832 <script type="text/javascript">process_dates()</script>
2833
2833
2834
2834
2835 </body>
2835 </body>
2836 </html>
2836 </html>
2837
2837
2838
2838
2839 Sub-topic indexes rendered properly
2839 Sub-topic indexes rendered properly
2840
2840
2841 $ get-with-headers.py 127.0.0.1:$HGPORT "help/internals"
2841 $ get-with-headers.py 127.0.0.1:$HGPORT "help/internals"
2842 200 Script output follows
2842 200 Script output follows
2843
2843
2844 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2844 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2845 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2845 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2846 <head>
2846 <head>
2847 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2847 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2848 <meta name="robots" content="index, nofollow" />
2848 <meta name="robots" content="index, nofollow" />
2849 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2849 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2850 <script type="text/javascript" src="/static/mercurial.js"></script>
2850 <script type="text/javascript" src="/static/mercurial.js"></script>
2851
2851
2852 <title>Help: internals</title>
2852 <title>Help: internals</title>
2853 </head>
2853 </head>
2854 <body>
2854 <body>
2855
2855
2856 <div class="container">
2856 <div class="container">
2857 <div class="menu">
2857 <div class="menu">
2858 <div class="logo">
2858 <div class="logo">
2859 <a href="https://mercurial-scm.org/">
2859 <a href="https://mercurial-scm.org/">
2860 <img src="/static/hglogo.png" alt="mercurial" /></a>
2860 <img src="/static/hglogo.png" alt="mercurial" /></a>
2861 </div>
2861 </div>
2862 <ul>
2862 <ul>
2863 <li><a href="/shortlog">log</a></li>
2863 <li><a href="/shortlog">log</a></li>
2864 <li><a href="/graph">graph</a></li>
2864 <li><a href="/graph">graph</a></li>
2865 <li><a href="/tags">tags</a></li>
2865 <li><a href="/tags">tags</a></li>
2866 <li><a href="/bookmarks">bookmarks</a></li>
2866 <li><a href="/bookmarks">bookmarks</a></li>
2867 <li><a href="/branches">branches</a></li>
2867 <li><a href="/branches">branches</a></li>
2868 </ul>
2868 </ul>
2869 <ul>
2869 <ul>
2870 <li><a href="/help">help</a></li>
2870 <li><a href="/help">help</a></li>
2871 </ul>
2871 </ul>
2872 </div>
2872 </div>
2873
2873
2874 <div class="main">
2874 <div class="main">
2875 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2875 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2876 <form class="search" action="/log">
2876 <form class="search" action="/log">
2877
2877
2878 <p><input name="rev" id="search1" type="text" size="30" /></p>
2878 <p><input name="rev" id="search1" type="text" size="30" /></p>
2879 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2879 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2880 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2880 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2881 </form>
2881 </form>
2882 <table class="bigtable">
2882 <table class="bigtable">
2883 <tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr>
2883 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
2884
2884
2885 <tr><td>
2885 <tr><td>
2886 <a href="/help/internals.bundles">
2886 <a href="/help/internals.bundles">
2887 bundles
2887 bundles
2888 </a>
2888 </a>
2889 </td><td>
2889 </td><td>
2890 Bundles
2890 Bundles
2891 </td></tr>
2891 </td></tr>
2892 <tr><td>
2892 <tr><td>
2893 <a href="/help/internals.changegroups">
2893 <a href="/help/internals.changegroups">
2894 changegroups
2894 changegroups
2895 </a>
2895 </a>
2896 </td><td>
2896 </td><td>
2897 Changegroups
2897 Changegroups
2898 </td></tr>
2898 </td></tr>
2899 <tr><td>
2899 <tr><td>
2900 <a href="/help/internals.requirements">
2900 <a href="/help/internals.requirements">
2901 requirements
2901 requirements
2902 </a>
2902 </a>
2903 </td><td>
2903 </td><td>
2904 Repository Requirements
2904 Repository Requirements
2905 </td></tr>
2905 </td></tr>
2906 <tr><td>
2906 <tr><td>
2907 <a href="/help/internals.revlogs">
2907 <a href="/help/internals.revlogs">
2908 revlogs
2908 revlogs
2909 </a>
2909 </a>
2910 </td><td>
2910 </td><td>
2911 Revision Logs
2911 Revision Logs
2912 </td></tr>
2912 </td></tr>
2913 <tr><td>
2913 <tr><td>
2914 <a href="/help/internals.wireprotocol">
2914 <a href="/help/internals.wireprotocol">
2915 wireprotocol
2915 wireprotocol
2916 </a>
2916 </a>
2917 </td><td>
2917 </td><td>
2918 Wire Protocol
2918 Wire Protocol
2919 </td></tr>
2919 </td></tr>
2920
2920
2921
2921
2922
2922
2923
2923
2924
2924
2925 </table>
2925 </table>
2926 </div>
2926 </div>
2927 </div>
2927 </div>
2928
2928
2929 <script type="text/javascript">process_dates()</script>
2929 <script type="text/javascript">process_dates()</script>
2930
2930
2931
2931
2932 </body>
2932 </body>
2933 </html>
2933 </html>
2934
2934
2935
2935
2936 Sub-topic topics rendered properly
2936 Sub-topic topics rendered properly
2937
2937
2938 $ get-with-headers.py 127.0.0.1:$HGPORT "help/internals.changegroups"
2938 $ get-with-headers.py 127.0.0.1:$HGPORT "help/internals.changegroups"
2939 200 Script output follows
2939 200 Script output follows
2940
2940
2941 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2941 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2942 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2942 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2943 <head>
2943 <head>
2944 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2944 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2945 <meta name="robots" content="index, nofollow" />
2945 <meta name="robots" content="index, nofollow" />
2946 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2946 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2947 <script type="text/javascript" src="/static/mercurial.js"></script>
2947 <script type="text/javascript" src="/static/mercurial.js"></script>
2948
2948
2949 <title>Help: internals.changegroups</title>
2949 <title>Help: internals.changegroups</title>
2950 </head>
2950 </head>
2951 <body>
2951 <body>
2952
2952
2953 <div class="container">
2953 <div class="container">
2954 <div class="menu">
2954 <div class="menu">
2955 <div class="logo">
2955 <div class="logo">
2956 <a href="https://mercurial-scm.org/">
2956 <a href="https://mercurial-scm.org/">
2957 <img src="/static/hglogo.png" alt="mercurial" /></a>
2957 <img src="/static/hglogo.png" alt="mercurial" /></a>
2958 </div>
2958 </div>
2959 <ul>
2959 <ul>
2960 <li><a href="/shortlog">log</a></li>
2960 <li><a href="/shortlog">log</a></li>
2961 <li><a href="/graph">graph</a></li>
2961 <li><a href="/graph">graph</a></li>
2962 <li><a href="/tags">tags</a></li>
2962 <li><a href="/tags">tags</a></li>
2963 <li><a href="/bookmarks">bookmarks</a></li>
2963 <li><a href="/bookmarks">bookmarks</a></li>
2964 <li><a href="/branches">branches</a></li>
2964 <li><a href="/branches">branches</a></li>
2965 </ul>
2965 </ul>
2966 <ul>
2966 <ul>
2967 <li class="active"><a href="/help">help</a></li>
2967 <li class="active"><a href="/help">help</a></li>
2968 </ul>
2968 </ul>
2969 </div>
2969 </div>
2970
2970
2971 <div class="main">
2971 <div class="main">
2972 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2972 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2973 <h3>Help: internals.changegroups</h3>
2973 <h3>Help: internals.changegroups</h3>
2974
2974
2975 <form class="search" action="/log">
2975 <form class="search" action="/log">
2976
2976
2977 <p><input name="rev" id="search1" type="text" size="30" /></p>
2977 <p><input name="rev" id="search1" type="text" size="30" /></p>
2978 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2978 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2979 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2979 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2980 </form>
2980 </form>
2981 <div id="doc">
2981 <div id="doc">
2982 <h1>Changegroups</h1>
2982 <h1>Changegroups</h1>
2983 <p>
2983 <p>
2984 Changegroups are representations of repository revlog data, specifically
2984 Changegroups are representations of repository revlog data, specifically
2985 the changelog, manifest, and filelogs.
2985 the changelog, manifest, and filelogs.
2986 </p>
2986 </p>
2987 <p>
2987 <p>
2988 There are 3 versions of changegroups: &quot;1&quot;, &quot;2&quot;, and &quot;3&quot;. From a
2988 There are 3 versions of changegroups: &quot;1&quot;, &quot;2&quot;, and &quot;3&quot;. From a
2989 high-level, versions &quot;1&quot; and &quot;2&quot; are almost exactly the same, with
2989 high-level, versions &quot;1&quot; and &quot;2&quot; are almost exactly the same, with
2990 the only difference being a header on entries in the changeset
2990 the only difference being a header on entries in the changeset
2991 segment. Version &quot;3&quot; adds support for exchanging treemanifests and
2991 segment. Version &quot;3&quot; adds support for exchanging treemanifests and
2992 includes revlog flags in the delta header.
2992 includes revlog flags in the delta header.
2993 </p>
2993 </p>
2994 <p>
2994 <p>
2995 Changegroups consists of 3 logical segments:
2995 Changegroups consists of 3 logical segments:
2996 </p>
2996 </p>
2997 <pre>
2997 <pre>
2998 +---------------------------------+
2998 +---------------------------------+
2999 | | | |
2999 | | | |
3000 | changeset | manifest | filelogs |
3000 | changeset | manifest | filelogs |
3001 | | | |
3001 | | | |
3002 +---------------------------------+
3002 +---------------------------------+
3003 </pre>
3003 </pre>
3004 <p>
3004 <p>
3005 The principle building block of each segment is a *chunk*. A *chunk*
3005 The principle building block of each segment is a *chunk*. A *chunk*
3006 is a framed piece of data:
3006 is a framed piece of data:
3007 </p>
3007 </p>
3008 <pre>
3008 <pre>
3009 +---------------------------------------+
3009 +---------------------------------------+
3010 | | |
3010 | | |
3011 | length | data |
3011 | length | data |
3012 | (32 bits) | &lt;length&gt; bytes |
3012 | (32 bits) | &lt;length&gt; bytes |
3013 | | |
3013 | | |
3014 +---------------------------------------+
3014 +---------------------------------------+
3015 </pre>
3015 </pre>
3016 <p>
3016 <p>
3017 Each chunk starts with a 32-bit big-endian signed integer indicating
3017 Each chunk starts with a 32-bit big-endian signed integer indicating
3018 the length of the raw data that follows.
3018 the length of the raw data that follows.
3019 </p>
3019 </p>
3020 <p>
3020 <p>
3021 There is a special case chunk that has 0 length (&quot;0x00000000&quot;). We
3021 There is a special case chunk that has 0 length (&quot;0x00000000&quot;). We
3022 call this an *empty chunk*.
3022 call this an *empty chunk*.
3023 </p>
3023 </p>
3024 <h2>Delta Groups</h2>
3024 <h2>Delta Groups</h2>
3025 <p>
3025 <p>
3026 A *delta group* expresses the content of a revlog as a series of deltas,
3026 A *delta group* expresses the content of a revlog as a series of deltas,
3027 or patches against previous revisions.
3027 or patches against previous revisions.
3028 </p>
3028 </p>
3029 <p>
3029 <p>
3030 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
3030 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
3031 to signal the end of the delta group:
3031 to signal the end of the delta group:
3032 </p>
3032 </p>
3033 <pre>
3033 <pre>
3034 +------------------------------------------------------------------------+
3034 +------------------------------------------------------------------------+
3035 | | | | | |
3035 | | | | | |
3036 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
3036 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
3037 | (32 bits) | (various) | (32 bits) | (various) | (32 bits) |
3037 | (32 bits) | (various) | (32 bits) | (various) | (32 bits) |
3038 | | | | | |
3038 | | | | | |
3039 +------------------------------------------------------------+-----------+
3039 +------------------------------------------------------------+-----------+
3040 </pre>
3040 </pre>
3041 <p>
3041 <p>
3042 Each *chunk*'s data consists of the following:
3042 Each *chunk*'s data consists of the following:
3043 </p>
3043 </p>
3044 <pre>
3044 <pre>
3045 +-----------------------------------------+
3045 +-----------------------------------------+
3046 | | | |
3046 | | | |
3047 | delta header | mdiff header | delta |
3047 | delta header | mdiff header | delta |
3048 | (various) | (12 bytes) | (various) |
3048 | (various) | (12 bytes) | (various) |
3049 | | | |
3049 | | | |
3050 +-----------------------------------------+
3050 +-----------------------------------------+
3051 </pre>
3051 </pre>
3052 <p>
3052 <p>
3053 The *length* field is the byte length of the remaining 3 logical pieces
3053 The *length* field is the byte length of the remaining 3 logical pieces
3054 of data. The *delta* is a diff from an existing entry in the changelog.
3054 of data. The *delta* is a diff from an existing entry in the changelog.
3055 </p>
3055 </p>
3056 <p>
3056 <p>
3057 The *delta header* is different between versions &quot;1&quot;, &quot;2&quot;, and
3057 The *delta header* is different between versions &quot;1&quot;, &quot;2&quot;, and
3058 &quot;3&quot; of the changegroup format.
3058 &quot;3&quot; of the changegroup format.
3059 </p>
3059 </p>
3060 <p>
3060 <p>
3061 Version 1:
3061 Version 1:
3062 </p>
3062 </p>
3063 <pre>
3063 <pre>
3064 +------------------------------------------------------+
3064 +------------------------------------------------------+
3065 | | | | |
3065 | | | | |
3066 | node | p1 node | p2 node | link node |
3066 | node | p1 node | p2 node | link node |
3067 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3067 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3068 | | | | |
3068 | | | | |
3069 +------------------------------------------------------+
3069 +------------------------------------------------------+
3070 </pre>
3070 </pre>
3071 <p>
3071 <p>
3072 Version 2:
3072 Version 2:
3073 </p>
3073 </p>
3074 <pre>
3074 <pre>
3075 +------------------------------------------------------------------+
3075 +------------------------------------------------------------------+
3076 | | | | | |
3076 | | | | | |
3077 | node | p1 node | p2 node | base node | link node |
3077 | node | p1 node | p2 node | base node | link node |
3078 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3078 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3079 | | | | | |
3079 | | | | | |
3080 +------------------------------------------------------------------+
3080 +------------------------------------------------------------------+
3081 </pre>
3081 </pre>
3082 <p>
3082 <p>
3083 Version 3:
3083 Version 3:
3084 </p>
3084 </p>
3085 <pre>
3085 <pre>
3086 +------------------------------------------------------------------------------+
3086 +------------------------------------------------------------------------------+
3087 | | | | | | |
3087 | | | | | | |
3088 | node | p1 node | p2 node | base node | link node | flags |
3088 | node | p1 node | p2 node | base node | link node | flags |
3089 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
3089 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
3090 | | | | | | |
3090 | | | | | | |
3091 +------------------------------------------------------------------------------+
3091 +------------------------------------------------------------------------------+
3092 </pre>
3092 </pre>
3093 <p>
3093 <p>
3094 The *mdiff header* consists of 3 32-bit big-endian signed integers
3094 The *mdiff header* consists of 3 32-bit big-endian signed integers
3095 describing offsets at which to apply the following delta content:
3095 describing offsets at which to apply the following delta content:
3096 </p>
3096 </p>
3097 <pre>
3097 <pre>
3098 +-------------------------------------+
3098 +-------------------------------------+
3099 | | | |
3099 | | | |
3100 | offset | old length | new length |
3100 | offset | old length | new length |
3101 | (32 bits) | (32 bits) | (32 bits) |
3101 | (32 bits) | (32 bits) | (32 bits) |
3102 | | | |
3102 | | | |
3103 +-------------------------------------+
3103 +-------------------------------------+
3104 </pre>
3104 </pre>
3105 <p>
3105 <p>
3106 In version 1, the delta is always applied against the previous node from
3106 In version 1, the delta is always applied against the previous node from
3107 the changegroup or the first parent if this is the first entry in the
3107 the changegroup or the first parent if this is the first entry in the
3108 changegroup.
3108 changegroup.
3109 </p>
3109 </p>
3110 <p>
3110 <p>
3111 In version 2, the delta base node is encoded in the entry in the
3111 In version 2, the delta base node is encoded in the entry in the
3112 changegroup. This allows the delta to be expressed against any parent,
3112 changegroup. This allows the delta to be expressed against any parent,
3113 which can result in smaller deltas and more efficient encoding of data.
3113 which can result in smaller deltas and more efficient encoding of data.
3114 </p>
3114 </p>
3115 <h2>Changeset Segment</h2>
3115 <h2>Changeset Segment</h2>
3116 <p>
3116 <p>
3117 The *changeset segment* consists of a single *delta group* holding
3117 The *changeset segment* consists of a single *delta group* holding
3118 changelog data. It is followed by an *empty chunk* to denote the
3118 changelog data. It is followed by an *empty chunk* to denote the
3119 boundary to the *manifests segment*.
3119 boundary to the *manifests segment*.
3120 </p>
3120 </p>
3121 <h2>Manifest Segment</h2>
3121 <h2>Manifest Segment</h2>
3122 <p>
3122 <p>
3123 The *manifest segment* consists of a single *delta group* holding
3123 The *manifest segment* consists of a single *delta group* holding
3124 manifest data. It is followed by an *empty chunk* to denote the boundary
3124 manifest data. It is followed by an *empty chunk* to denote the boundary
3125 to the *filelogs segment*.
3125 to the *filelogs segment*.
3126 </p>
3126 </p>
3127 <h2>Filelogs Segment</h2>
3127 <h2>Filelogs Segment</h2>
3128 <p>
3128 <p>
3129 The *filelogs* segment consists of multiple sub-segments, each
3129 The *filelogs* segment consists of multiple sub-segments, each
3130 corresponding to an individual file whose data is being described:
3130 corresponding to an individual file whose data is being described:
3131 </p>
3131 </p>
3132 <pre>
3132 <pre>
3133 +--------------------------------------+
3133 +--------------------------------------+
3134 | | | | |
3134 | | | | |
3135 | filelog0 | filelog1 | filelog2 | ... |
3135 | filelog0 | filelog1 | filelog2 | ... |
3136 | | | | |
3136 | | | | |
3137 +--------------------------------------+
3137 +--------------------------------------+
3138 </pre>
3138 </pre>
3139 <p>
3139 <p>
3140 In version &quot;3&quot; of the changegroup format, filelogs may include
3140 In version &quot;3&quot; of the changegroup format, filelogs may include
3141 directory logs when treemanifests are in use. directory logs are
3141 directory logs when treemanifests are in use. directory logs are
3142 identified by having a trailing '/' on their filename (see below).
3142 identified by having a trailing '/' on their filename (see below).
3143 </p>
3143 </p>
3144 <p>
3144 <p>
3145 The final filelog sub-segment is followed by an *empty chunk* to denote
3145 The final filelog sub-segment is followed by an *empty chunk* to denote
3146 the end of the segment and the overall changegroup.
3146 the end of the segment and the overall changegroup.
3147 </p>
3147 </p>
3148 <p>
3148 <p>
3149 Each filelog sub-segment consists of the following:
3149 Each filelog sub-segment consists of the following:
3150 </p>
3150 </p>
3151 <pre>
3151 <pre>
3152 +------------------------------------------+
3152 +------------------------------------------+
3153 | | | |
3153 | | | |
3154 | filename size | filename | delta group |
3154 | filename size | filename | delta group |
3155 | (32 bits) | (various) | (various) |
3155 | (32 bits) | (various) | (various) |
3156 | | | |
3156 | | | |
3157 +------------------------------------------+
3157 +------------------------------------------+
3158 </pre>
3158 </pre>
3159 <p>
3159 <p>
3160 That is, a *chunk* consisting of the filename (not terminated or padded)
3160 That is, a *chunk* consisting of the filename (not terminated or padded)
3161 followed by N chunks constituting the *delta group* for this file.
3161 followed by N chunks constituting the *delta group* for this file.
3162 </p>
3162 </p>
3163
3163
3164 </div>
3164 </div>
3165 </div>
3165 </div>
3166 </div>
3166 </div>
3167
3167
3168 <script type="text/javascript">process_dates()</script>
3168 <script type="text/javascript">process_dates()</script>
3169
3169
3170
3170
3171 </body>
3171 </body>
3172 </html>
3172 </html>
3173
3173
3174
3174
3175 $ killdaemons.py
3175 $ killdaemons.py
3176
3176
3177 #endif
3177 #endif
General Comments 0
You need to be logged in to leave comments. Login now