##// END OF EJS Templates
[PATCH] doc cleanups...
mpm@selenic.com -
r497:2dcced38 default
parent child Browse files
Show More
@@ -53,17 +53,22 b' COMMANDS'
53 53 --------
54 54
55 55 add [files ...]::
56 Add the given files to the repository. Note that this just schedules the
57 files for addition at the next hg commit time.
56 Schedule files to be version controlled and added to the repository.
57
58 The files get effectively added to the repository at the next commit.
58 59
59 60 addremove::
60 Add all new files and remove all missing files from the repository. New
61 files are ignored if they match any of the patterns in .hgignore
61 Add all new files and remove all missing files from the repository.
62
63 New files are ignored if they match any of the patterns in .hgignore. As
64 with add, the effects of this command take place at the next commit.
62 65
63 66 annotate [-r <rev> -u -n -c] [files ...]::
64 List the files with each line showing the revision id responsible
65 for that line.
66
67 List changes in files, showing the revision id responsible for each line
68
69 This command is useful to discover who did a change or when a change took
70 place.
71
67 72 options:
68 73 -r, --revision <rev> annotate the specified revision
69 74 -u, --user list the author
@@ -71,10 +76,105 b' annotate [-r <rev> -u -n -c] [files ...]'
71 76 -n, --number list the revision number (default)
72 77
73 78 cat <file> [revision]::
74 Output the given revision or tip of the specified file to stdout.
79 Output to stdout the given revision for the specified file.
80
81 In case no revision is given, then the tip is used.
75 82
76 83 clone [-U] <source> [dest]::
77 Create a new copy of an existing repository.
84 Create a copy of an existing repository in a new directory.
85
86 If the destination directory is specified, but doesn't exist, it is
87 created. If no destination directory is specified, it defaults to the
88 current directory.
89
90 The source is added to the new copy's .hg/hgrc file to be used in
91 future pulls.
92
93 For speed and storage size, hardlinks are used to do the copy whenever
94 the specified source and destination are on the same filesystem.
95
96 options:
97 -U, --no-update do not update the new working directory
98
99 commit [-A -t -l <file> -t <text> -u <user> -d <datecode>] [files...]::
100 Incorporate changes from given files into the repository.
101
102 If a list of files is ommited, all of the working dir files will
103 be commited.
104
105 The EDITOR environment variable is used to bring up an editor to add
106 a commit comment.
107
108 Options:
109
110 -A, --addremove run addremove during commit
111 -t, --text <text> use <text> as commit message
112 -l, --logfile <file> show the commit message for the given file
113 -d, --date <datecode> record datecode as commit date
114 -u, --user <user> record user as commiter
115
116 aliases: ci
117
118 copy <source> <dest>::
119 Mark <dest> file as a copy or rename of a <source> one
120
121 This command takes effect for the next commit.
122
123 diff [-r revision] [-r revision] [files ...]::
124 Show differences between revisions for the specified files.
125
126 Differences between files are shown using the unified diff format.
127
128 When two revision arguments are given, then changes are shown between
129 such revisions. If only one revision is specified then that revision is
130 compared to the tip, and, when no revisions are specified, the working
131 directory files are compared to the tip.
132
133 export [revision]::
134 Print the changeset header and diffs for a particular revision.
135
136 The information shown in the changeset header is: author, changeset hash,
137 parent and commit comment.
138
139 forget [files]::
140 Undo an 'hg add' scheduled for the next commit.
141
142 heads::
143 Show all repository head changesets.
144
145 Repository "heads" are changesets that don't have children changesets.
146 They are where development generally takes place and are the usual targets
147 for update and merge operations.
148
149 history::
150 Print a log of the revision history of the repository.
151
152 By default this command outputs: changeset id and hash, tags, parents,
153 user, date and time, and a summary for each commit.
154 The -v switch adds some more detail, such as changed files, manifest
155 hashes or message signatures.
156
157 To display the history of a given file, see the log command.
158
159 identify::
160 Print a short summary of the current state of the repo.
161
162 This summary identifies the repository state using one or two parent
163 hash identifiers, followed by a "+" if there are uncommitted changes
164 in the working directory, followed by a list of tags for this revision.
165
166 aliases: id
167
168 import [-p <n> -b <base> -q] <patches>::
169 Import a list of patches and commit them individually.
170
171 options:
172 -p, --strip <n> directory strip option for patch. This has the same
173 meaning as the correnponding patch option
174 -b <path> base directory to read patches from
175
176 aliases: patch
177
78 178
79 179 If the specified source is on the same filesystem, the repository
80 180 will be copied via hardlinks. This is the fastest and most
@@ -91,88 +191,40 b' clone [-U] <source> [dest]::'
91 191 options:
92 192 -U, --no-update do not update the new working directory
93 193
94 commit [-A -t -l <file> -t <text> -u <user> -d <datecode>] [files...]::
95 Commit all changed files in the working dir to the repository. This uses
96 the EDITOR environment variable to bring up an editor to add a commit
97 comment.
98
99 Options:
100
101 -A, --addremove run addremove during commit
102 -t, --text <text> use <text> as commit message
103 -l, --logfile <file> read the commit message from the specified
104 file
105 -d, --date <datecode> use the specified date code
106 -u, --user <user> record commit as the specified user
107
108 aliases: ci
109
110 copy <source> <dest>::
111 Mark a file as copied or renamed for the next commit.
112
113 diff [-r revision] [-r revision] [files ...]::
114 Generate a unified diff of the indicated files. If there are no
115 revisions specified, the working directory file is compared to
116 the tip, one revision specified indicates a comparison between the
117 working directory file and the specified revision, and two revisions
118 compares the two versions specified.
119
120 export [revision]::
121 Print the changeset header (author, changeset hash, parent, and commit
122 comment) and the diffs for a particular revision.
123
124 forget [files]::
125 Undo an 'hg add' scheduled for the next commit.
126
127 heads::
128 Show all changesets with no children. These are the "heads" of
129 development branches and are the usual targets for updates and merges.
130
131 history::
132 Print the revision history of the repository. Use the -v switch
133 for more detail.
134
135 identify::
136 Print a short identifier of the current state of the repo. This
137 includes one or two parent hash identifiers, followed by
138 a "+" if there are uncommitted changes in the working directory,
139 followed by a list of tags for this revision.
140
141 aliases: id
142
143 import [-p <n> -b <base> -q] <patches>::
144 Import the listed patches and commit them individually.
145
146 options:
147 -p, --strip <n> directory strip option for patch
148 -b <path> base directory to read patches from
149
150 aliases: patch
151
152 194 init::
153 195 Initialize a new repository in the current directory.
154 196
155 197 log <file>::
156 198 Print the revision history of the specified file.
157 199
200 To display the revision history for the whole repository, use the history
201 command.
202
158 203 manifest [revision]::
159 Print the indicated revision of the manifest (list of version controlled
160 files).
204 Print a list of version controlled files for the given revision.
205
206 The manifest is the list of files being version controlled. If no revision
207 is given then the tip is used.
161 208
162 209 parents::
163 210 Print the working directory's parent revisions.
164 211
165 212 pull <repository path>::
166 Pull any changes from the specified repository to the repository in the
167 current directory.
213 Pull any changes from a repository to the current directory's one.
214
215 Pulling is a fundamental operation in a distributed version control system,
216 as it eases handling changes from different branches, both local and
217 remote, into the current repository.
168 218
169 219 options:
170 220 -u, --update update the working directory to tip after pull
171 221
172 222 push <destination>::
173 Push changes from the local repository to the specified
174 destination. If the destination is local, this is identical to a
175 a pull in that directory from the current directory.
223 Push changes from the local repository to the given destination.
224
225 This is the symmetrical operation for pull. It helps to move changes from
226 the current repository to a different one. If the destination is local
227 this is identical to a pull in that directory from the current one.
176 228
177 229 The other currently available push method is SSH. This requires an
178 230 accessible shell account on the destination machine and a copy of
@@ -182,15 +234,22 b' push <destination>::'
182 234 ssh://[user@]host[:port]/path
183 235
184 236 rawcommit [-p -d -u -F -t -l]::
185 Primarily useful for importing from other SCMs.
237 Lowlevel commit, for use in helper scripts.
238
239 This command is not intended to be used by normal users, as it is
240 primarily useful for importing from other SCMs.
186 241
187 242 recover::
188 Recover from an interrupted commit or pull. This should only be
189 necessary when Mercurial suggests it.
243 Recover from an interrupted commit or pull.
244
245 This command tries to fix the repository status after an interrupted
246 operation. It should only be necessary when Mercurial suggests it.
190 247
191 248 remove [files ...]::
192 Schedule the indicated files for removal from the repository at the next
193 commit.
249 Schedule the indicated files for removal from the repository.
250
251 This command shedules the files to be removed, but the actual removing
252 takes place at the next commit.
194 253
195 254 aliases: rm
196 255
@@ -209,14 +268,27 b' serve [-a addr -n name -p port -t templa'
209 268 status::
210 269 Show changed files in the working directory.
211 270
271 The codes used to show the status of files are:
272
212 273 C = changed
213 274 A = added
214 275 R = removed
215 276 ? = not tracked
216 277
217 278 tag [-t <text> -d <datecode> -u <user>] <name> [revision]::
218 Add a tag <name> to the specified revision or the tip.
279 Name a particular revision using <name>.
280
281 Tags are used to name particular revisions of the repository and are
282 very useful to compare different revision, to go back to significant
283 earlier versions or to set special branch points, as releases, etc.
284
285 If no revision is given as argument the tip is used.
219 286
287 This tags are versioned, and kept along with the repository metadata. But
288 Mercurial has support for other type of tags that can be used locally for
289 convenience and that are created adding lines with a changeset hash value
290 and a name or names to name the revision in a .hgtags file
291
220 292 options:
221 293 -t, --text <text> message for tag commit log entry
222 294 -d, --date <datecode> datecode for commit
@@ -225,6 +297,8 b' tag [-t <text> -d <datecode> -u <user>] '
225 297 tags::
226 298 List the repository tags.
227 299
300 Local tags in the .hgtags don't get listed when using this command.
301
228 302 tip::
229 303 Show the tip revision.
230 304
@@ -232,22 +306,21 b' undo::'
232 306 Undo the last commit or pull transaction.
233 307
234 308 update [-m -C] [revision]::
235 Update or merge the working directory to a specified revision.
236
237 If there are no outstanding changes in the working directory and
238 there is a linear relationship between the current version and the
239 requested version, the result is the requested version.
309 Bring the working directory to the state of a given revision.
240 310
241 Otherwise the result is a merge between the contents of the
242 current working directory and the requested version. Files that
243 changed between either parent are marked as changed for the next
244 commit and a commit must be performed before any further updates
245 are allowed. Merging will not be performed without the -m flag.
246
247 The -C switch will tell Mercurial to forcibly update to the
248 specified version, adding, removing, and overwriting locally
249 changed fils as necessary.
250
311 After running this command the current directory will have the contents
312 of the specified revision.
313
314 If there were outstanding changes in the current directory and a merge
315 would be needed, the -m option can be used to merge those changes with
316 the target revision. Without the -m or --merge option, no merge
317 will happen.
318
319 The -C or --clean option must be used in case a pristine version is
320 desired. In this case, existing changes will be discarded and lost. If
321 these changes should be kept, then a commit prior updating, or a merge
322 is due.
323
251 324 options:
252 325 -m, --merge allow merging of branches
253 326 -C, --clean overwrite locally modified files
General Comments 0
You need to be logged in to leave comments. Login now