Show More
@@ -1,29 +1,29 b'' | |||||
1 | Mercurial supports several ways to specify individual revisions. |
|
1 | Mercurial supports several ways to specify individual revisions. | |
2 |
|
2 | |||
3 | A plain integer is treated as a revision number. Negative integers are |
|
3 | A plain integer is treated as a revision number. Negative integers are | |
4 | treated as sequential offsets from the tip, with -1 denoting the tip, |
|
4 | treated as sequential offsets from the tip, with -1 denoting the tip, | |
5 | -2 denoting the revision prior to the tip, and so forth. |
|
5 | -2 denoting the revision prior to the tip, and so forth. | |
6 |
|
6 | |||
7 | A 40-digit hexadecimal string is treated as a unique revision |
|
7 | A 40-digit hexadecimal string is treated as a unique revision | |
8 | identifier. |
|
8 | identifier. | |
9 |
|
9 | |||
10 | A hexadecimal string less than 40 characters long is treated as a |
|
10 | A hexadecimal string less than 40 characters long is treated as a | |
11 | unique revision identifier and is referred to as a short-form |
|
11 | unique revision identifier and is referred to as a short-form | |
12 | identifier. A short-form identifier is only valid if it is the prefix |
|
12 | identifier. A short-form identifier is only valid if it is the prefix | |
13 | of exactly one full-length identifier. |
|
13 | of exactly one full-length identifier. | |
14 |
|
14 | |||
15 |
Any other string is treated as a tag or branch name. A |
|
15 | Any other string is treated as a bookmark, tag, or branch name. A | |
16 | symbolic name associated with a revision identifier. A branch name |
|
16 | bookmark is a movable pointer to a revision. A tag is a permanent name | |
17 | denotes the tipmost revision of that branch. Tag and branch names must |
|
17 | associated with a revision. A branch name denotes the tipmost revision | |
18 | not contain the ":" character. |
|
18 | of that branch. Bookmark, tag, and branch names must not contain the ":" | |
|
19 | character. | |||
19 |
|
20 | |||
20 |
The reserved name "tip" |
|
21 | The reserved name "tip" always identifies the most recent revision. | |
21 | most recent revision. |
|
|||
22 |
|
22 | |||
23 | The reserved name "null" indicates the null revision. This is the |
|
23 | The reserved name "null" indicates the null revision. This is the | |
24 | revision of an empty repository, and the parent of revision 0. |
|
24 | revision of an empty repository, and the parent of revision 0. | |
25 |
|
25 | |||
26 | The reserved name "." indicates the working directory parent. If no |
|
26 | The reserved name "." indicates the working directory parent. If no | |
27 | working directory is checked out, it is equivalent to null. If an |
|
27 | working directory is checked out, it is equivalent to null. If an | |
28 | uncommitted merge is in progress, "." is the revision of the first |
|
28 | uncommitted merge is in progress, "." is the revision of the first | |
29 | parent. |
|
29 | parent. |
@@ -1,784 +1,784 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 working directory with another revision |
|
17 | merge merge working directory with another revision | |
18 | phase set or show the current phase name |
|
18 | phase set or show the current phase name | |
19 | pull pull changes from the specified source |
|
19 | pull pull changes from the specified source | |
20 | push push changes to the specified destination |
|
20 | push push changes to the specified destination | |
21 | remove remove the specified files on the next commit |
|
21 | remove remove the specified files on the next commit | |
22 | serve start stand-alone webserver |
|
22 | serve start stand-alone webserver | |
23 | status show changed files in the working directory |
|
23 | status show changed files in the working directory | |
24 | summary summarize working directory state |
|
24 | summary summarize working directory state | |
25 | update update working directory (or switch revisions) |
|
25 | update update working directory (or switch revisions) | |
26 |
|
26 | |||
27 | use "hg help" for the full list of commands or "hg -v" for details |
|
27 | use "hg help" for the full list of commands or "hg -v" for details | |
28 |
|
28 | |||
29 | $ hg -q |
|
29 | $ hg -q | |
30 | add add the specified files on the next commit |
|
30 | add add the specified files on the next commit | |
31 | annotate show changeset information by line for each file |
|
31 | annotate show changeset information by line for each file | |
32 | clone make a copy of an existing repository |
|
32 | clone make a copy of an existing repository | |
33 | commit commit the specified files or all outstanding changes |
|
33 | commit commit the specified files or all outstanding changes | |
34 | diff diff repository (or selected files) |
|
34 | diff diff repository (or selected files) | |
35 | export dump the header and diffs for one or more changesets |
|
35 | export dump the header and diffs for one or more changesets | |
36 | forget forget the specified files on the next commit |
|
36 | forget forget the specified files on the next commit | |
37 | init create a new repository in the given directory |
|
37 | init create a new repository in the given directory | |
38 | log show revision history of entire repository or files |
|
38 | log show revision history of entire repository or files | |
39 | merge merge working directory with another revision |
|
39 | merge merge working directory with another revision | |
40 | phase set or show the current phase name |
|
40 | phase set or show the current phase name | |
41 | pull pull changes from the specified source |
|
41 | pull pull changes from the specified source | |
42 | push push changes to the specified destination |
|
42 | push push changes to the specified destination | |
43 | remove remove the specified files on the next commit |
|
43 | remove remove the specified files on the next commit | |
44 | serve start stand-alone webserver |
|
44 | serve start stand-alone webserver | |
45 | status show changed files in the working directory |
|
45 | status show changed files in the working directory | |
46 | summary summarize working directory state |
|
46 | summary summarize working directory state | |
47 | update update working directory (or switch revisions) |
|
47 | update update working directory (or switch revisions) | |
48 |
|
48 | |||
49 | $ hg help |
|
49 | $ hg help | |
50 | Mercurial Distributed SCM |
|
50 | Mercurial Distributed SCM | |
51 |
|
51 | |||
52 | list of commands: |
|
52 | list of commands: | |
53 |
|
53 | |||
54 | add add the specified files on the next commit |
|
54 | add add the specified files on the next commit | |
55 | addremove add all new files, delete all missing files |
|
55 | addremove add all new files, delete all missing files | |
56 | annotate show changeset information by line for each file |
|
56 | annotate show changeset information by line for each file | |
57 | archive create an unversioned archive of a repository revision |
|
57 | archive create an unversioned archive of a repository revision | |
58 | backout reverse effect of earlier changeset |
|
58 | backout reverse effect of earlier changeset | |
59 | bisect subdivision search of changesets |
|
59 | bisect subdivision search of changesets | |
60 | bookmarks track a line of development with movable markers |
|
60 | bookmarks track a line of development with movable markers | |
61 | branch set or show the current branch name |
|
61 | branch set or show the current branch name | |
62 | branches list repository named branches |
|
62 | branches list repository named branches | |
63 | bundle create a changegroup file |
|
63 | bundle create a changegroup file | |
64 | cat output the current or given revision of files |
|
64 | cat output the current or given revision of files | |
65 | clone make a copy of an existing repository |
|
65 | clone make a copy of an existing repository | |
66 | commit commit the specified files or all outstanding changes |
|
66 | commit commit the specified files or all outstanding changes | |
67 | copy mark files as copied for the next commit |
|
67 | copy mark files as copied for the next commit | |
68 | diff diff repository (or selected files) |
|
68 | diff diff repository (or selected files) | |
69 | export dump the header and diffs for one or more changesets |
|
69 | export dump the header and diffs for one or more changesets | |
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 current repository heads or show branch heads |
|
73 | heads show current repository heads or 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 copy or specified revision |
|
75 | identify identify the working copy 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 | locate locate files matching specific patterns |
|
79 | locate locate files matching specific patterns | |
80 | log show revision history of entire repository or files |
|
80 | log show revision history of entire repository or files | |
81 | manifest output the current or given revision of the project manifest |
|
81 | manifest output the current or given revision of the project manifest | |
82 | merge merge working directory with another revision |
|
82 | merge merge working directory with another revision | |
83 | outgoing show changesets not found in the destination |
|
83 | outgoing show changesets not found in the destination | |
84 | parents show the parents of the working directory or revision |
|
84 | parents show the parents of the working directory or revision | |
85 | paths show aliases for remote repositories |
|
85 | paths show aliases for remote repositories | |
86 | phase set or show the current phase name |
|
86 | phase set or show the current phase name | |
87 | pull pull changes from the specified source |
|
87 | pull pull changes from the specified source | |
88 | push push changes to the specified destination |
|
88 | push push changes to the specified destination | |
89 | recover roll back an interrupted transaction |
|
89 | recover roll back an interrupted transaction | |
90 | remove remove the specified files on the next commit |
|
90 | remove remove the specified files on the next commit | |
91 | rename rename files; equivalent of copy + remove |
|
91 | rename rename files; equivalent of copy + remove | |
92 | resolve redo merges or set/view the merge status of files |
|
92 | resolve redo merges or set/view the merge status of files | |
93 | revert restore files to their checkout state |
|
93 | revert restore files to their checkout state | |
94 | rollback roll back the last transaction (dangerous) |
|
94 | rollback roll back the last transaction (dangerous) | |
95 | root print the root (top) of the current working directory |
|
95 | root print the root (top) of the current working directory | |
96 | serve start stand-alone webserver |
|
96 | serve start stand-alone webserver | |
97 | showconfig show combined config settings from all hgrc files |
|
97 | showconfig show combined config settings from all hgrc files | |
98 | status show changed files in the working directory |
|
98 | status show changed files in the working directory | |
99 | summary summarize working directory state |
|
99 | summary summarize working directory state | |
100 | tag add one or more tags for the current or given revision |
|
100 | tag add one or more tags for the current or given revision | |
101 | tags list repository tags |
|
101 | tags list repository tags | |
102 | tip show the tip revision |
|
102 | tip show the tip revision | |
103 | unbundle apply one or more changegroup files |
|
103 | unbundle apply one or more changegroup files | |
104 | update update working directory (or switch revisions) |
|
104 | update update working directory (or switch revisions) | |
105 | verify verify the integrity of the repository |
|
105 | verify verify the integrity of the repository | |
106 | version output version and copyright information |
|
106 | version output version and copyright information | |
107 |
|
107 | |||
108 | additional help topics: |
|
108 | additional help topics: | |
109 |
|
109 | |||
110 | config Configuration Files |
|
110 | config Configuration Files | |
111 | dates Date Formats |
|
111 | dates Date Formats | |
112 | diffs Diff Formats |
|
112 | diffs Diff Formats | |
113 | environment Environment Variables |
|
113 | environment Environment Variables | |
114 | extensions Using Additional Features |
|
114 | extensions Using Additional Features | |
115 | filesets Specifying File Sets |
|
115 | filesets Specifying File Sets | |
116 | glossary Glossary |
|
116 | glossary Glossary | |
117 | hgignore Syntax for Mercurial Ignore Files |
|
117 | hgignore Syntax for Mercurial Ignore Files | |
118 | hgweb Configuring hgweb |
|
118 | hgweb Configuring hgweb | |
119 | merge-tools Merge Tools |
|
119 | merge-tools Merge Tools | |
120 | multirevs Specifying Multiple Revisions |
|
120 | multirevs Specifying Multiple Revisions | |
121 | patterns File Name Patterns |
|
121 | patterns File Name Patterns | |
122 | phases Working with Phases |
|
122 | phases Working with Phases | |
123 | revisions Specifying Single Revisions |
|
123 | revisions Specifying Single Revisions | |
124 | revsets Specifying Revision Sets |
|
124 | revsets Specifying Revision Sets | |
125 | subrepos Subrepositories |
|
125 | subrepos Subrepositories | |
126 | templating Template Usage |
|
126 | templating Template Usage | |
127 | urls URL Paths |
|
127 | urls URL Paths | |
128 |
|
128 | |||
129 | use "hg -v help" to show builtin aliases and global options |
|
129 | use "hg -v help" to show builtin aliases and global options | |
130 |
|
130 | |||
131 | $ hg -q help |
|
131 | $ hg -q help | |
132 | add add the specified files on the next commit |
|
132 | add add the specified files on the next commit | |
133 | addremove add all new files, delete all missing files |
|
133 | addremove add all new files, delete all missing files | |
134 | annotate show changeset information by line for each file |
|
134 | annotate show changeset information by line for each file | |
135 | archive create an unversioned archive of a repository revision |
|
135 | archive create an unversioned archive of a repository revision | |
136 | backout reverse effect of earlier changeset |
|
136 | backout reverse effect of earlier changeset | |
137 | bisect subdivision search of changesets |
|
137 | bisect subdivision search of changesets | |
138 | bookmarks track a line of development with movable markers |
|
138 | bookmarks track a line of development with movable markers | |
139 | branch set or show the current branch name |
|
139 | branch set or show the current branch name | |
140 | branches list repository named branches |
|
140 | branches list repository named branches | |
141 | bundle create a changegroup file |
|
141 | bundle create a changegroup file | |
142 | cat output the current or given revision of files |
|
142 | cat output the current or given revision of files | |
143 | clone make a copy of an existing repository |
|
143 | clone make a copy of an existing repository | |
144 | commit commit the specified files or all outstanding changes |
|
144 | commit commit the specified files or all outstanding changes | |
145 | copy mark files as copied for the next commit |
|
145 | copy mark files as copied for the next commit | |
146 | diff diff repository (or selected files) |
|
146 | diff diff repository (or selected files) | |
147 | export dump the header and diffs for one or more changesets |
|
147 | export dump the header and diffs for one or more changesets | |
148 | forget forget the specified files on the next commit |
|
148 | forget forget the specified files on the next commit | |
149 | graft copy changes from other branches onto the current branch |
|
149 | graft copy changes from other branches onto the current branch | |
150 | grep search for a pattern in specified files and revisions |
|
150 | grep search for a pattern in specified files and revisions | |
151 | heads show current repository heads or show branch heads |
|
151 | heads show current repository heads or show branch heads | |
152 | help show help for a given topic or a help overview |
|
152 | help show help for a given topic or a help overview | |
153 | identify identify the working copy or specified revision |
|
153 | identify identify the working copy or specified revision | |
154 | import import an ordered set of patches |
|
154 | import import an ordered set of patches | |
155 | incoming show new changesets found in source |
|
155 | incoming show new changesets found in source | |
156 | init create a new repository in the given directory |
|
156 | init create a new repository in the given directory | |
157 | locate locate files matching specific patterns |
|
157 | locate locate files matching specific patterns | |
158 | log show revision history of entire repository or files |
|
158 | log show revision history of entire repository or files | |
159 | manifest output the current or given revision of the project manifest |
|
159 | manifest output the current or given revision of the project manifest | |
160 | merge merge working directory with another revision |
|
160 | merge merge working directory with another revision | |
161 | outgoing show changesets not found in the destination |
|
161 | outgoing show changesets not found in the destination | |
162 | parents show the parents of the working directory or revision |
|
162 | parents show the parents of the working directory or revision | |
163 | paths show aliases for remote repositories |
|
163 | paths show aliases for remote repositories | |
164 | phase set or show the current phase name |
|
164 | phase set or show the current phase name | |
165 | pull pull changes from the specified source |
|
165 | pull pull changes from the specified source | |
166 | push push changes to the specified destination |
|
166 | push push changes to the specified destination | |
167 | recover roll back an interrupted transaction |
|
167 | recover roll back an interrupted transaction | |
168 | remove remove the specified files on the next commit |
|
168 | remove remove the specified files on the next commit | |
169 | rename rename files; equivalent of copy + remove |
|
169 | rename rename files; equivalent of copy + remove | |
170 | resolve redo merges or set/view the merge status of files |
|
170 | resolve redo merges or set/view the merge status of files | |
171 | revert restore files to their checkout state |
|
171 | revert restore files to their checkout state | |
172 | rollback roll back the last transaction (dangerous) |
|
172 | rollback roll back the last transaction (dangerous) | |
173 | root print the root (top) of the current working directory |
|
173 | root print the root (top) of the current working directory | |
174 | serve start stand-alone webserver |
|
174 | serve start stand-alone webserver | |
175 | showconfig show combined config settings from all hgrc files |
|
175 | showconfig show combined config settings from all hgrc files | |
176 | status show changed files in the working directory |
|
176 | status show changed files in the working directory | |
177 | summary summarize working directory state |
|
177 | summary summarize working directory state | |
178 | tag add one or more tags for the current or given revision |
|
178 | tag add one or more tags for the current or given revision | |
179 | tags list repository tags |
|
179 | tags list repository tags | |
180 | tip show the tip revision |
|
180 | tip show the tip revision | |
181 | unbundle apply one or more changegroup files |
|
181 | unbundle apply one or more changegroup files | |
182 | update update working directory (or switch revisions) |
|
182 | update update working directory (or switch revisions) | |
183 | verify verify the integrity of the repository |
|
183 | verify verify the integrity of the repository | |
184 | version output version and copyright information |
|
184 | version output version and copyright information | |
185 |
|
185 | |||
186 | additional help topics: |
|
186 | additional help topics: | |
187 |
|
187 | |||
188 | config Configuration Files |
|
188 | config Configuration Files | |
189 | dates Date Formats |
|
189 | dates Date Formats | |
190 | diffs Diff Formats |
|
190 | diffs Diff Formats | |
191 | environment Environment Variables |
|
191 | environment Environment Variables | |
192 | extensions Using Additional Features |
|
192 | extensions Using Additional Features | |
193 | filesets Specifying File Sets |
|
193 | filesets Specifying File Sets | |
194 | glossary Glossary |
|
194 | glossary Glossary | |
195 | hgignore Syntax for Mercurial Ignore Files |
|
195 | hgignore Syntax for Mercurial Ignore Files | |
196 | hgweb Configuring hgweb |
|
196 | hgweb Configuring hgweb | |
197 | merge-tools Merge Tools |
|
197 | merge-tools Merge Tools | |
198 | multirevs Specifying Multiple Revisions |
|
198 | multirevs Specifying Multiple Revisions | |
199 | patterns File Name Patterns |
|
199 | patterns File Name Patterns | |
200 | phases Working with Phases |
|
200 | phases Working with Phases | |
201 | revisions Specifying Single Revisions |
|
201 | revisions Specifying Single Revisions | |
202 | revsets Specifying Revision Sets |
|
202 | revsets Specifying Revision Sets | |
203 | subrepos Subrepositories |
|
203 | subrepos Subrepositories | |
204 | templating Template Usage |
|
204 | templating Template Usage | |
205 | urls URL Paths |
|
205 | urls URL Paths | |
206 |
|
206 | |||
207 | Test short command list with verbose option |
|
207 | Test short command list with verbose option | |
208 |
|
208 | |||
209 | $ hg -v help shortlist |
|
209 | $ hg -v help shortlist | |
210 | Mercurial Distributed SCM |
|
210 | Mercurial Distributed SCM | |
211 |
|
211 | |||
212 | basic commands: |
|
212 | basic commands: | |
213 |
|
213 | |||
214 | add: |
|
214 | add: | |
215 | add the specified files on the next commit |
|
215 | add the specified files on the next commit | |
216 | annotate, blame: |
|
216 | annotate, blame: | |
217 | show changeset information by line for each file |
|
217 | show changeset information by line for each file | |
218 | clone: |
|
218 | clone: | |
219 | make a copy of an existing repository |
|
219 | make a copy of an existing repository | |
220 | commit, ci: |
|
220 | commit, ci: | |
221 | commit the specified files or all outstanding changes |
|
221 | commit the specified files or all outstanding changes | |
222 | diff: |
|
222 | diff: | |
223 | diff repository (or selected files) |
|
223 | diff repository (or selected files) | |
224 | export: |
|
224 | export: | |
225 | dump the header and diffs for one or more changesets |
|
225 | dump the header and diffs for one or more changesets | |
226 | forget: |
|
226 | forget: | |
227 | forget the specified files on the next commit |
|
227 | forget the specified files on the next commit | |
228 | init: |
|
228 | init: | |
229 | create a new repository in the given directory |
|
229 | create a new repository in the given directory | |
230 | log, history: |
|
230 | log, history: | |
231 | show revision history of entire repository or files |
|
231 | show revision history of entire repository or files | |
232 | merge: |
|
232 | merge: | |
233 | merge working directory with another revision |
|
233 | merge working directory with another revision | |
234 | phase: |
|
234 | phase: | |
235 | set or show the current phase name |
|
235 | set or show the current phase name | |
236 | pull: |
|
236 | pull: | |
237 | pull changes from the specified source |
|
237 | pull changes from the specified source | |
238 | push: |
|
238 | push: | |
239 | push changes to the specified destination |
|
239 | push changes to the specified destination | |
240 | remove, rm: |
|
240 | remove, rm: | |
241 | remove the specified files on the next commit |
|
241 | remove the specified files on the next commit | |
242 | serve: |
|
242 | serve: | |
243 | start stand-alone webserver |
|
243 | start stand-alone webserver | |
244 | status, st: |
|
244 | status, st: | |
245 | show changed files in the working directory |
|
245 | show changed files in the working directory | |
246 | summary, sum: |
|
246 | summary, sum: | |
247 | summarize working directory state |
|
247 | summarize working directory state | |
248 | update, up, checkout, co: |
|
248 | update, up, checkout, co: | |
249 | update working directory (or switch revisions) |
|
249 | update working directory (or switch revisions) | |
250 |
|
250 | |||
251 | global options: |
|
251 | global options: | |
252 |
|
252 | |||
253 | -R --repository REPO repository root directory or name of overlay bundle |
|
253 | -R --repository REPO repository root directory or name of overlay bundle | |
254 | file |
|
254 | file | |
255 | --cwd DIR change working directory |
|
255 | --cwd DIR change working directory | |
256 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
256 | -y --noninteractive do not prompt, automatically pick the first choice for | |
257 | all prompts |
|
257 | all prompts | |
258 | -q --quiet suppress output |
|
258 | -q --quiet suppress output | |
259 | -v --verbose enable additional output |
|
259 | -v --verbose enable additional output | |
260 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
260 | --config CONFIG [+] set/override config option (use 'section.name=value') | |
261 | --debug enable debugging output |
|
261 | --debug enable debugging output | |
262 | --debugger start debugger |
|
262 | --debugger start debugger | |
263 | --encoding ENCODE set the charset encoding (default: ascii) |
|
263 | --encoding ENCODE set the charset encoding (default: ascii) | |
264 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
264 | --encodingmode MODE set the charset encoding mode (default: strict) | |
265 | --traceback always print a traceback on exception |
|
265 | --traceback always print a traceback on exception | |
266 | --time time how long the command takes |
|
266 | --time time how long the command takes | |
267 | --profile print command execution profile |
|
267 | --profile print command execution profile | |
268 | --version output version information and exit |
|
268 | --version output version information and exit | |
269 | -h --help display help and exit |
|
269 | -h --help display help and exit | |
270 |
|
270 | |||
271 | [+] marked option can be specified multiple times |
|
271 | [+] marked option can be specified multiple times | |
272 |
|
272 | |||
273 | use "hg help" for the full list of commands |
|
273 | use "hg help" for the full list of commands | |
274 |
|
274 | |||
275 | $ hg add -h |
|
275 | $ hg add -h | |
276 | hg add [OPTION]... [FILE]... |
|
276 | hg add [OPTION]... [FILE]... | |
277 |
|
277 | |||
278 | add the specified files on the next commit |
|
278 | add the specified files on the next commit | |
279 |
|
279 | |||
280 | Schedule files to be version controlled and added to the repository. |
|
280 | Schedule files to be version controlled and added to the repository. | |
281 |
|
281 | |||
282 | The files will be added to the repository at the next commit. To undo an |
|
282 | The files will be added to the repository at the next commit. To undo an | |
283 | add before that, see "hg forget". |
|
283 | add before that, see "hg forget". | |
284 |
|
284 | |||
285 | If no names are given, add all files to the repository. |
|
285 | If no names are given, add all files to the repository. | |
286 |
|
286 | |||
287 | Returns 0 if all files are successfully added. |
|
287 | Returns 0 if all files are successfully added. | |
288 |
|
288 | |||
289 | options: |
|
289 | options: | |
290 |
|
290 | |||
291 | -I --include PATTERN [+] include names matching the given patterns |
|
291 | -I --include PATTERN [+] include names matching the given patterns | |
292 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
292 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
293 | -S --subrepos recurse into subrepositories |
|
293 | -S --subrepos recurse into subrepositories | |
294 | -n --dry-run do not perform actions, just print output |
|
294 | -n --dry-run do not perform actions, just print output | |
295 |
|
295 | |||
296 | [+] marked option can be specified multiple times |
|
296 | [+] marked option can be specified multiple times | |
297 |
|
297 | |||
298 | use "hg -v help add" to show more info |
|
298 | use "hg -v help add" to show more info | |
299 |
|
299 | |||
300 | Verbose help for add |
|
300 | Verbose help for add | |
301 |
|
301 | |||
302 | $ hg add -hv |
|
302 | $ hg add -hv | |
303 | hg add [OPTION]... [FILE]... |
|
303 | hg add [OPTION]... [FILE]... | |
304 |
|
304 | |||
305 | add the specified files on the next commit |
|
305 | add the specified files on the next commit | |
306 |
|
306 | |||
307 | Schedule files to be version controlled and added to the repository. |
|
307 | Schedule files to be version controlled and added to the repository. | |
308 |
|
308 | |||
309 | The files will be added to the repository at the next commit. To undo an |
|
309 | The files will be added to the repository at the next commit. To undo an | |
310 | add before that, see "hg forget". |
|
310 | add before that, see "hg forget". | |
311 |
|
311 | |||
312 | If no names are given, add all files to the repository. |
|
312 | If no names are given, add all files to the repository. | |
313 |
|
313 | |||
314 | An example showing how new (unknown) files are added automatically by "hg |
|
314 | An example showing how new (unknown) files are added automatically by "hg | |
315 | add": |
|
315 | add": | |
316 |
|
316 | |||
317 | $ ls |
|
317 | $ ls | |
318 | foo.c |
|
318 | foo.c | |
319 | $ hg status |
|
319 | $ hg status | |
320 | ? foo.c |
|
320 | ? foo.c | |
321 | $ hg add |
|
321 | $ hg add | |
322 | adding foo.c |
|
322 | adding foo.c | |
323 | $ hg status |
|
323 | $ hg status | |
324 | A foo.c |
|
324 | A foo.c | |
325 |
|
325 | |||
326 | Returns 0 if all files are successfully added. |
|
326 | Returns 0 if all files are successfully added. | |
327 |
|
327 | |||
328 | options: |
|
328 | options: | |
329 |
|
329 | |||
330 | -I --include PATTERN [+] include names matching the given patterns |
|
330 | -I --include PATTERN [+] include names matching the given patterns | |
331 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
331 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
332 | -S --subrepos recurse into subrepositories |
|
332 | -S --subrepos recurse into subrepositories | |
333 | -n --dry-run do not perform actions, just print output |
|
333 | -n --dry-run do not perform actions, just print output | |
334 |
|
334 | |||
335 | [+] marked option can be specified multiple times |
|
335 | [+] marked option can be specified multiple times | |
336 |
|
336 | |||
337 | global options: |
|
337 | global options: | |
338 |
|
338 | |||
339 | -R --repository REPO repository root directory or name of overlay bundle |
|
339 | -R --repository REPO repository root directory or name of overlay bundle | |
340 | file |
|
340 | file | |
341 | --cwd DIR change working directory |
|
341 | --cwd DIR change working directory | |
342 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
342 | -y --noninteractive do not prompt, automatically pick the first choice for | |
343 | all prompts |
|
343 | all prompts | |
344 | -q --quiet suppress output |
|
344 | -q --quiet suppress output | |
345 | -v --verbose enable additional output |
|
345 | -v --verbose enable additional output | |
346 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
346 | --config CONFIG [+] set/override config option (use 'section.name=value') | |
347 | --debug enable debugging output |
|
347 | --debug enable debugging output | |
348 | --debugger start debugger |
|
348 | --debugger start debugger | |
349 | --encoding ENCODE set the charset encoding (default: ascii) |
|
349 | --encoding ENCODE set the charset encoding (default: ascii) | |
350 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
350 | --encodingmode MODE set the charset encoding mode (default: strict) | |
351 | --traceback always print a traceback on exception |
|
351 | --traceback always print a traceback on exception | |
352 | --time time how long the command takes |
|
352 | --time time how long the command takes | |
353 | --profile print command execution profile |
|
353 | --profile print command execution profile | |
354 | --version output version information and exit |
|
354 | --version output version information and exit | |
355 | -h --help display help and exit |
|
355 | -h --help display help and exit | |
356 |
|
356 | |||
357 | [+] marked option can be specified multiple times |
|
357 | [+] marked option can be specified multiple times | |
358 |
|
358 | |||
359 | Test help option with version option |
|
359 | Test help option with version option | |
360 |
|
360 | |||
361 | $ hg add -h --version |
|
361 | $ hg add -h --version | |
362 | Mercurial Distributed SCM (version *) (glob) |
|
362 | Mercurial Distributed SCM (version *) (glob) | |
363 | (see http://mercurial.selenic.com for more information) |
|
363 | (see http://mercurial.selenic.com for more information) | |
364 |
|
364 | |||
365 | Copyright (C) 2005-2012 Matt Mackall and others |
|
365 | Copyright (C) 2005-2012 Matt Mackall and others | |
366 | This is free software; see the source for copying conditions. There is NO |
|
366 | This is free software; see the source for copying conditions. There is NO | |
367 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
367 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
368 |
|
368 | |||
369 | $ hg add --skjdfks |
|
369 | $ hg add --skjdfks | |
370 | hg add: option --skjdfks not recognized |
|
370 | hg add: option --skjdfks not recognized | |
371 | hg add [OPTION]... [FILE]... |
|
371 | hg add [OPTION]... [FILE]... | |
372 |
|
372 | |||
373 | add the specified files on the next commit |
|
373 | add the specified files on the next commit | |
374 |
|
374 | |||
375 | options: |
|
375 | options: | |
376 |
|
376 | |||
377 | -I --include PATTERN [+] include names matching the given patterns |
|
377 | -I --include PATTERN [+] include names matching the given patterns | |
378 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
378 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
379 | -S --subrepos recurse into subrepositories |
|
379 | -S --subrepos recurse into subrepositories | |
380 | -n --dry-run do not perform actions, just print output |
|
380 | -n --dry-run do not perform actions, just print output | |
381 |
|
381 | |||
382 | [+] marked option can be specified multiple times |
|
382 | [+] marked option can be specified multiple times | |
383 |
|
383 | |||
384 | use "hg help add" to show the full help text |
|
384 | use "hg help add" to show the full help text | |
385 | [255] |
|
385 | [255] | |
386 |
|
386 | |||
387 | Test ambiguous command help |
|
387 | Test ambiguous command help | |
388 |
|
388 | |||
389 | $ hg help ad |
|
389 | $ hg help ad | |
390 | list of commands: |
|
390 | list of commands: | |
391 |
|
391 | |||
392 | add add the specified files on the next commit |
|
392 | add add the specified files on the next commit | |
393 | addremove add all new files, delete all missing files |
|
393 | addremove add all new files, delete all missing files | |
394 |
|
394 | |||
395 | use "hg -v help ad" to show builtin aliases and global options |
|
395 | use "hg -v help ad" to show builtin aliases and global options | |
396 |
|
396 | |||
397 | Test command without options |
|
397 | Test command without options | |
398 |
|
398 | |||
399 | $ hg help verify |
|
399 | $ hg help verify | |
400 | hg verify |
|
400 | hg verify | |
401 |
|
401 | |||
402 | verify the integrity of the repository |
|
402 | verify the integrity of the repository | |
403 |
|
403 | |||
404 | Verify the integrity of the current repository. |
|
404 | Verify the integrity of the current repository. | |
405 |
|
405 | |||
406 | This will perform an extensive check of the repository's integrity, |
|
406 | This will perform an extensive check of the repository's integrity, | |
407 | validating the hashes and checksums of each entry in the changelog, |
|
407 | validating the hashes and checksums of each entry in the changelog, | |
408 | manifest, and tracked files, as well as the integrity of their crosslinks |
|
408 | manifest, and tracked files, as well as the integrity of their crosslinks | |
409 | and indices. |
|
409 | and indices. | |
410 |
|
410 | |||
411 | Returns 0 on success, 1 if errors are encountered. |
|
411 | Returns 0 on success, 1 if errors are encountered. | |
412 |
|
412 | |||
413 | use "hg -v help verify" to show more info |
|
413 | use "hg -v help verify" to show more info | |
414 |
|
414 | |||
415 | $ hg help diff |
|
415 | $ hg help diff | |
416 | hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]... |
|
416 | hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]... | |
417 |
|
417 | |||
418 | diff repository (or selected files) |
|
418 | diff repository (or selected files) | |
419 |
|
419 | |||
420 | Show differences between revisions for the specified files. |
|
420 | Show differences between revisions for the specified files. | |
421 |
|
421 | |||
422 | Differences between files are shown using the unified diff format. |
|
422 | Differences between files are shown using the unified diff format. | |
423 |
|
423 | |||
424 | Note: |
|
424 | Note: | |
425 | diff may generate unexpected results for merges, as it will default to |
|
425 | diff may generate unexpected results for merges, as it will default to | |
426 | comparing against the working directory's first parent changeset if no |
|
426 | comparing against the working directory's first parent changeset if no | |
427 | revisions are specified. |
|
427 | revisions are specified. | |
428 |
|
428 | |||
429 | When two revision arguments are given, then changes are shown between |
|
429 | When two revision arguments are given, then changes are shown between | |
430 | those revisions. If only one revision is specified then that revision is |
|
430 | those revisions. If only one revision is specified then that revision is | |
431 | compared to the working directory, and, when no revisions are specified, |
|
431 | compared to the working directory, and, when no revisions are specified, | |
432 | the working directory files are compared to its parent. |
|
432 | the working directory files are compared to its parent. | |
433 |
|
433 | |||
434 | Alternatively you can specify -c/--change with a revision to see the |
|
434 | Alternatively you can specify -c/--change with a revision to see the | |
435 | changes in that changeset relative to its first parent. |
|
435 | changes in that changeset relative to its first parent. | |
436 |
|
436 | |||
437 | Without the -a/--text option, diff will avoid generating diffs of files it |
|
437 | Without the -a/--text option, diff will avoid generating diffs of files it | |
438 | detects as binary. With -a, diff will generate a diff anyway, probably |
|
438 | detects as binary. With -a, diff will generate a diff anyway, probably | |
439 | with undesirable results. |
|
439 | with undesirable results. | |
440 |
|
440 | |||
441 | Use the -g/--git option to generate diffs in the git extended diff format. |
|
441 | Use the -g/--git option to generate diffs in the git extended diff format. | |
442 | For more information, read "hg help diffs". |
|
442 | For more information, read "hg help diffs". | |
443 |
|
443 | |||
444 | Returns 0 on success. |
|
444 | Returns 0 on success. | |
445 |
|
445 | |||
446 | options: |
|
446 | options: | |
447 |
|
447 | |||
448 | -r --rev REV [+] revision |
|
448 | -r --rev REV [+] revision | |
449 | -c --change REV change made by revision |
|
449 | -c --change REV change made by revision | |
450 | -a --text treat all files as text |
|
450 | -a --text treat all files as text | |
451 | -g --git use git extended diff format |
|
451 | -g --git use git extended diff format | |
452 | --nodates omit dates from diff headers |
|
452 | --nodates omit dates from diff headers | |
453 | -p --show-function show which function each change is in |
|
453 | -p --show-function show which function each change is in | |
454 | --reverse produce a diff that undoes the changes |
|
454 | --reverse produce a diff that undoes the changes | |
455 | -w --ignore-all-space ignore white space when comparing lines |
|
455 | -w --ignore-all-space ignore white space when comparing lines | |
456 | -b --ignore-space-change ignore changes in the amount of white space |
|
456 | -b --ignore-space-change ignore changes in the amount of white space | |
457 | -B --ignore-blank-lines ignore changes whose lines are all blank |
|
457 | -B --ignore-blank-lines ignore changes whose lines are all blank | |
458 | -U --unified NUM number of lines of context to show |
|
458 | -U --unified NUM number of lines of context to show | |
459 | --stat output diffstat-style summary of changes |
|
459 | --stat output diffstat-style summary of changes | |
460 | -I --include PATTERN [+] include names matching the given patterns |
|
460 | -I --include PATTERN [+] include names matching the given patterns | |
461 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
461 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
462 | -S --subrepos recurse into subrepositories |
|
462 | -S --subrepos recurse into subrepositories | |
463 |
|
463 | |||
464 | [+] marked option can be specified multiple times |
|
464 | [+] marked option can be specified multiple times | |
465 |
|
465 | |||
466 | use "hg -v help diff" to show more info |
|
466 | use "hg -v help diff" to show more info | |
467 |
|
467 | |||
468 | $ hg help status |
|
468 | $ hg help status | |
469 | hg status [OPTION]... [FILE]... |
|
469 | hg status [OPTION]... [FILE]... | |
470 |
|
470 | |||
471 | aliases: st |
|
471 | aliases: st | |
472 |
|
472 | |||
473 | show changed files in the working directory |
|
473 | show changed files in the working directory | |
474 |
|
474 | |||
475 | Show status of files in the repository. If names are given, only files |
|
475 | Show status of files in the repository. If names are given, only files | |
476 | that match are shown. Files that are clean or ignored or the source of a |
|
476 | that match are shown. Files that are clean or ignored or the source of a | |
477 | copy/move operation, are not listed unless -c/--clean, -i/--ignored, |
|
477 | copy/move operation, are not listed unless -c/--clean, -i/--ignored, | |
478 | -C/--copies or -A/--all are given. Unless options described with "show |
|
478 | -C/--copies or -A/--all are given. Unless options described with "show | |
479 | only ..." are given, the options -mardu are used. |
|
479 | only ..." are given, the options -mardu are used. | |
480 |
|
480 | |||
481 | Option -q/--quiet hides untracked (unknown and ignored) files unless |
|
481 | Option -q/--quiet hides untracked (unknown and ignored) files unless | |
482 | explicitly requested with -u/--unknown or -i/--ignored. |
|
482 | explicitly requested with -u/--unknown or -i/--ignored. | |
483 |
|
483 | |||
484 | Note: |
|
484 | Note: | |
485 | status may appear to disagree with diff if permissions have changed or |
|
485 | status may appear to disagree with diff if permissions have changed or | |
486 | a merge has occurred. The standard diff format does not report |
|
486 | a merge has occurred. The standard diff format does not report | |
487 | permission changes and diff only reports changes relative to one merge |
|
487 | permission changes and diff only reports changes relative to one merge | |
488 | parent. |
|
488 | parent. | |
489 |
|
489 | |||
490 | If one revision is given, it is used as the base revision. If two |
|
490 | If one revision is given, it is used as the base revision. If two | |
491 | revisions are given, the differences between them are shown. The --change |
|
491 | revisions are given, the differences between them are shown. The --change | |
492 | option can also be used as a shortcut to list the changed files of a |
|
492 | option can also be used as a shortcut to list the changed files of a | |
493 | revision from its first parent. |
|
493 | revision from its first parent. | |
494 |
|
494 | |||
495 | The codes used to show the status of files are: |
|
495 | The codes used to show the status of files are: | |
496 |
|
496 | |||
497 | M = modified |
|
497 | M = modified | |
498 | A = added |
|
498 | A = added | |
499 | R = removed |
|
499 | R = removed | |
500 | C = clean |
|
500 | C = clean | |
501 | ! = missing (deleted by non-hg command, but still tracked) |
|
501 | ! = missing (deleted by non-hg command, but still tracked) | |
502 | ? = not tracked |
|
502 | ? = not tracked | |
503 | I = ignored |
|
503 | I = ignored | |
504 | = origin of the previous file listed as A (added) |
|
504 | = origin of the previous file listed as A (added) | |
505 |
|
505 | |||
506 | Returns 0 on success. |
|
506 | Returns 0 on success. | |
507 |
|
507 | |||
508 | options: |
|
508 | options: | |
509 |
|
509 | |||
510 | -A --all show status of all files |
|
510 | -A --all show status of all files | |
511 | -m --modified show only modified files |
|
511 | -m --modified show only modified files | |
512 | -a --added show only added files |
|
512 | -a --added show only added files | |
513 | -r --removed show only removed files |
|
513 | -r --removed show only removed files | |
514 | -d --deleted show only deleted (but tracked) files |
|
514 | -d --deleted show only deleted (but tracked) files | |
515 | -c --clean show only files without changes |
|
515 | -c --clean show only files without changes | |
516 | -u --unknown show only unknown (not tracked) files |
|
516 | -u --unknown show only unknown (not tracked) files | |
517 | -i --ignored show only ignored files |
|
517 | -i --ignored show only ignored files | |
518 | -n --no-status hide status prefix |
|
518 | -n --no-status hide status prefix | |
519 | -C --copies show source of copied files |
|
519 | -C --copies show source of copied files | |
520 | -0 --print0 end filenames with NUL, for use with xargs |
|
520 | -0 --print0 end filenames with NUL, for use with xargs | |
521 | --rev REV [+] show difference from revision |
|
521 | --rev REV [+] show difference from revision | |
522 | --change REV list the changed files of a revision |
|
522 | --change REV list the changed files of a revision | |
523 | -I --include PATTERN [+] include names matching the given patterns |
|
523 | -I --include PATTERN [+] include names matching the given patterns | |
524 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
524 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
525 | -S --subrepos recurse into subrepositories |
|
525 | -S --subrepos recurse into subrepositories | |
526 |
|
526 | |||
527 | [+] marked option can be specified multiple times |
|
527 | [+] marked option can be specified multiple times | |
528 |
|
528 | |||
529 | use "hg -v help status" to show more info |
|
529 | use "hg -v help status" to show more info | |
530 |
|
530 | |||
531 | $ hg -q help status |
|
531 | $ hg -q help status | |
532 | hg status [OPTION]... [FILE]... |
|
532 | hg status [OPTION]... [FILE]... | |
533 |
|
533 | |||
534 | show changed files in the working directory |
|
534 | show changed files in the working directory | |
535 |
|
535 | |||
536 | $ hg help foo |
|
536 | $ hg help foo | |
537 | hg: unknown command 'foo' |
|
537 | hg: unknown command 'foo' | |
538 | Mercurial Distributed SCM |
|
538 | Mercurial Distributed SCM | |
539 |
|
539 | |||
540 | basic commands: |
|
540 | basic commands: | |
541 |
|
541 | |||
542 | add add the specified files on the next commit |
|
542 | add add the specified files on the next commit | |
543 | annotate show changeset information by line for each file |
|
543 | annotate show changeset information by line for each file | |
544 | clone make a copy of an existing repository |
|
544 | clone make a copy of an existing repository | |
545 | commit commit the specified files or all outstanding changes |
|
545 | commit commit the specified files or all outstanding changes | |
546 | diff diff repository (or selected files) |
|
546 | diff diff repository (or selected files) | |
547 | export dump the header and diffs for one or more changesets |
|
547 | export dump the header and diffs for one or more changesets | |
548 | forget forget the specified files on the next commit |
|
548 | forget forget the specified files on the next commit | |
549 | init create a new repository in the given directory |
|
549 | init create a new repository in the given directory | |
550 | log show revision history of entire repository or files |
|
550 | log show revision history of entire repository or files | |
551 | merge merge working directory with another revision |
|
551 | merge merge working directory with another revision | |
552 | phase set or show the current phase name |
|
552 | phase set or show the current phase name | |
553 | pull pull changes from the specified source |
|
553 | pull pull changes from the specified source | |
554 | push push changes to the specified destination |
|
554 | push push changes to the specified destination | |
555 | remove remove the specified files on the next commit |
|
555 | remove remove the specified files on the next commit | |
556 | serve start stand-alone webserver |
|
556 | serve start stand-alone webserver | |
557 | status show changed files in the working directory |
|
557 | status show changed files in the working directory | |
558 | summary summarize working directory state |
|
558 | summary summarize working directory state | |
559 | update update working directory (or switch revisions) |
|
559 | update update working directory (or switch revisions) | |
560 |
|
560 | |||
561 | use "hg help" for the full list of commands or "hg -v" for details |
|
561 | use "hg help" for the full list of commands or "hg -v" for details | |
562 | [255] |
|
562 | [255] | |
563 |
|
563 | |||
564 | $ hg skjdfks |
|
564 | $ hg skjdfks | |
565 | hg: unknown command 'skjdfks' |
|
565 | hg: unknown command 'skjdfks' | |
566 | Mercurial Distributed SCM |
|
566 | Mercurial Distributed SCM | |
567 |
|
567 | |||
568 | basic commands: |
|
568 | basic commands: | |
569 |
|
569 | |||
570 | add add the specified files on the next commit |
|
570 | add add the specified files on the next commit | |
571 | annotate show changeset information by line for each file |
|
571 | annotate show changeset information by line for each file | |
572 | clone make a copy of an existing repository |
|
572 | clone make a copy of an existing repository | |
573 | commit commit the specified files or all outstanding changes |
|
573 | commit commit the specified files or all outstanding changes | |
574 | diff diff repository (or selected files) |
|
574 | diff diff repository (or selected files) | |
575 | export dump the header and diffs for one or more changesets |
|
575 | export dump the header and diffs for one or more changesets | |
576 | forget forget the specified files on the next commit |
|
576 | forget forget the specified files on the next commit | |
577 | init create a new repository in the given directory |
|
577 | init create a new repository in the given directory | |
578 | log show revision history of entire repository or files |
|
578 | log show revision history of entire repository or files | |
579 | merge merge working directory with another revision |
|
579 | merge merge working directory with another revision | |
580 | phase set or show the current phase name |
|
580 | phase set or show the current phase name | |
581 | pull pull changes from the specified source |
|
581 | pull pull changes from the specified source | |
582 | push push changes to the specified destination |
|
582 | push push changes to the specified destination | |
583 | remove remove the specified files on the next commit |
|
583 | remove remove the specified files on the next commit | |
584 | serve start stand-alone webserver |
|
584 | serve start stand-alone webserver | |
585 | status show changed files in the working directory |
|
585 | status show changed files in the working directory | |
586 | summary summarize working directory state |
|
586 | summary summarize working directory state | |
587 | update update working directory (or switch revisions) |
|
587 | update update working directory (or switch revisions) | |
588 |
|
588 | |||
589 | use "hg help" for the full list of commands or "hg -v" for details |
|
589 | use "hg help" for the full list of commands or "hg -v" for details | |
590 | [255] |
|
590 | [255] | |
591 |
|
591 | |||
592 | $ cat > helpext.py <<EOF |
|
592 | $ cat > helpext.py <<EOF | |
593 | > import os |
|
593 | > import os | |
594 | > from mercurial import commands |
|
594 | > from mercurial import commands | |
595 | > |
|
595 | > | |
596 | > def nohelp(ui, *args, **kwargs): |
|
596 | > def nohelp(ui, *args, **kwargs): | |
597 | > pass |
|
597 | > pass | |
598 | > |
|
598 | > | |
599 | > cmdtable = { |
|
599 | > cmdtable = { | |
600 | > "nohelp": (nohelp, [], "hg nohelp"), |
|
600 | > "nohelp": (nohelp, [], "hg nohelp"), | |
601 | > } |
|
601 | > } | |
602 | > |
|
602 | > | |
603 | > commands.norepo += ' nohelp' |
|
603 | > commands.norepo += ' nohelp' | |
604 | > EOF |
|
604 | > EOF | |
605 | $ echo '[extensions]' >> $HGRCPATH |
|
605 | $ echo '[extensions]' >> $HGRCPATH | |
606 | $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH |
|
606 | $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH | |
607 |
|
607 | |||
608 | Test command with no help text |
|
608 | Test command with no help text | |
609 |
|
609 | |||
610 | $ hg help nohelp |
|
610 | $ hg help nohelp | |
611 | hg nohelp |
|
611 | hg nohelp | |
612 |
|
612 | |||
613 | (no help text available) |
|
613 | (no help text available) | |
614 |
|
614 | |||
615 | use "hg -v help nohelp" to show more info |
|
615 | use "hg -v help nohelp" to show more info | |
616 |
|
616 | |||
617 | Test that default list of commands omits extension commands |
|
617 | Test that default list of commands omits extension commands | |
618 |
|
618 | |||
619 | $ hg help |
|
619 | $ hg help | |
620 | Mercurial Distributed SCM |
|
620 | Mercurial Distributed SCM | |
621 |
|
621 | |||
622 | list of commands: |
|
622 | list of commands: | |
623 |
|
623 | |||
624 | add add the specified files on the next commit |
|
624 | add add the specified files on the next commit | |
625 | addremove add all new files, delete all missing files |
|
625 | addremove add all new files, delete all missing files | |
626 | annotate show changeset information by line for each file |
|
626 | annotate show changeset information by line for each file | |
627 | archive create an unversioned archive of a repository revision |
|
627 | archive create an unversioned archive of a repository revision | |
628 | backout reverse effect of earlier changeset |
|
628 | backout reverse effect of earlier changeset | |
629 | bisect subdivision search of changesets |
|
629 | bisect subdivision search of changesets | |
630 | bookmarks track a line of development with movable markers |
|
630 | bookmarks track a line of development with movable markers | |
631 | branch set or show the current branch name |
|
631 | branch set or show the current branch name | |
632 | branches list repository named branches |
|
632 | branches list repository named branches | |
633 | bundle create a changegroup file |
|
633 | bundle create a changegroup file | |
634 | cat output the current or given revision of files |
|
634 | cat output the current or given revision of files | |
635 | clone make a copy of an existing repository |
|
635 | clone make a copy of an existing repository | |
636 | commit commit the specified files or all outstanding changes |
|
636 | commit commit the specified files or all outstanding changes | |
637 | copy mark files as copied for the next commit |
|
637 | copy mark files as copied for the next commit | |
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 | graft copy changes from other branches onto the current branch |
|
641 | graft copy changes from other branches onto the current branch | |
642 | grep search for a pattern in specified files and revisions |
|
642 | grep search for a pattern in specified files and revisions | |
643 | heads show current repository heads or show branch heads |
|
643 | heads show current repository heads or show branch heads | |
644 | help show help for a given topic or a help overview |
|
644 | help show help for a given topic or a help overview | |
645 | identify identify the working copy or specified revision |
|
645 | identify identify the working copy or specified revision | |
646 | import import an ordered set of patches |
|
646 | import import an ordered set of patches | |
647 | incoming show new changesets found in source |
|
647 | incoming show new changesets found in source | |
648 | init create a new repository in the given directory |
|
648 | init create a new repository in the given directory | |
649 | locate locate files matching specific patterns |
|
649 | locate locate files matching specific patterns | |
650 | log show revision history of entire repository or files |
|
650 | log show revision history of entire repository or files | |
651 | manifest output the current or given revision of the project manifest |
|
651 | manifest output the current or given revision of the project manifest | |
652 | merge merge working directory with another revision |
|
652 | merge merge working directory with another revision | |
653 | outgoing show changesets not found in the destination |
|
653 | outgoing show changesets not found in the destination | |
654 | parents show the parents of the working directory or revision |
|
654 | parents show the parents of the working directory or revision | |
655 | paths show aliases for remote repositories |
|
655 | paths show aliases for remote repositories | |
656 | phase set or show the current phase name |
|
656 | phase set or show the current phase name | |
657 | pull pull changes from the specified source |
|
657 | pull pull changes from the specified source | |
658 | push push changes to the specified destination |
|
658 | push push changes to the specified destination | |
659 | recover roll back an interrupted transaction |
|
659 | recover roll back an interrupted transaction | |
660 | remove remove the specified files on the next commit |
|
660 | remove remove the specified files on the next commit | |
661 | rename rename files; equivalent of copy + remove |
|
661 | rename rename files; equivalent of copy + remove | |
662 | resolve redo merges or set/view the merge status of files |
|
662 | resolve redo merges or set/view the merge status of files | |
663 | revert restore files to their checkout state |
|
663 | revert restore files to their checkout state | |
664 | rollback roll back the last transaction (dangerous) |
|
664 | rollback roll back the last transaction (dangerous) | |
665 | root print the root (top) of the current working directory |
|
665 | root print the root (top) of the current working directory | |
666 | serve start stand-alone webserver |
|
666 | serve start stand-alone webserver | |
667 | showconfig show combined config settings from all hgrc files |
|
667 | showconfig show combined config settings from all hgrc files | |
668 | status show changed files in the working directory |
|
668 | status show changed files in the working directory | |
669 | summary summarize working directory state |
|
669 | summary summarize working directory state | |
670 | tag add one or more tags for the current or given revision |
|
670 | tag add one or more tags for the current or given revision | |
671 | tags list repository tags |
|
671 | tags list repository tags | |
672 | tip show the tip revision |
|
672 | tip show the tip revision | |
673 | unbundle apply one or more changegroup files |
|
673 | unbundle apply one or more changegroup files | |
674 | update update working directory (or switch revisions) |
|
674 | update update working directory (or switch revisions) | |
675 | verify verify the integrity of the repository |
|
675 | verify verify the integrity of the repository | |
676 | version output version and copyright information |
|
676 | version output version and copyright information | |
677 |
|
677 | |||
678 | enabled extensions: |
|
678 | enabled extensions: | |
679 |
|
679 | |||
680 | helpext (no help text available) |
|
680 | helpext (no help text available) | |
681 |
|
681 | |||
682 | additional help topics: |
|
682 | additional help topics: | |
683 |
|
683 | |||
684 | config Configuration Files |
|
684 | config Configuration Files | |
685 | dates Date Formats |
|
685 | dates Date Formats | |
686 | diffs Diff Formats |
|
686 | diffs Diff Formats | |
687 | environment Environment Variables |
|
687 | environment Environment Variables | |
688 | extensions Using Additional Features |
|
688 | extensions Using Additional Features | |
689 | filesets Specifying File Sets |
|
689 | filesets Specifying File Sets | |
690 | glossary Glossary |
|
690 | glossary Glossary | |
691 | hgignore Syntax for Mercurial Ignore Files |
|
691 | hgignore Syntax for Mercurial Ignore Files | |
692 | hgweb Configuring hgweb |
|
692 | hgweb Configuring hgweb | |
693 | merge-tools Merge Tools |
|
693 | merge-tools Merge Tools | |
694 | multirevs Specifying Multiple Revisions |
|
694 | multirevs Specifying Multiple Revisions | |
695 | patterns File Name Patterns |
|
695 | patterns File Name Patterns | |
696 | phases Working with Phases |
|
696 | phases Working with Phases | |
697 | revisions Specifying Single Revisions |
|
697 | revisions Specifying Single Revisions | |
698 | revsets Specifying Revision Sets |
|
698 | revsets Specifying Revision Sets | |
699 | subrepos Subrepositories |
|
699 | subrepos Subrepositories | |
700 | templating Template Usage |
|
700 | templating Template Usage | |
701 | urls URL Paths |
|
701 | urls URL Paths | |
702 |
|
702 | |||
703 | use "hg -v help" to show builtin aliases and global options |
|
703 | use "hg -v help" to show builtin aliases and global options | |
704 |
|
704 | |||
705 |
|
705 | |||
706 |
|
706 | |||
707 | Test list of commands with command with no help text |
|
707 | Test list of commands with command with no help text | |
708 |
|
708 | |||
709 | $ hg help helpext |
|
709 | $ hg help helpext | |
710 | helpext extension - no help text available |
|
710 | helpext extension - no help text available | |
711 |
|
711 | |||
712 | list of commands: |
|
712 | list of commands: | |
713 |
|
713 | |||
714 | nohelp (no help text available) |
|
714 | nohelp (no help text available) | |
715 |
|
715 | |||
716 | use "hg -v help helpext" to show builtin aliases and global options |
|
716 | use "hg -v help helpext" to show builtin aliases and global options | |
717 |
|
717 | |||
718 | Test a help topic |
|
718 | Test a help topic | |
719 |
|
719 | |||
720 | $ hg help revs |
|
720 | $ hg help revs | |
721 | Specifying Single Revisions |
|
721 | Specifying Single Revisions | |
722 |
|
722 | |||
723 | Mercurial supports several ways to specify individual revisions. |
|
723 | Mercurial supports several ways to specify individual revisions. | |
724 |
|
724 | |||
725 | A plain integer is treated as a revision number. Negative integers are |
|
725 | A plain integer is treated as a revision number. Negative integers are | |
726 | treated as sequential offsets from the tip, with -1 denoting the tip, -2 |
|
726 | treated as sequential offsets from the tip, with -1 denoting the tip, -2 | |
727 | denoting the revision prior to the tip, and so forth. |
|
727 | denoting the revision prior to the tip, and so forth. | |
728 |
|
728 | |||
729 | A 40-digit hexadecimal string is treated as a unique revision identifier. |
|
729 | A 40-digit hexadecimal string is treated as a unique revision identifier. | |
730 |
|
730 | |||
731 | A hexadecimal string less than 40 characters long is treated as a unique |
|
731 | A hexadecimal string less than 40 characters long is treated as a unique | |
732 | revision identifier and is referred to as a short-form identifier. A |
|
732 | revision identifier and is referred to as a short-form identifier. A | |
733 | short-form identifier is only valid if it is the prefix of exactly one |
|
733 | short-form identifier is only valid if it is the prefix of exactly one | |
734 | full-length identifier. |
|
734 | full-length identifier. | |
735 |
|
735 | |||
736 |
Any other string is treated as a tag or branch name. A |
|
736 | Any other string is treated as a bookmark, tag, or branch name. A bookmark | |
737 | symbolic name associated with a revision identifier. A branch name denotes |
|
737 | is a movable pointer to a revision. A tag is a permanent name associated | |
738 | the tipmost revision of that branch. Tag and branch names must not contain |
|
738 | with a revision. A branch name denotes the tipmost revision of that | |
739 | the ":" character. |
|
739 | branch. Bookmark, tag, and branch names must not contain the ":" | |
|
740 | character. | |||
740 |
|
741 | |||
741 |
The reserved name "tip" |
|
742 | The reserved name "tip" always identifies the most recent revision. | |
742 | recent revision. |
|
|||
743 |
|
743 | |||
744 | The reserved name "null" indicates the null revision. This is the revision |
|
744 | The reserved name "null" indicates the null revision. This is the revision | |
745 | of an empty repository, and the parent of revision 0. |
|
745 | of an empty repository, and the parent of revision 0. | |
746 |
|
746 | |||
747 | The reserved name "." indicates the working directory parent. If no |
|
747 | The reserved name "." indicates the working directory parent. If no | |
748 | working directory is checked out, it is equivalent to null. If an |
|
748 | working directory is checked out, it is equivalent to null. If an | |
749 | uncommitted merge is in progress, "." is the revision of the first parent. |
|
749 | uncommitted merge is in progress, "." is the revision of the first parent. | |
750 |
|
750 | |||
751 | Test templating help |
|
751 | Test templating help | |
752 |
|
752 | |||
753 | $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) ' |
|
753 | $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) ' | |
754 | desc String. The text of the changeset description. |
|
754 | desc String. The text of the changeset description. | |
755 | diffstat String. Statistics of changes with the following format: |
|
755 | diffstat String. Statistics of changes with the following format: | |
756 | firstline Any text. Returns the first line of text. |
|
756 | firstline Any text. Returns the first line of text. | |
757 | nonempty Any text. Returns '(none)' if the string is empty. |
|
757 | nonempty Any text. Returns '(none)' if the string is empty. | |
758 |
|
758 | |||
759 | Test help hooks |
|
759 | Test help hooks | |
760 |
|
760 | |||
761 | $ cat > helphook1.py <<EOF |
|
761 | $ cat > helphook1.py <<EOF | |
762 | > from mercurial import help |
|
762 | > from mercurial import help | |
763 | > |
|
763 | > | |
764 | > def rewrite(topic, doc): |
|
764 | > def rewrite(topic, doc): | |
765 | > return doc + '\nhelphook1\n' |
|
765 | > return doc + '\nhelphook1\n' | |
766 | > |
|
766 | > | |
767 | > def extsetup(ui): |
|
767 | > def extsetup(ui): | |
768 | > help.addtopichook('revsets', rewrite) |
|
768 | > help.addtopichook('revsets', rewrite) | |
769 | > EOF |
|
769 | > EOF | |
770 | $ cat > helphook2.py <<EOF |
|
770 | $ cat > helphook2.py <<EOF | |
771 | > from mercurial import help |
|
771 | > from mercurial import help | |
772 | > |
|
772 | > | |
773 | > def rewrite(topic, doc): |
|
773 | > def rewrite(topic, doc): | |
774 | > return doc + '\nhelphook2\n' |
|
774 | > return doc + '\nhelphook2\n' | |
775 | > |
|
775 | > | |
776 | > def extsetup(ui): |
|
776 | > def extsetup(ui): | |
777 | > help.addtopichook('revsets', rewrite) |
|
777 | > help.addtopichook('revsets', rewrite) | |
778 | > EOF |
|
778 | > EOF | |
779 | $ echo '[extensions]' >> $HGRCPATH |
|
779 | $ echo '[extensions]' >> $HGRCPATH | |
780 | $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH |
|
780 | $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH | |
781 | $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH |
|
781 | $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH | |
782 | $ hg help revsets | grep helphook |
|
782 | $ hg help revsets | grep helphook | |
783 | helphook1 |
|
783 | helphook1 | |
784 | helphook2 |
|
784 | helphook2 |
General Comments 0
You need to be logged in to leave comments.
Login now