Show More
@@ -5,6 +5,7 b'' | |||
|
5 | 5 | # instance) |
|
6 | 6 | # |
|
7 | 7 | # Copyright (C) 2005 Steve Borho |
|
8 | # Copyright (C) 2006 Brendan Cully | |
|
8 | 9 | # |
|
9 | 10 | # This is free software; you can redistribute it and/or modify it under |
|
10 | 11 | # the terms of the GNU General Public License as published by the Free |
@@ -114,7 +115,7 b' typeset -A _hg_cmd_globals' | |||
|
114 | 115 | |
|
115 | 116 | _hg_commands() { |
|
116 | 117 | (( $#_hg_cmd_list )) || _hg_get_commands |
|
117 |
_describe -t hg-commands ' |
|
|
118 | _describe -t hg-commands 'mercurial command' _hg_cmd_list | |
|
118 | 119 | } |
|
119 | 120 | |
|
120 | 121 | _hg_tags() { |
@@ -183,17 +184,12 b' typeset -A _hg_cmd_globals' | |||
|
183 | 184 | |
|
184 | 185 | # Common options |
|
185 | 186 | _hg_global_opts=( |
|
186 | '(--repository)-R+[repository root directory]:repository:_files -/' | |
|
187 | '(-R)--repository[repository root directory]:repository:_files -/' | |
|
187 | '(--repository -R)'{-R+,--repository}'[repository root directory]:repository:_files -/' | |
|
188 | 188 | '--cwd[change working directory]:new working directory:_files -/' |
|
189 | '(--noninteractive)-y[do not prompt, assume yes for any required answers]' | |
|
190 | '(-y)--noninteractive[do not prompt, assume yes for any required answers]' | |
|
191 | '(--verbose)-v[enable additional output]' | |
|
192 | '(-v)--verbose[enable additional output]' | |
|
193 | '(--quiet)-q[suppress output]' | |
|
194 | '(-q)--quiet[suppress output]' | |
|
195 | '(--help)-h[display help and exit]' | |
|
196 | '(-h)--help[display help and exit]' | |
|
189 | '(--noninteractive -y)'{-y,--noninteractive}'[do not prompt, assume yes for any required answers]' | |
|
190 | '(--verbose -v)'{-v,--verbose}'[enable additional output]' | |
|
191 | '(--quiet -q)'{-q,--quiet}'[suppress output]' | |
|
192 | '(--help -h)'{-h,--help}'[display help and exit]' | |
|
197 | 193 | '--debug[debug mode]' |
|
198 | 194 | '--debugger[start debugger]' |
|
199 | 195 | '--traceback[print traceback on exception]' |
@@ -203,37 +199,28 b' typeset -A _hg_cmd_globals' | |||
|
203 | 199 | ) |
|
204 | 200 | |
|
205 | 201 | _hg_pat_opts=( |
|
206 | '*-I+[include names matching the given patterns]:dir:_files -W $(_hg_cmd root) -/' | |
|
207 |
'* |
|
|
208 | '*-X+[exclude names matching the given patterns]:dir:_files -W $(_hg_cmd root) -/' | |
|
209 | '*--exclude[exclude names matching the given patterns]:dir:_files -W $(_hg_cmd root) -/') | |
|
202 | '*'{-I+,--include}'[include names matching the given patterns]:dir:_files -W $(_hg_cmd root) -/' | |
|
203 | '*'{-X+,--exclude}'[exclude names matching the given patterns]:dir:_files -W $(_hg_cmd root) -/') | |
|
210 | 204 | |
|
211 | 205 | _hg_diff_opts=( |
|
212 | '(--text)-a[treat all files as text]' | |
|
213 | '(-a)--text[treat all files as text]' | |
|
214 | '(--git)-g[use git extended diff format]' | |
|
215 | '(-g)--git[use git extended diff format]' | |
|
206 | '(--text -a)'{-a,--text}'[treat all files as text]' | |
|
207 | '(--git -g)'{-g,--git}'[use git extended diff format]' | |
|
216 | 208 | "--nodates[don't include dates in diff headers]") |
|
217 | 209 | |
|
218 | 210 | _hg_dryrun_opts=( |
|
219 | '(--dry-run)-n[do not perform actions, just print output]' | |
|
220 | '(-n)--dry-run[do not perform actions, just print output]') | |
|
211 | '(--dry-run -n)'{-n,--dry-run}'[do not perform actions, just print output]') | |
|
221 | 212 | |
|
222 | 213 | _hg_style_opts=( |
|
223 | 214 | '--style[display using template map file]:' |
|
224 | 215 | '--template[display with template]:') |
|
225 | 216 | |
|
226 | 217 | _hg_commit_opts=( |
|
227 | '(-m --message -l --logfile --edit)-e[edit commit message]' | |
|
228 |
'(- |
|
|
229 | '(-e --edit -l --logfile --message)-m+[use <text> as commit message]:message:' | |
|
230 | '(-e --edit -l --logfile -m)--message[use <text> as commit message]:message:' | |
|
231 | '(-e --edit -m --message --logfile)-l+[read the commit message from <file>]:log file:_files' | |
|
232 | '(-e --edit -m --message -l)--logfile[read the commit message from <file>]:log file:_files') | |
|
218 | '(-m --message -l --logfile --edit -e)'{-e,--edit}'[edit commit message]' | |
|
219 | '(-e --edit -l --logfile --message -m)'{-m+,--message}'[use <text> as commit message]:message:' | |
|
220 | '(-e --edit -m --message --logfile -l)'{-l+,--logfile}'[read the commit message from <file>]:log file:_files') | |
|
233 | 221 | |
|
234 | 222 | _hg_remote_opts=( |
|
235 | '(--ssh)-e+[specify ssh command to use]:' | |
|
236 | '(-e)--ssh[specify ssh command to use]:' | |
|
223 | '(--ssh -e)'{-e+,--ssh}'[specify ssh command to use]:' | |
|
237 | 224 | '--remotecmd[specify hg command to run on the remote side]:') |
|
238 | 225 | |
|
239 | 226 | _hg_cmd() { |
@@ -247,46 +234,34 b' typeset -A _hg_cmd_globals' | |||
|
247 | 234 | |
|
248 | 235 | _hg_cmd_addremove() { |
|
249 | 236 | _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \ |
|
250 | '(--similarity)-s[guess renamed files by similarity (0<=s<=100)]:' \ | |
|
251 | '(-s)--similarity[guess renamed files by similarity (0<=s<=100)]:' \ | |
|
237 | '(--similarity -s)'{-s+,--similarity}'[guess renamed files by similarity (0<=s<=100)]:' \ | |
|
252 | 238 | '*:unknown or missing files:_hg_addremove' |
|
253 | 239 | } |
|
254 | 240 | |
|
255 | 241 | _hg_cmd_annotate() { |
|
256 | 242 | _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ |
|
257 | '(--rev)-r+[annotate the specified revision]:revision:_hg_tags' \ | |
|
258 | '(-r)--rev[annotate the specified revision]:revision:_hg_tags' \ | |
|
259 | '(--follow)-f[follow file copies and renames]' \ | |
|
260 | '(-f)--follow[follow file copies and renames]' \ | |
|
261 | '(--text)-a[treat all files as text]' \ | |
|
262 | '(-a)--text[treat all files as text]' \ | |
|
263 | '(--user)-u[list the author]' \ | |
|
264 | '(-u)--user[list the author]' \ | |
|
265 | '(--date)-d[list the date]' \ | |
|
266 | '(-d)--date[list the date]' \ | |
|
267 | '(--number)-n[list the revision number (default)]' \ | |
|
268 | '(-n)--number[list the revision number (default)]' \ | |
|
269 | '(--changeset)-c[list the changeset]' \ | |
|
270 | '(-c)--changeset[list the changeset]' \ | |
|
243 | '(--rev -r)'{-r+,--rev}'[annotate the specified revision]:revision:_hg_tags' \ | |
|
244 | '(--follow -f)'{-f,--follow}'[follow file copies and renames]' \ | |
|
245 | '(--text -a)'{-a,--text}'[treat all files as text]' \ | |
|
246 | '(--user -u)'{-u,--user}'[list the author]' \ | |
|
247 | '(--date -d)'{-d,--date}'[list the date]' \ | |
|
248 | '(--number -n)'{-n,--number}'[list the revision number (default)]' \ | |
|
249 | '(--changeset -c)'{-c,--changeset}'[list the changeset]' \ | |
|
271 | 250 | '*:files:_files -W $(_hg_cmd root)' |
|
272 | 251 | } |
|
273 | 252 | |
|
274 | 253 | _hg_cmd_archive() { |
|
275 | 254 | _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ |
|
276 | 255 | '--no-decode[do not pass files through decoders]' \ |
|
277 | '(--prefix)-p+[directory prefix for files in archive]:' \ | |
|
278 | '(-p)--prefix[directory prefix for files in archive]:' \ | |
|
279 | '(--rev)-r+[revision to distribute]:revision:_hg_tags' \ | |
|
280 | '(-r)--rev[revision to distribute]:revision:_hg_tags' \ | |
|
281 | '(--type)-t+[type of distribution to create]:archive type:(files tar tbz2 tgz uzip zip)' \ | |
|
282 | '(-t)--type[type of distribution to create]:archive type:(files tar tbz2 tgz uzip zip)' \ | |
|
256 | '(--prefix -p)'{-p+,--prefix}'[directory prefix for files in archive]:' \ | |
|
257 | '(--rev -r)'{-r+,--rev}'[revision to distribute]:revision:_hg_tags' \ | |
|
258 | '(--type -t)'{-t+,--type}'[type of distribution to create]:archive type:(files tar tbz2 tgz uzip zip)' \ | |
|
283 | 259 | '*:destination:_files' |
|
284 | 260 | } |
|
285 | 261 | |
|
286 | 262 | _hg_cmd_bundle() { |
|
287 | 263 | _arguments -s -w : $_hg_global_opts $_hg_remote_opts \ |
|
288 | '(--force)-f[run even when remote repository is unrelated]' \ | |
|
289 | '(-f)--force[run even when remote repository is unrelated]' \ | |
|
264 | '(--force -f)'{-f,--force}'[run even when remote repository is unrelated]' \ | |
|
290 | 265 | '(2)*--base[a base changeset to specify instead of a destination]:revision:_hg_tags' \ |
|
291 | 266 | ':output file:_files' \ |
|
292 | 267 | ':destination repository:_files -/' |
@@ -294,19 +269,15 b' typeset -A _hg_cmd_globals' | |||
|
294 | 269 | |
|
295 | 270 | _hg_cmd_cat() { |
|
296 | 271 | _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ |
|
297 | '(--output)-o+[print output to file with formatted name]:filespec:' \ | |
|
298 | '(-o)--output[print output to file with formatted name]:filespec:' \ | |
|
299 | '(--rev)-r+[revision]:revision:_hg_tags' \ | |
|
300 | '(-r)--rev[revision]:revision:_hg_tags' \ | |
|
272 | '(--output -o)'{-o+,--output}'[print output to file with formatted name]:filespec:' \ | |
|
273 | '(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_tags' \ | |
|
301 | 274 | '*:file:_files -W $(_hg_cmd root)' |
|
302 | 275 | } |
|
303 | 276 | |
|
304 | 277 | _hg_cmd_clone() { |
|
305 | 278 | _arguments -s -w : $_hg_global_opts $_hg_remote_opts \ |
|
306 | '(--noupdate)-U[do not update the new working directory]' \ | |
|
307 | '(-U)--noupdate[do not update the new working directory]' \ | |
|
308 | '(--rev)-r+[a changeset you would like to have after cloning]:' \ | |
|
309 | '(-r)--rev[a changeset you would like to have after cloning]:' \ | |
|
279 | '(--noupdate -U)'{-U,--noupdate}'[do not update the new working directory]' \ | |
|
280 | '(--rev -r)'{-r+,--rev}'[a changeset you would like to have after cloning]:' \ | |
|
310 | 281 | '--uncompressed[use uncompressed transfer (fast over LAN)]' \ |
|
311 | 282 | ':source repository:_hg_remote' \ |
|
312 | 283 | ':destination:_files -/' |
@@ -314,74 +285,54 b' typeset -A _hg_cmd_globals' | |||
|
314 | 285 | |
|
315 | 286 | _hg_cmd_commit() { |
|
316 | 287 | _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ |
|
317 | '(--addremove)-A[mark new/missing files as added/removed before committing]' | |
|
318 | '(-A)--addremove[mark new/missing files as added/removed before committing]' | |
|
319 | '(--message)-m+[use <text> as commit message]:text:' \ | |
|
320 | '(-m)--message[use <text> as commit message]:text:' \ | |
|
321 | '(--logfile)-l+[read commit message from <file>]:.log file:_file -g \*.txt' \ | |
|
322 | '(-l)--logfile[read commit message from <file>]:.log file:_file -g \*.txt' \ | |
|
323 | '(--date)-d+[record datecode as commit date]:date code:' \ | |
|
324 | '(-d)--date[record datecode as commit date]:date code:' \ | |
|
325 | '(--user)-u+[record user as commiter]:user:' \ | |
|
326 | '(-u)--user[record user as commiter]:user:' \ | |
|
288 | '(--addremove -A)'{-A,--addremove}'[mark new/missing files as added/removed before committing]' | |
|
289 | '(--message -m)'{-m+,--message}'[use <text> as commit message]:text:' \ | |
|
290 | '(--logfile -l)'{-l+,--logfile}'[read commit message from <file>]:log file:_file -g \*.txt' \ | |
|
291 | '(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \ | |
|
292 | '(--user -u)'{-u+,--user}'[record user as commiter]:user:' \ | |
|
327 | 293 | '*:file:_files -W $(_hg_cmd root)' |
|
328 | 294 | } |
|
329 | 295 | |
|
330 | 296 | _hg_cmd_copy() { |
|
331 | 297 | _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \ |
|
332 | '(--after)-A[record a copy that has already occurred]' \ | |
|
333 | '(-A)--after[record a copy that has already occurred]' \ | |
|
334 | '(--force)-f[forcibly copy over an existing managed file]' \ | |
|
335 | '(-f)--force[forcibly copy over an existing managed file]' \ | |
|
298 | '(--after -A)'{-A,--after}'[record a copy that has already occurred]' \ | |
|
299 | '(--force -f)'{-f,--force}'[forcibly copy over an existing managed file]' \ | |
|
336 | 300 | '*:file:_files -W $(_hg_cmd root)' |
|
337 | 301 | } |
|
338 | 302 | |
|
339 | 303 | _hg_cmd_diff() { |
|
340 | 304 | _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_diff_opts \ |
|
341 | 305 | '*'{-r,--rev}'+[revision]:revision:_hg_tags ' \ |
|
342 | '(--show-function)-p[show which function each change is in]' \ | |
|
343 | '(-p)--show-function[show which function each change is in]' \ | |
|
344 | '(--ignore-all-space)-w[ignore white space when comparing lines]' \ | |
|
345 | '(-w)--ignore-all-space[ignore white space when comparing lines]' \ | |
|
346 | '(--ignore-space-change)-b[ignore changes in the amount of white space]' \ | |
|
347 | '(-b)--ignore-space-change[ignore changes in the amount of white space]' \ | |
|
348 | '(--ignore-blank-lines)-B[ignore changes whose lines are all blank]' \ | |
|
349 | '(-B)--ignore-blank-lines[ignore changes whose lines are all blank]' \ | |
|
306 | '(--show-function -p)'{-p,--show-function}'[show which function each change is in]' \ | |
|
307 | '(--ignore-all-space -w)'{-w,--ignore-all-space}'[ignore white space when comparing lines]' \ | |
|
308 | '(--ignore-space-change -b)'{-b,--ignore-space-change}'[ignore changes in the amount of white space]' \ | |
|
309 | '(--ignore-blank-lines -B)'{-B,--ignore-blank-lines}'[ignore changes whose lines are all blank]' \ | |
|
350 | 310 | '*:file:_files -W $(_hg_cmd root)' |
|
351 | 311 | } |
|
352 | 312 | |
|
353 | 313 | _hg_cmd_export() { |
|
354 | 314 | _arguments -s -w : $_hg_global_opts $_hg_diff_opts \ |
|
355 | '(--outout)-o+[print output to file with formatted name]:filespec:' \ | |
|
356 | '(-o)--output[print output to file with formatted name]:filespec:' \ | |
|
315 | '(--outout -o)'{-o+,--output}'[print output to file with formatted name]:filespec:' \ | |
|
357 | 316 | '--switch-parent[diff against the second parent]' \ |
|
358 | 317 | '*:revision:_hg_tags' |
|
359 | 318 | } |
|
360 | 319 | |
|
361 | 320 | _hg_cmd_grep() { |
|
362 | 321 | _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ |
|
363 | '(-print0)-0[end filenames with NUL]' \ | |
|
364 | '(-0)--print0[end filenames with NUL]' \ | |
|
322 | '(--print0 -0)'{-0,--print0}'[end filenames with NUL]' \ | |
|
365 | 323 | '--all[print all revisions with matches]' \ |
|
366 | '(--follow)-f[follow changeset or file history]' \ | |
|
367 | '(-f)--follow[follow changeset or file history]' \ | |
|
368 | '(--ignore-case)-i[ignore case when matching]' \ | |
|
369 | '(-i)--ignore-case[ignore case when matching]' \ | |
|
370 | '(--files-with-matches)-l[print only filenames and revs that match]' \ | |
|
371 | '(-l)--files-with-matches[print only filenames and revs that match]' \ | |
|
372 | '(--line-number)-n[print matching line numbers]' \ | |
|
373 | '(-n)--line-number[print matching line numbers]' \ | |
|
374 | '*-r+[search in given revision range]:revision:_hg_tags' \ | |
|
375 | '*--rev[search in given revision range]:revision:_hg_tags' \ | |
|
376 | '(--user)-u[print user who committed change]' \ | |
|
377 | '(-u)--user[print user who committed change]' \ | |
|
324 | '(--follow -f)'{-f,--follow}'[follow changeset or file history]' \ | |
|
325 | '(--ignore-case -i)'{-i,--ignore-case}'[ignore case when matching]' \ | |
|
326 | '(--files-with-matches -l)'{-l,--files-with-matches}'[print only filenames and revs that match]' \ | |
|
327 | '(--line-number -n)'{-n,--line-number}'[print matching line numbers]' \ | |
|
328 | '*'{-r+,--rev}'[search in given revision range]:revision:_hg_tags' \ | |
|
329 | '(--user -u)'{-u,--user}'[print user who committed change]' \ | |
|
378 | 330 | '*:search pattern:_files -W $(_hg_cmd root)' |
|
379 | 331 | } |
|
380 | 332 | |
|
381 | 333 | _hg_cmd_heads() { |
|
382 | 334 | _arguments -s -w : $_hg_global_opts $_hg_style_opts \ |
|
383 |
'(--rev)-r+[show only heads which are descendants of rev]:revision:_hg_tags' |
|
|
384 | '(-r)--rev[show only heads which are descendants of rev]:revision:_hg_tags' | |
|
335 | '(--rev -r)'{-r+,--rev}'[show only heads which are descendants of rev]:revision:_hg_tags' | |
|
385 | 336 | } |
|
386 | 337 | |
|
387 | 338 | _hg_cmd_help() { |
@@ -391,27 +342,19 b' typeset -A _hg_cmd_globals' | |||
|
391 | 342 | |
|
392 | 343 | _hg_cmd_import() { |
|
393 | 344 | _arguments -s -w : $_hg_global_opts \ |
|
394 | '(--strip)-p+[directory strip option for patch (default: 1)]:count:' \ | |
|
395 | '(-p)--strip[directory strip option for patch (default: 1)]:count:' \ | |
|
396 | '(--message)-m+[use <text> as commit message]:text:' \ | |
|
397 | '(-m)--message[use <text> as commit message]:text:' \ | |
|
398 | '(--force)-f[skip check for outstanding uncommitted changes]' \ | |
|
399 | '(-f)--force[skip check for outstanding uncommitted changes]' \ | |
|
345 | '(--strip -p)'{-p+,--strip}'[directory strip option for patch (default: 1)]:count:' \ | |
|
346 | '(--message -m)'{-m+,--message}'[use <text> as commit message]:text:' \ | |
|
347 | '(--force -f)'{-f,--force}'[skip check for outstanding uncommitted changes]' \ | |
|
400 | 348 | '*:patch:_files' |
|
401 | 349 | } |
|
402 | 350 | |
|
403 | 351 | _hg_cmd_incoming() { |
|
404 | 352 | _arguments -s -w : $_hg_global_opts $_hg_remote_opts $_hg_style_opts \ |
|
405 | '(--no-merges)-M[do not show merge revisions]' \ | |
|
406 | '(-M)--no-merges[do not show merge revisions]' \ | |
|
407 | '(--force)-f[run even when the remote repository is unrelated]' \ | |
|
408 | '(-f)--force[run even when the remote repository is unrelated]' \ | |
|
409 | '(--patch)-p[show patch]' \ | |
|
410 | '(-p)--patch[show patch]' \ | |
|
411 | '(--rev)-r+[a specific revision up to which you would like to pull]' \ | |
|
412 | '(-r)--rev[a specific revision up to which you would like to pull]' \ | |
|
413 | '(--newest-first)-n[show newest record first]' \ | |
|
414 | '(-n)--newest-first[show newest record first]' \ | |
|
353 | '(--no-merges -M)'{-M,--no-merges}'[do not show merge revisions]' \ | |
|
354 | '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \ | |
|
355 | '(--patch -p)'{-p,--patch}'[show patch]' \ | |
|
356 | '(--rev -r)'{-r+,--rev}'[a specific revision up to which you would like to pull]' \ | |
|
357 | '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \ | |
|
415 | 358 | '--bundle[file to store the bundles into]:bundle file:_files' \ |
|
416 | 359 | ':source:_hg_remote' |
|
417 | 360 | } |
@@ -423,35 +366,24 b' typeset -A _hg_cmd_globals' | |||
|
423 | 366 | |
|
424 | 367 | _hg_cmd_locate() { |
|
425 | 368 | _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ |
|
426 | '(--rev)-r+[search repository as it stood at revision]:revision:_hg_tags' \ | |
|
427 | '(-r)--rev[search repository as it stood at revision]:revision:_hg_tags' \ | |
|
428 | '(--print0)-0[end filenames with NUL, for use with xargs]' \ | |
|
429 | '(-0)--print0[end filenames with NUL, for use with xargs]' \ | |
|
430 | '(--fullpath)-f[print complete paths]' \ | |
|
431 | '(-f)--fullpath[print complete paths]' \ | |
|
369 | '(--rev -r)'{-r+,--rev}'[search repository as it stood at revision]:revision:_hg_tags' \ | |
|
370 | '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \ | |
|
371 | '(--fullpath -f)'{-f,--fullpath}'[print complete paths]' \ | |
|
432 | 372 | '*:search pattern:_files -W $(_hg_cmd root)' |
|
433 | 373 | } |
|
434 | 374 | |
|
435 | 375 | _hg_cmd_log() { |
|
436 | 376 | _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_style_opts \ |
|
437 | '(--follow --follow-first)-f[follow changeset or history]' \ | |
|
438 | '(-f --follow-first)--follow[follow changeset or history]' \ | |
|
377 | '(--follow --follow-first -f)'{-f,--follow}'[follow changeset or history]' \ | |
|
439 | 378 | '(-f --follow)--follow-first[only follow the first parent of merge changesets]' \ |
|
440 | '(--copies)-C[show copied files]' \ | |
|
441 | '(-C)--copies[show copied files]' \ | |
|
442 | '(--keyword)-k+[search for a keyword]:' \ | |
|
443 | '(-k)--keyword[search for a keyword]:' \ | |
|
444 | '(--limit)-l+[limit number of changes displayed]:' \ | |
|
445 | '(-l)--limit[limit number of changes displayed]:' \ | |
|
379 | '(--copies -C)'{-C,--copies}'[show copied files]' \ | |
|
380 | '(--keyword -k)'{-k+,--keyword}'[search for a keyword]:' \ | |
|
381 | '(--limit -l)'{-l+,--limit}'[limit number of changes displayed]:' \ | |
|
446 | 382 | '*'{-r,--rev}'[show the specified revision or range]:revision:_hg_tags' \ |
|
447 | '(--no-merges)-M[do not show merges]' \ | |
|
448 | '(-M)--no-merges[do not show merges]' \ | |
|
449 | '(--only-merges)-m[show only merges]' \ | |
|
450 | '(-m)--only-merges[show only merges]' \ | |
|
451 | '(--patch)-p[show patch]' \ | |
|
452 | '(-p)--patch[show patch]' \ | |
|
453 | '(--prune)-P+[do not display revision or any of its ancestors]:revision:_hg_tags' \ | |
|
454 | '(-P)--prune[do not display revision or any of its ancestors]:revision:_hg_tags' \ | |
|
383 | '(--no-merges -M)'{-M,--no-merges}'[do not show merges]' \ | |
|
384 | '(--only-merges -m)'{-m,--only-merges}'[show only merges]' \ | |
|
385 | '(--patch -p)'{-p,--patch}'[show patch]' \ | |
|
386 | '(--prune -P)'{-P+,--prune}'[do not display revision or any of its ancestors]:revision:_hg_tags' \ | |
|
455 | 387 | '*:files:_files -W $(_hg_cmd root)' |
|
456 | 388 | } |
|
457 | 389 | |
@@ -462,23 +394,17 b' typeset -A _hg_cmd_globals' | |||
|
462 | 394 | |
|
463 | 395 | _hg_cmd_outgoing() { |
|
464 | 396 | _arguments -s -w : $_hg_global_opts $_hg_remote_opts $_hg_style_opts \ |
|
465 | '(--no-merges)-M[do not show merge revisions]' \ | |
|
466 | '(-M)--no-merges[do not show merge revisions]' \ | |
|
467 | '(--force)-f[run even when the remote repository is unrelated]' \ | |
|
468 | '(-f)--force[run even when the remote repository is unrelated]' \ | |
|
469 | '(--patch)-p[show patch]' \ | |
|
470 | '(-p)--patch[show patch]' \ | |
|
471 | '(--rev)-r+[a specific revision you would like to push]' \ | |
|
472 | '(-r)--rev[a specific revision you would like to push]' \ | |
|
473 | '(--newest-first)-n[show newest record first]' \ | |
|
474 | '(-n)--newest-first[show newest record first]' \ | |
|
397 | '(--no-merges -M)'{-M,--no-merges}'[do not show merge revisions]' \ | |
|
398 | '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \ | |
|
399 | '(--patch -p)'{-p,--patch}'[show patch]' \ | |
|
400 | '(--rev -r)'{-r+,--rev}'[a specific revision you would like to push]' \ | |
|
401 | '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \ | |
|
475 | 402 | ':destination:_hg_remote' |
|
476 | 403 | } |
|
477 | 404 | |
|
478 | 405 | _hg_cmd_parents() { |
|
479 | 406 | _arguments -s -w : $_hg_global_opts $_hg_style_opts \ |
|
480 | '(--rev)-r[show parents of the specified rev]:revision:_hg_tags' \ | |
|
481 | '(-r)--rev[show parents of the specified rev]:revision:_hg_tags' \ | |
|
407 | '(--rev -r)'{-r+,--rev}'[show parents of the specified rev]:revision:_hg_tags' \ | |
|
482 | 408 | ':revision:_hg_tags' |
|
483 | 409 | } |
|
484 | 410 | |
@@ -489,152 +415,111 b' typeset -A _hg_cmd_globals' | |||
|
489 | 415 | |
|
490 | 416 | _hg_cmd_pull() { |
|
491 | 417 | _arguments -s -w : $_hg_global_opts $_hg_remote_opts \ |
|
492 | '(--force)-f[run even when the remote repository is unrelated]' \ | |
|
493 | '(-f)--force[run even when the remote repository is unrelated]' \ | |
|
494 | '(--update)-u[update to new tip if changesets were pulled]' \ | |
|
495 | '(-u)--update[update to new tip if changesets were pulled]' \ | |
|
418 | '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \ | |
|
419 | '(--update -u)'{-u,--update}'[update to new tip if changesets were pulled]' \ | |
|
496 | 420 | ':source:_hg_remote' |
|
497 | 421 | } |
|
498 | 422 | |
|
499 | 423 | _hg_cmd_push() { |
|
500 | 424 | _arguments -s -w : $_hg_global_opts $_hg_remote_opts \ |
|
501 | '(--force)-f[force push]' \ | |
|
502 | '(-f)--force[force push]' \ | |
|
503 | '(--rev)-r+[a specific revision you would like to push]' \ | |
|
504 | '(-r)--rev[a specific revision you would like to push]' \ | |
|
425 | '(--force -f)'{-f,--force}'[force push]' \ | |
|
426 | '(--rev -r)'{-r+,--rev}'[a specific revision you would like to push]' \ | |
|
505 | 427 | ':destination:_hg_remote' |
|
506 | 428 | } |
|
507 | 429 | |
|
508 | 430 | _hg_cmd_remove() { |
|
509 | 431 | _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ |
|
510 | '(--after)-A[record remove that has already occurred]' \ | |
|
511 | '(-A)--after[record remove that has already occurred]' \ | |
|
512 | '(--force)-f[remove file even if modified]' \ | |
|
513 | '(-f)--force[remove file even if modified]' \ | |
|
432 | '(--after -A)'{-A,--after}'[record remove that has already occurred]' \ | |
|
433 | '(--force -f)'{-f,--force}'[remove file even if modified]' \ | |
|
514 | 434 | '*:file:_files -W $(_hg_cmd root)' |
|
515 | 435 | } |
|
516 | 436 | |
|
517 | 437 | _hg_cmd_rename() { |
|
518 | 438 | _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \ |
|
519 | '(--after)-A[record a rename that has already occurred]' \ | |
|
520 | '(-A)--after[record a rename that has already occurred]' \ | |
|
521 | '(--force)-f[forcibly copy over an existing managed file]' \ | |
|
522 | '(-f)--force[forcibly copy over an existing managed file]' \ | |
|
439 | '(--after -A)'{-A,--after}'[record a rename that has already occurred]' \ | |
|
440 | '(--force -f)'{-f,--force}'[forcibly copy over an existing managed file]' \ | |
|
523 | 441 | '*:file:_files -W $(_hg_cmd root)' |
|
524 | 442 | } |
|
525 | 443 | |
|
526 | 444 | _hg_cmd_revert() { |
|
527 | 445 | _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \ |
|
528 | '(--all :)-a[revert all changes when no arguments given]' \ | |
|
529 | '(-a :)--all[revert all changes when no arguments given]' \ | |
|
530 | '(--rev)-r+[revision to revert to]:revision:_hg_tags' \ | |
|
531 | '(-r)--rev[revision to revert to]:revision:_hg_tags' \ | |
|
446 | '(--all -a :)'{-a,--all}'[revert all changes when no arguments given]' \ | |
|
447 | '(--rev -r)'{-r+,--rev}'[revision to revert to]:revision:_hg_tags' \ | |
|
532 | 448 | '--no-backup[do not save backup copies of files]' \ |
|
533 | 449 | '*:file:_files -W $(_hg_cmd root)' |
|
534 | 450 | } |
|
535 | 451 | |
|
536 | 452 | _hg_cmd_serve() { |
|
537 | 453 | _arguments -s -w : $_hg_global_opts \ |
|
538 | '(--accesslog)-A+[name of access log file]:log file:_files' \ | |
|
539 |
'(- |
|
|
540 | '(--errorlog)-E+[name of error log file]:log file:_files' \ | |
|
541 | '(-E)--errorlog[name of error log file]:log file:_files' \ | |
|
542 | '(--daemon)-d[run server in background]' \ | |
|
543 | '(-d)--daemon[run server in background]' \ | |
|
544 | '(--port)-p+[listen port]:listen port:' \ | |
|
545 | '(-p)--port[listen port]:listen port:' \ | |
|
546 | '(--address)-a+[interface address]:interface address:' \ | |
|
547 | '(-a)--address[interface address]:interface address:' \ | |
|
548 | '(--name)-n+[name to show in web pages]:repository name:' \ | |
|
549 | '(-n)--name[name to show in web pages]:repository name:' \ | |
|
550 | '(--templates)-t[web template directory]:template dir:_files -/' \ | |
|
551 | '(-t)--templates[web template directory]:template dir:_files -/' \ | |
|
454 | '(--accesslog -A)'{-A+,--accesslog}'[name of access log file]:log file:_files' \ | |
|
455 | '(--errorlog -E)'{-E+,--errorlog}'[name of error log file]:log file:_files' \ | |
|
456 | '(--daemon -d)'{-d,--daemon}'[run server in background]' \ | |
|
457 | '(--port -p)'{-p+,--port}'[listen port]:listen port:' \ | |
|
458 | '(--address -a)'{-a+,--address}'[interface address]:interface address:' \ | |
|
459 | '(--name -n)'{-n+,--name}'[name to show in web pages]:repository name:' \ | |
|
460 | '(--templates -t)'{-t,--templates}'[web template directory]:template dir:_files -/' \ | |
|
552 | 461 | '--style[web template style]:style' \ |
|
553 | 462 | '--stdio[for remote clients]' \ |
|
554 |
'(--ipv6)-6[use IPv6 in addition to IPv4]' |
|
|
555 | '(-6)--ipv6[use IPv6 in addition to IPv4]' | |
|
463 | '(--ipv6 -6)'{-6,--ipv6}'[use IPv6 in addition to IPv4]' | |
|
556 | 464 | } |
|
557 | 465 | |
|
558 | 466 | _hg_cmd_status() { |
|
559 | 467 | _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ |
|
560 | '(--all)-A[show status of all files]' \ | |
|
561 | '(-A)--all[show status of all files]' \ | |
|
562 |
'(-- |
|
|
563 |
'(- |
|
|
564 |
'(-- |
|
|
565 | '(-a)--added[show only added files]' \ | |
|
566 | '(--removed)-r[show only removed files]' \ | |
|
567 |
'(- |
|
|
568 | '(--deleted)-d[show only deleted (but tracked) files]' \ | |
|
569 | '(-d)--deleted[show only deleted (but tracked) files]' \ | |
|
570 | '(--clean)-c[show only files without changes]' \ | |
|
571 | '(-c)--clean[show only files without changes]' \ | |
|
572 | '(--unknown)-u[show only unknown files]' \ | |
|
573 | '(-u)--unknown[show only unknown files]' \ | |
|
574 | '(--ignored)-i[show ignored files]' \ | |
|
575 | '(-i)--ignored[show ignored files]' \ | |
|
576 | '(--no-status)-n[hide status prefix]' \ | |
|
577 | '(-n)--no-status[hide status prefix]' \ | |
|
578 | '(--copies)-C[show source of copied files]' \ | |
|
579 | '(-C)--copies[show source of copied files]' \ | |
|
580 | '(--print0)-0[end filenames with NUL, for use with xargs]' \ | |
|
581 | '(-0)--print0[end filenames with NUL, for use with xargs]' \ | |
|
468 | '(--all -A)'{-A,--all}'[show status of all files]' \ | |
|
469 | '(--modified -m)'{-m,--modified}'[show only modified files]' \ | |
|
470 | '(--added -a)'{-a,--added}'[show only added files]' \ | |
|
471 | '(--removed -r)'{-r,--removed}'[show only removed files]' \ | |
|
472 | '(--deleted -d)'{-d,--deleted}'[show only deleted (but tracked) files]' \ | |
|
473 | '(--clean -c)'{-c,--clean}'[show only files without changes]' \ | |
|
474 | '(--unknown -u)'{-u,--unknown}'[show only unknown files]' \ | |
|
475 | '(--ignored -i)'{-i,--ignored}'[show ignored files]' \ | |
|
476 | '(--no-status -n)'{-n,--no-status}'[hide status prefix]' \ | |
|
477 | '(--copies -C)'{-C,--copies}'[show source of copied files]' \ | |
|
478 | '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \ | |
|
582 | 479 | '--rev[show difference from revision]:revision:_hg_tags' \ |
|
583 | 480 | '*:files:_files' |
|
584 | 481 | } |
|
585 | 482 | |
|
586 | 483 | _hg_cmd_tag() { |
|
587 | 484 | _arguments -s -w : $_hg_global_opts \ |
|
588 | '(--local)-l[make the tag local]' \ | |
|
589 | '(-l)--local[make the tag local]' \ | |
|
590 | '(--message)-m+[message for tag commit log entry]:message:' \ | |
|
591 | '(-m)--message[message for tag commit log entry]:message:' \ | |
|
592 | '(--date)-d+[record datecode as commit date]:date code:' \ | |
|
593 | '(-d)--date[record datecode as commit date]:date code:' \ | |
|
594 | '(--user)-u+[record user as commiter]:user:' \ | |
|
595 | '(-u)--user[record user as commiter]:user:' \ | |
|
596 | '(--rev)-r+[revision to tag]:revision:_hg_tags' \ | |
|
597 | '(-r)--rev[revision to tag]:revision:_hg_tags' \ | |
|
485 | '(--local -l)'{-l,--local}'[make the tag local]' \ | |
|
486 | '(--message -m)'{-m+,--message}'[message for tag commit log entry]:message:' \ | |
|
487 | '(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \ | |
|
488 | '(--user -u)'{-u+,--user}'[record user as commiter]:user:' \ | |
|
489 | '(--rev -r)'{-r+,--rev}'[revision to tag]:revision:_hg_tags' \ | |
|
598 | 490 | ':tag name:' |
|
599 | 491 | } |
|
600 | 492 | |
|
601 | 493 | _hg_cmd_tip() { |
|
602 | 494 | _arguments -s -w : $_hg_global_opts $_hg_style_opts \ |
|
603 |
'(--patch)-p[show patch]' |
|
|
604 | '(-p)--patch[show patch]' | |
|
495 | '(--patch -p)'{-p,--patch}'[show patch]' | |
|
605 | 496 | } |
|
606 | 497 | |
|
607 | 498 | _hg_cmd_unbundle() { |
|
608 | 499 | _arguments -s -w : $_hg_global_opts \ |
|
609 | '(--update)-u[update to new tip if changesets were unbundled]' \ | |
|
610 | '(-u)--update[update to new tip if changesets were unbundled]' \ | |
|
500 | '(--update -u)'{-u,--update}'[update to new tip if changesets were unbundled]' \ | |
|
611 | 501 | ':files:_files' |
|
612 | 502 | } |
|
613 | 503 | |
|
614 | 504 | _hg_cmd_update() { |
|
615 | 505 | _arguments -s -w : $_hg_global_opts \ |
|
616 | '(--clean)-C[overwrite locally modified files]' \ | |
|
617 | '(-C)--clean[overwrite locally modified files]' \ | |
|
618 | '(--force)-f[force a merge with outstanding changes]' \ | |
|
619 | '(-f)--force[force a merge with outstanding changes]' \ | |
|
506 | '(--clean -C)'{-C,--clean}'[overwrite locally modified files]' \ | |
|
507 | '(--force -f)'{-f,--force}'[force a merge with outstanding changes]' \ | |
|
620 | 508 | ':revision:_hg_tags' |
|
621 | 509 | } |
|
622 | 510 | |
|
623 | 511 | # HGK |
|
624 | 512 | _hg_cmd_view() { |
|
625 | 513 | _arguments -s -w : $_hg_global_opts \ |
|
626 | '(--limit)-l+[limit number of changes displayed]:' \ | |
|
627 | '(-l)--limit[limit number of changes displayed]:' \ | |
|
514 | '(--limit -l)'{-l+,--limit}'[limit number of changes displayed]:' \ | |
|
628 | 515 | ':revision range:_hg_tags' |
|
629 | 516 | } |
|
630 | 517 | |
|
631 | 518 | # MQ |
|
632 | 519 | _hg_cmd_qdelete() { |
|
633 | 520 | _arguments -s -w : $_hg_global_opts \ |
|
634 | '(--keep)-k[keep patch file]' \ | |
|
635 | '(-k)--keep[keep patch file]' \ | |
|
636 | '*-r+[stop managing a revision]:applied patch:_hg_qapplied' \ | |
|
637 | '*--revision[stop managing a revision]:applied patch:_hg_qapplied' \ | |
|
521 | '(--keep -k)'{-k,--keep}'[keep patch file]' \ | |
|
522 | '*'{-r+,--rev}'[stop managing a revision]:applied patch:_hg_qapplied' \ | |
|
638 | 523 | '*:patch:_hg_qunapplied' |
|
639 | 524 | } |
|
640 | 525 | |
@@ -645,54 +530,40 b' typeset -A _hg_cmd_globals' | |||
|
645 | 530 | |
|
646 | 531 | _hg_cmd_qnew() { |
|
647 | 532 | _arguments -s -w : $_hg_global_opts $_hg_commit_opts \ |
|
648 | '(--force)-f[import uncommitted changes into patch]' \ | |
|
649 | '(-f)--force[import uncommitted changes into patch]' \ | |
|
533 | '(--force -f)'{-f,--force}'[import uncommitted changes into patch]' \ | |
|
650 | 534 | ':patch:' |
|
651 | 535 | } |
|
652 | 536 | |
|
653 | 537 | _hg_cmd_qpop() { |
|
654 | 538 | _arguments -s -w : $_hg_global_opts \ |
|
655 | '(--all :)-a[pop all patches]' \ | |
|
656 | '(-a :)--all[pop all patches]' \ | |
|
657 | '(--name)-n+[queue name to pop]:' \ | |
|
658 | '(-n)--name[queue name to pop]:' \ | |
|
659 | '(--force)-f[forget any local changes]' \ | |
|
660 | '(-f)--force[forget any local changes]' \ | |
|
539 | '(--all -a :)'{-a,--all}'[pop all patches]' \ | |
|
540 | '(--name -n)'{-n+,--name}'[queue name to pop]:' \ | |
|
541 | '(--force -f)'{-f,--force}'[forget any local changes]' \ | |
|
661 | 542 | ':patch:_hg_qapplied' |
|
662 | 543 | } |
|
663 | 544 | |
|
664 | 545 | _hg_cmd_qpush() { |
|
665 | 546 | _arguments -s -w : $_hg_global_opts \ |
|
666 | '(--all :)-a[apply all patches]' \ | |
|
667 | '(-a :)--all[apply all patches]' \ | |
|
668 | '(--list)-l[list patch name in commit text]' \ | |
|
669 | '(-l)--list[list patch name in commit text]' \ | |
|
670 | '(--merge)-m+[merge from another queue]:' \ | |
|
671 | '(-m)--merge[merge from another queue]:' \ | |
|
672 | '(--name)-n+[merge queue name]:' \ | |
|
673 | '(-n)--name[merge queue name]:' \ | |
|
674 | '(--force)-f[apply if the patch has rejects]' \ | |
|
675 | '(-f)--force[apply if the patch has rejects]' \ | |
|
547 | '(--all -a :)'{-a,--all}'[apply all patches]' \ | |
|
548 | '(--list -l)'{-l,--list}'[list patch name in commit text]' \ | |
|
549 | '(--merge -m)'{-m+,--merge}'[merge from another queue]:' \ | |
|
550 | '(--name -n)'{-n+,--name}'[merge queue name]:' \ | |
|
551 | '(--force -f)'{-f,--force}'[apply if the patch has rejects]' \ | |
|
676 | 552 | ':patch:_hg_qunapplied' |
|
677 | 553 | } |
|
678 | 554 | |
|
679 | 555 | _hg_cmd_qrefresh() { |
|
680 | 556 | _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_commit_opts \ |
|
681 | '(--git)-g[use git extended diff format]' \ | |
|
682 | '(-g)--git[use git extended diff format]' \ | |
|
683 | '(--short)-s[short refresh]' \ | |
|
684 | '(-s)--short[short refresh]' \ | |
|
557 | '(--git -g)'{-g,--git}'[use git extended diff format]' \ | |
|
558 | '(--short -s)'{-s,--short}'[short refresh]' \ | |
|
685 | 559 | '*:files:_files -W $(_hg_cmd root)' |
|
686 | 560 | } |
|
687 | 561 | |
|
688 | 562 | _hg_cmd_strip() { |
|
689 | 563 | _arguments -s -w : $_hg_global_opts \ |
|
690 | '(--force)-f[force multi-head removal]' \ | |
|
691 | '(-f)--force[force multi-head removal]' \ | |
|
692 | '(--backup)-b[bundle unrelated changesets]' \ | |
|
693 | '(-b)--backup[bundle unrelated changesets]' \ | |
|
694 | '(--nobackup)-n[no backups]' \ | |
|
695 | '(-n)--nobackup[no backups]' \ | |
|
564 | '(--force -f)'{-f,--force}'[force multi-head removal]' \ | |
|
565 | '(--backup -b)'{-b,--backup}'[bundle unrelated changesets]' \ | |
|
566 | '(--nobackup -n)'{-n,--nobackup}'[no backups]' \ | |
|
696 | 567 | ':revision:_hg_tags' |
|
697 | 568 | } |
|
698 | 569 |
General Comments 0
You need to be logged in to leave comments.
Login now