Mercurial > hg-stable
comparison contrib/zsh_completion @ 39236:362c4603602d
zsh_completion: update all options
It's just too hard to further split this patch. What it does:
- adds missing flags
- removes flags that are no longer there
- updates flag descriptions and argument names
- adds * where using the same option many times is okay
- groups with () mutually exclusive flags that can't be used together
- adds + and = to options that need arguments
- removes + and = from options that don't take any arguments
- fixes minor issues and a typo
Differential Revision: https://phab.mercurial-scm.org/D4267
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Fri, 10 Aug 2018 23:24:33 +0800 |
parents | f625e457f43a |
children | d0dfdf263a20 |
comparison
equal
deleted
inserted
replaced
39235:f625e457f43a | 39236:362c4603602d |
---|---|
369 _describe -t help_topics 'help topics' topics | 369 _describe -t help_topics 'help topics' topics |
370 } | 370 } |
371 | 371 |
372 # Common options | 372 # Common options |
373 _hg_global_opts=( | 373 _hg_global_opts=( |
374 '(--repository -R)'{-R+,--repository=}'[repository root directory]:repository:_files -/' | 374 '(--repository -R)'{-R+,--repository=}'[repository root directory or name of overlay bundle file]:repository:_files -/' |
375 '--cwd[change working directory]:new working directory:_files -/' | 375 '--cwd=[change working directory]:new working directory:_files -/' |
376 '(--noninteractive -y)'{-y,--noninteractive}'[do not prompt, assume yes for any required answers]' | 376 '(--noninteractive -y)'{-y,--noninteractive}'[do not prompt, automatically pick the first choice for all prompts]' |
377 '(--verbose -v)'{-v,--verbose}'[enable additional output]' | 377 '(--verbose -v)'{-v,--verbose}'[enable additional output]' |
378 '*--config[set/override config option]:defined config items:_hg_config' | 378 '*--config[set/override config option]:defined config items:_hg_config' |
379 '(--quiet -q)'{-q,--quiet}'[suppress output]' | 379 '(--quiet -q)'{-q,--quiet}'[suppress output]' |
380 '(--help -h)'{-h,--help}'[display help and exit]' | 380 '(--help -h)'{-h,--help}'[display help and exit]' |
381 '--debug[debug mode]' | 381 '--debug[enable debugging output]' |
382 '--debugger[start debugger]' | 382 '--debugger[start debugger]' |
383 '--encoding[set the charset encoding]' | 383 '--encoding=[set the charset encoding]:encoding' |
384 '--encodingmode[set the charset encoding mode]' | 384 '--encodingmode=[set the charset encoding mode]:encoding mode' |
385 '--lsprof[print improved command execution profile]' | 385 '--traceback[always print a traceback on exception]' |
386 '--traceback[print traceback on exception]' | |
387 '--time[time how long the command takes]' | 386 '--time[time how long the command takes]' |
388 '--profile[profile]' | 387 '--profile[print command execution profile]' |
389 '--version[output version information and exit]' | 388 '--version[output version information and exit]' |
389 '--hidden[consider hidden changesets]' | |
390 '--color=[when to colorize]:when:(true false yes no always auto never debug)' | |
391 '--pager=[when to paginate (default: auto)]:when:(true false yes no always auto never)' | |
390 ) | 392 ) |
391 | 393 |
392 _hg_pat_opts=( | 394 _hg_pat_opts=( |
393 '*'{-I+,--include=}'[include names matching the given patterns]:dir:_files -W $(_hg_cmd root) -/' | 395 '*'{-I+,--include=}'[include names matching the given patterns]:dir:_files -W $(_hg_cmd root) -/' |
394 '*'{-X+,--exclude=}'[exclude names matching the given patterns]:dir:_files -W $(_hg_cmd root) -/') | 396 '*'{-X+,--exclude=}'[exclude names matching the given patterns]:dir:_files -W $(_hg_cmd root) -/') |
400 '--uncompressed[use uncompressed transfer (fast over LAN)]') | 402 '--uncompressed[use uncompressed transfer (fast over LAN)]') |
401 | 403 |
402 _hg_date_user_opts=( | 404 _hg_date_user_opts=( |
403 '(--currentdate -D)'{-D,--currentdate}'[record the current date as commit date]' | 405 '(--currentdate -D)'{-D,--currentdate}'[record the current date as commit date]' |
404 '(--currentuser -U)'{-U,--currentuser}'[record the current user as committer]' | 406 '(--currentuser -U)'{-U,--currentuser}'[record the current user as committer]' |
405 '(--date -d)'{-d+,--date=}'[record the specified date as commit date]:date:' | 407 '(--date -d)'{-d+,--date=}'[record the specified date as commit date]:date' |
406 '(--user -u)'{-u+,--user=}'[record the specified user as committer]:user:') | 408 '(--user -u)'{-u+,--user=}'[record the specified user as committer]:user') |
407 | 409 |
408 _hg_gitlike_opts=( | 410 _hg_gitlike_opts=( |
409 '(--git -g)'{-g,--git}'[use git extended diff format]') | 411 '(--git -g)'{-g,--git}'[use git extended diff format]') |
410 | 412 |
411 _hg_diff_opts=( | 413 _hg_diff_opts=( |
412 $_hg_gitlike_opts | 414 $_hg_gitlike_opts |
413 '(--text -a)'{-a,--text}'[treat all files as text]' | 415 '(--text -a)'{-a,--text}'[treat all files as text]' |
414 '--nodates[omit dates from diff headers]') | 416 '--nodates[omit dates from diff headers]') |
415 | 417 |
416 _hg_mergetool_opts=( | 418 _hg_mergetool_opts=( |
417 '(--tool -t)'{-t+,--tool=}'[specify merge tool]:tool:') | 419 '(--tool -t)'{-t+,--tool=}'[specify merge tool]:merge tool' |
420 ) | |
418 | 421 |
419 _hg_dryrun_opts=( | 422 _hg_dryrun_opts=( |
420 '(--dry-run -n)'{-n,--dry-run}'[do not perform actions, just print output]') | 423 '(--dry-run -n)'{-n,--dry-run}'[do not perform actions, just print output]') |
421 | 424 |
422 _hg_ignore_space_opts=( | 425 _hg_ignore_space_opts=( |
423 '(--ignore-all-space -w)'{-w,--ignore-all-space}'[ignore white space when comparing lines]' | 426 '(--ignore-all-space -w)'{-w,--ignore-all-space}'[ignore white space when comparing lines]' |
424 '(--ignore-space-change -b)'{-b,--ignore-space-change}'[ignore changes in the amount of white space]' | 427 '(--ignore-space-change -b)'{-b,--ignore-space-change}'[ignore changes in the amount of white space]' |
425 '(--ignore-blank-lines -B)'{-B,--ignore-blank-lines}'[ignore changes whose lines are all blank]') | 428 '(--ignore-blank-lines -B)'{-B,--ignore-blank-lines}'[ignore changes whose lines are all blank]' |
429 '(--ignore-space-at-eol -Z)'{-Z,--ignore-space-at-eol}'[ignore changes in whitespace at EOL]' | |
430 ) | |
426 | 431 |
427 _hg_template_opts=( | 432 _hg_template_opts=( |
428 '--template[display with template]:template' | 433 '--template[display with template]:template' |
429 ) | 434 ) |
430 | 435 |
431 _hg_log_opts=( | 436 _hg_log_opts=( |
432 $_hg_global_opts $_hg_template_opts $_hg_gitlike_opts | 437 $_hg_global_opts $_hg_template_opts $_hg_gitlike_opts |
433 '(--limit -l)'{-l+,--limit=}'[limit number of changes displayed]:' | 438 '(--limit -l)'{-l+,--limit=}'[limit number of changes displayed]:limit' |
434 '(--no-merges -M)'{-M,--no-merges}'[do not show merges]' | 439 '(--no-merges -M)'{-M,--no-merges}'[do not show merges]' |
435 '(--patch -p)'{-p,--patch}'[show patch]' | 440 '(--patch -p)'{-p,--patch}'[show patch]' |
436 '--stat[output diffstat-style summary of changes]' | 441 '--stat[output diffstat-style summary of changes]' |
442 '(--graph -G)'{-G,--graph}'[show the revision DAG]' | |
437 ) | 443 ) |
438 | 444 |
439 _hg_commit_opts=( | 445 _hg_commit_opts=( |
440 '(-m --message -l --logfile --edit -e)'{-e,--edit}'[edit commit message]' | 446 '(-m --message -l --logfile --edit -e)'{-e,--edit}'[edit commit message]' |
441 '(-e --edit -l --logfile --message -m)'{-m+,--message=}'[use <text> as commit message]:message:' | 447 '(-e --edit -l --logfile --message -m)'{-m+,--message=}'[use <text> as commit message]:message' |
442 '(-e --edit -m --message --logfile -l)'{-l+,--logfile=}'[read the commit message from <file>]:log file:_files') | 448 '(-e --edit -m --message --logfile -l)'{-l+,--logfile=}'[read the commit message from <file>]:log file:_files') |
443 | 449 |
444 _hg_remote_opts=( | 450 _hg_remote_opts=( |
445 '(--ssh -e)'{-e+,--ssh=}'[specify ssh command to use]:' | 451 '(--ssh -e)'{-e+,--ssh=}'[specify ssh command to use]:command' |
446 '--remotecmd[specify hg command to run on the remote side]:') | 452 '--remotecmd=[specify hg command to run on the remote side]:remote command' |
453 '--insecure[do not verify server certificate (ignoring web.cacerts config)]' | |
454 ) | |
447 | 455 |
448 _hg_branch_bmark_opts=( | 456 _hg_branch_bmark_opts=( |
449 '(--bookmark -B)'{-B+,--bookmark=}'[specify bookmark(s)]:bookmark:_hg_bookmarks' | 457 '(--bookmark -B)'{-B+,--bookmark=}'[specify bookmark(s)]:bookmark:_hg_bookmarks' |
450 '(--branch -b)'{-b+,--branch=}'[specify branch(es)]:branch:_hg_branches' | 458 '(--branch -b)'{-b+,--branch=}'[specify branch(es)]:branch:_hg_branches' |
451 ) | 459 ) |
462 '*:unknown files:_hg_unknown' | 470 '*:unknown files:_hg_unknown' |
463 } | 471 } |
464 | 472 |
465 _hg_cmd_addremove() { | 473 _hg_cmd_addremove() { |
466 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \ | 474 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \ |
467 '(--similarity -s)'{-s+,--similarity=}'[guess renamed files by similarity (0<=s<=100)]:' \ | 475 '(--similarity -s)'{-s+,--similarity=}'[guess renamed files by similarity (0<=s<=100)]:similarity' \ |
468 '*:unknown or missing files:_hg_addremove' | 476 '*:unknown or missing files:_hg_addremove' |
469 } | 477 } |
470 | 478 |
471 _hg_cmd_annotate() { | 479 _hg_cmd_annotate() { |
472 _arguments -s -S : $_hg_global_opts $_hg_pat_opts \ | 480 _arguments -s -S : $_hg_global_opts $_hg_ignore_space_opts $_hg_pat_opts \ |
473 '(--rev -r)'{-r+,--rev=}'[annotate the specified revision]:revision:_hg_labels' \ | 481 '(--rev -r)'{-r+,--rev=}'[annotate the specified revision]:revision:_hg_labels' \ |
474 '(--follow -f)'{-f,--follow}'[follow file copies and renames]' \ | 482 "--no-follow[don't follow copies and renames]" \ |
475 '(--text -a)'{-a,--text}'[treat all files as text]' \ | 483 '(--text -a)'{-a,--text}'[treat all files as text]' \ |
476 '(--user -u)'{-u,--user}'[list the author]' \ | 484 '(--user -u)'{-u,--user}'[list the author (long with -v)]' \ |
477 '(--date -d)'{-d,--date}'[list the date]' \ | 485 '(--file -f)'{-f,--file}'[list the filename]' \ |
486 '(--date -d)'{-d,--date}'[list the date (short with -q)]' \ | |
478 '(--number -n)'{-n,--number}'[list the revision number (default)]' \ | 487 '(--number -n)'{-n,--number}'[list the revision number (default)]' \ |
479 '(--changeset -c)'{-c,--changeset}'[list the changeset]' \ | 488 '(--changeset -c)'{-c,--changeset}'[list the changeset]' \ |
489 '(--line-number -l)'{-l,--line-number}'[show line number at the first appearance]' \ | |
480 '*:files:_hg_files' | 490 '*:files:_hg_files' |
481 } | 491 } |
482 | 492 |
483 _hg_cmd_archive() { | 493 _hg_cmd_archive() { |
484 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \ | 494 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \ |
485 '--no-decode[do not pass files through decoders]' \ | 495 '--no-decode[do not pass files through decoders]' \ |
486 '(--prefix -p)'{-p+,--prefix=}'[directory prefix for files in archive]:' \ | 496 '(--prefix -p)'{-p+,--prefix=}'[directory prefix for files in archive]:prefix' \ |
487 '(--rev -r)'{-r+,--rev=}'[revision to distribute]:revision:_hg_labels' \ | 497 '(--rev -r)'{-r+,--rev=}'[revision to distribute]:revision:_hg_labels' \ |
488 '(--type -t)'{-t+,--type=}'[type of distribution to create]:archive type:(files tar tbz2 tgz uzip zip)' \ | 498 '(--type -t)'{-t+,--type=}'[type of distribution to create]:archive type:(files tar tbz2 tgz uzip zip)' \ |
489 '*:destination:_files' | 499 '*:destination:_files' |
490 } | 500 } |
491 | 501 |
492 _hg_cmd_backout() { | 502 _hg_cmd_backout() { |
493 _arguments -s -S : $_hg_global_opts $_hg_mergetool_opts $_hg_pat_opts \ | 503 _arguments -s -S : $_hg_global_opts $_hg_mergetool_opts $_hg_pat_opts \ |
494 '--merge[merge with old dirstate parent after backout]' \ | 504 '--merge[merge with old dirstate parent after backout]' \ |
495 '(--date -d)'{-d+,--date=}'[record datecode as commit date]:date code:' \ | 505 '(--date -d)'{-d+,--date=}'[record the specified date as commit date]:date' \ |
496 '--parent[parent to choose when backing out merge]' \ | 506 '--parent[parent to choose when backing out merge]' \ |
497 '(--user -u)'{-u+,--user=}'[record user as commiter]:user:' \ | 507 '(--user -u)'{-u+,--user=}'[record the specified user as committer]:user' \ |
498 '(--rev -r)'{-r+,--rev=}'[revision]:revision:_hg_labels' \ | 508 '(--rev -r 1)'{-r+,--rev=}'[revision to backout]:revision:_hg_labels' \ |
499 '(--message -m)'{-m+,--message=}'[use <text> as commit message]:text:' \ | 509 '(--message -m)'{-m+,--message=}'[use <text> as commit message]:text' \ |
500 '(--logfile -l)'{-l+,--logfile=}'[read commit message from <file>]:log file:_files' | 510 '(--logfile -l)'{-l+,--logfile=}'[read commit message from <file>]:log file:_files' \ |
511 ':revision:_hg_labels' | |
501 } | 512 } |
502 | 513 |
503 _hg_cmd_bisect() { | 514 _hg_cmd_bisect() { |
504 _arguments -s -S : $_hg_global_opts \ | 515 _arguments -s -S : $_hg_global_opts \ |
505 '(-)'{-r,--reset}'[reset bisect state]' \ | 516 '(-)'{-r,--reset}'[reset bisect state]' \ |
527 '(--clean -C)'{-C,--clean}'[reset branch name to parent branch name]' | 538 '(--clean -C)'{-C,--clean}'[reset branch name to parent branch name]' |
528 } | 539 } |
529 | 540 |
530 _hg_cmd_branches() { | 541 _hg_cmd_branches() { |
531 _arguments -s -S : $_hg_global_opts \ | 542 _arguments -s -S : $_hg_global_opts \ |
532 '(--active -a)'{-a,--active}'[show only branches that have unmerge heads]' \ | |
533 '(--closed -c)'{-c,--closed}'[show normal and closed branches]' | 543 '(--closed -c)'{-c,--closed}'[show normal and closed branches]' |
534 } | 544 } |
535 | 545 |
536 _hg_cmd_bundle() { | 546 _hg_cmd_bundle() { |
537 _arguments -s -S : $_hg_global_opts $_hg_remote_opts \ | 547 _arguments -s -S : $_hg_global_opts $_hg_remote_opts \ |
538 '(--force -f)'{-f,--force}'[run even when remote repository is unrelated]' \ | 548 '(--force -f)'{-f,--force}'[run even when the destination is unrelated]' \ |
539 '(2)*--base[a base changeset to specify instead of a destination]:revision:_hg_labels' \ | 549 '(2)*--base[a base changeset assumed to be available at the destination]:revision:_hg_labels' \ |
540 '(--branch -b)'{-b+,--branch=}'[a specific branch to bundle]:' \ | 550 '*'{-b+,--branch=}'[a specific branch you would like to bundle]:branch:_hg_branches' \ |
541 '(--rev -r)'{-r+,--rev=}'[changeset(s) to bundle]:' \ | 551 '*'{-r+,--rev=}'[a changeset intended to be added to the destination]:revision:_hg_labels' \ |
542 '--all[bundle all changesets in the repository]' \ | 552 '--all[bundle all changesets in the repository]' \ |
553 '--type[bundle compression type to use (default: bzip2)]:bundle type' \ | |
543 ':output file:_files' \ | 554 ':output file:_files' \ |
544 ':destination repository:_files -/' | 555 ':destination repository:_files -/' |
545 } | 556 } |
546 | 557 |
547 _hg_cmd_cat() { | 558 _hg_cmd_cat() { |
548 _arguments -s -S : $_hg_global_opts $_hg_pat_opts \ | 559 _arguments -s -S : $_hg_global_opts $_hg_pat_opts \ |
549 '(--output -o)'{-o+,--output=}'[print output to file with formatted name]:filespec:' \ | 560 '(--output -o)'{-o+,--output=}'[print output to file with formatted name]:format string' \ |
550 '(--rev -r)'{-r+,--rev=}'[revision]:revision:_hg_labels' \ | 561 '(--rev -r)'{-r+,--rev=}'[revision]:revision:_hg_labels' \ |
551 '--decode[apply any matching decode filter]' \ | 562 '--decode[apply any matching decode filter]' \ |
552 '*:file:_hg_files' | 563 '*:file:_hg_files' |
553 } | 564 } |
554 | 565 |
555 _hg_cmd_clone() { | 566 _hg_cmd_clone() { |
556 _arguments -s -S : $_hg_global_opts $_hg_clone_opts \ | 567 _arguments -s -S : $_hg_global_opts $_hg_clone_opts \ |
557 '(--rev -r)'{-r+,--rev=}'[a changeset you would like to have after cloning]:' \ | 568 '*'{-r+,--rev=}'[do not clone everything, but include this changeset and its ancestors]:revision' \ |
558 '(--updaterev -u)'{-u+,--updaterev=}'[revision, tag or branch to check out]:' \ | 569 '(--updaterev -u)'{-u+,--updaterev=}'[revision, tag or branch to check out]:revision' \ |
559 '(--branch -b)'{-b+,--branch=}'[clone only the specified branch]:' \ | 570 '*'{-b+,--branch=}"[do not clone everything, but include this branch's changesets and their ancestors]:branch" \ |
560 ':source repository:_hg_remote' \ | 571 ':source repository:_hg_remote' \ |
561 ':destination:_hg_clone_dest' | 572 ':destination:_hg_clone_dest' |
562 } | 573 } |
563 | 574 |
564 _hg_cmd_commit() { | 575 _hg_cmd_commit() { |
565 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \ | 576 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \ |
566 '(--addremove -A)'{-A,--addremove}'[mark new/missing files as added/removed before committing]' \ | 577 '(--addremove -A)'{-A,--addremove}'[mark new/missing files as added/removed before committing]' \ |
567 '(--message -m)'{-m+,--message=}'[use <text> as commit message]:text:' \ | 578 '(--message -m)'{-m+,--message=}'[use <text> as commit message]:text' \ |
568 '(--logfile -l)'{-l+,--logfile=}'[read commit message from <file>]:log file:_files' \ | 579 '(--logfile -l)'{-l+,--logfile=}'[read commit message from <file>]:log file:_files' \ |
569 '(--date -d)'{-d+,--date=}'[record datecode as commit date]:date code:' \ | 580 '(--date -d)'{-d+,--date=}'[record the specified date as commit date]:date' \ |
570 '(--user -u)'{-u+,--user=}'[record user as commiter]:user:' \ | 581 '(--user -u)'{-u+,--user=}'[record the specified user as committer]:user' \ |
571 '--amend[amend the parent of the working dir]' \ | 582 '--amend[amend the parent of the working directory]' \ |
572 '--close-branch[mark a branch as closed]' \ | 583 '--close-branch[mark a branch head as closed]' \ |
584 '(--interactive -i)'{-i,--interactive}'[use interactive mode]' \ | |
585 '(--secret -s)'{-s,--secret}'[use the secret phase for committing]' \ | |
573 '*:file:_hg_committable' | 586 '*:file:_hg_committable' |
574 } | 587 } |
575 | 588 |
576 _hg_cmd_copy() { | 589 _hg_cmd_copy() { |
577 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \ | 590 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \ |
585 typeset -A opt_args | 598 typeset -A opt_args |
586 | 599 |
587 _arguments -s -S : $_hg_global_opts $_hg_diff_opts $_hg_ignore_space_opts \ | 600 _arguments -s -S : $_hg_global_opts $_hg_diff_opts $_hg_ignore_space_opts \ |
588 $_hg_pat_opts $_hg_subrepos_opts \ | 601 $_hg_pat_opts $_hg_subrepos_opts \ |
589 '*'{-r+,--rev=}'[revision]:revision:_hg_revrange' \ | 602 '*'{-r+,--rev=}'[revision]:revision:_hg_revrange' \ |
603 '--noprefix[omit a/ and b/ prefixes from filenames]' \ | |
590 '(--show-function -p)'{-p,--show-function}'[show which function each change is in]' \ | 604 '(--show-function -p)'{-p,--show-function}'[show which function each change is in]' \ |
591 '(--change -c)'{-c+,--change=}'[change made by revision]:' \ | 605 '(--change -c)'{-c+,--change=}'[change made by revision]:revision:_hg_labels' \ |
592 '(--text -a)'{-a,--text}'[treat all files as text]' \ | 606 '(--text -a)'{-a,--text}'[treat all files as text]' \ |
593 '--reverse[produce a diff that undoes the changes]' \ | 607 '--reverse[produce a diff that undoes the changes]' \ |
594 '(--unified -U)'{-U+,--unified=}'[number of lines of context to show]:' \ | 608 '(--unified -U)'{-U+,--unified=}'[number of lines of context to show]:count' \ |
595 '--stat[output diffstat-style summary of changes]' \ | 609 '--stat[output diffstat-style summary of changes]' \ |
610 '--root=[produce diffs relative to subdirectory]:directory:_files -/' \ | |
596 '*:file:->diff_files' && ret=0 | 611 '*:file:->diff_files' && ret=0 |
597 | 612 |
598 if [[ $state == 'diff_files' ]] | 613 if [[ $state == 'diff_files' ]] |
599 then | 614 then |
600 if [[ -n $opt_args[-r] ]] | 615 if [[ -n $opt_args[-r] ]] |
608 return ret | 623 return ret |
609 } | 624 } |
610 | 625 |
611 _hg_cmd_export() { | 626 _hg_cmd_export() { |
612 _arguments -s -S : $_hg_global_opts $_hg_diff_opts \ | 627 _arguments -s -S : $_hg_global_opts $_hg_diff_opts \ |
613 '(--outout -o)'{-o+,--output=}'[print output to file with formatted name]:filespec:' \ | 628 '(--output -o)'{-o+,--output=}'[print output to file with formatted name]:format string' \ |
614 '--switch-parent[diff against the second parent]' \ | 629 '--switch-parent[diff against the second parent]' \ |
615 '(--rev -r)'{-r+,--rev=}'[revision]:revision:_hg_labels' \ | 630 '*'{-r+,--rev=}'[revisions to export]:revision:_hg_labels' \ |
616 '*:revision:_hg_labels' | 631 '*:revision:_hg_labels' |
617 } | 632 } |
618 | 633 |
619 _hg_cmd_forget() { | 634 _hg_cmd_forget() { |
620 _arguments -s -S : $_hg_global_opts \ | 635 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \ |
636 '(--interactive -i)'{-i,--interactive}'[use interactive mode]' \ | |
621 '*:file:_hg_files' | 637 '*:file:_hg_files' |
622 } | 638 } |
623 | 639 |
624 _hg_cmd_graft() { | 640 _hg_cmd_graft() { |
625 _arguments -s -S : $_hg_global_opts $_hg_dryrun_opts \ | 641 _arguments -s -S : $_hg_global_opts $_hg_dryrun_opts \ |
626 $_hg_date_user_opts $_hg_mergetool_opts \ | 642 $_hg_date_user_opts $_hg_mergetool_opts \ |
627 '(--continue -c)'{-c,--continue}'[resume interrupted graft]' \ | 643 '*'{-r+,--rev=}'[revisions to graft]:revision:_hg_labels' \ |
644 '(--continue -c --abort -a)'{-c,--continue}'[resume interrupted graft]' \ | |
645 '(--continue -c --abort -a)'{-a,--abort}'[abort interrupted graft]' \ | |
628 '(--edit -e)'{-e,--edit}'[invoke editor on commit messages]' \ | 646 '(--edit -e)'{-e,--edit}'[invoke editor on commit messages]' \ |
629 '--log[append graft info to log message]' \ | 647 '--log[append graft info to log message]' \ |
630 '*:revision:_hg_labels' | 648 '*:revision:_hg_labels' |
631 } | 649 } |
632 | 650 |
654 | 672 |
655 _hg_cmd_help() { | 673 _hg_cmd_help() { |
656 _arguments -s -S : $_hg_global_opts \ | 674 _arguments -s -S : $_hg_global_opts \ |
657 '(--extension -e)'{-e,--extension}'[show only help for extensions]' \ | 675 '(--extension -e)'{-e,--extension}'[show only help for extensions]' \ |
658 '(--command -c)'{-c,--command}'[show only help for commands]' \ | 676 '(--command -c)'{-c,--command}'[show only help for commands]' \ |
659 '(--keyword -k)'{-k+,--keyword}'[show topics matching keyword]' \ | 677 '(--keyword -k)'{-k,--keyword}'[show topics matching keyword]' \ |
660 '*:mercurial help topic:_hg_help_topics' | 678 '*:mercurial help topic:_hg_help_topics' |
661 } | 679 } |
662 | 680 |
663 _hg_cmd_identify() { | 681 _hg_cmd_identify() { |
664 _arguments -s -S : $_hg_global_opts $_hg_remote_opts \ | 682 _arguments -s -S : $_hg_global_opts $_hg_remote_opts \ |
665 '(--rev -r)'{-r+,--rev=}'[identify the specified rev]:revision:_hg_labels' \ | 683 '(--rev -r)'{-r+,--rev=}'[identify the specified rev]:revision:_hg_labels' \ |
666 '(--num -n)'{-n,--num}'[show local revision number]' \ | 684 '(--num -n)'{-n,--num}'[show local revision number]' \ |
667 '(--id -i)'{-i,--id}'[show global revision id]' \ | 685 '(--id -i)'{-i,--id}'[show global revision id]' \ |
668 '(--branch -b)'{-b,--branch}'[show branch]' \ | 686 '(--branch -b)'{-b,--branch}'[show branch]' \ |
669 '(--bookmark -B)'{-B,--bookmark}'[show bookmarks]' \ | 687 '(--bookmarks -B)'{-B,--bookmarks}'[show bookmarks]' \ |
670 '(--tags -t)'{-t,--tags}'[show tags]' | 688 '(--tags -t)'{-t,--tags}'[show tags]' |
671 } | 689 } |
672 | 690 |
673 _hg_cmd_import() { | 691 _hg_cmd_import() { |
674 _arguments -s -S : $_hg_global_opts $_hg_commit_opts \ | 692 _arguments -s -S : $_hg_global_opts $_hg_commit_opts \ |
675 '(--strip -p)'{-p+,--strip=}'[directory strip option for patch (default: 1)]:count:' \ | 693 '(--strip -p)'{-p+,--strip=}'[directory strip option for patch (default: 1)]:count' \ |
676 '(--force -f)'{-f,--force}'[skip check for outstanding uncommitted changes]' \ | 694 '(--force -f)'{-f,--force}'[skip check for outstanding uncommitted changes]' \ |
677 '--bypass[apply patch without touching the working directory]' \ | 695 '--bypass[apply patch without touching the working directory]' \ |
678 '--no-commit[do not commit, just update the working directory]' \ | 696 '--no-commit[do not commit, just update the working directory]' \ |
679 '--partial[commit even if some hunks fail]' \ | 697 '--partial[commit even if some hunks fail]' \ |
680 '--exact[apply patch to the nodes from which it was generated]' \ | 698 '--exact[abort if patch would apply lossily]' \ |
681 '--import-branch[use any branch information in patch (implied by --exact)]' \ | 699 '--import-branch[use any branch information in patch (implied by --exact)]' \ |
682 '(--date -d)'{-d+,--date=}'[record datecode as commit date]:date code:' \ | 700 '(--date -d)'{-d+,--date=}'[record the specified date as commit date]:date' \ |
683 '(--user -u)'{-u+,--user=}'[record user as commiter]:user:' \ | 701 '(--user -u)'{-u+,--user=}'[record the specified user as committer]:user' \ |
684 '(--similarity -s)'{-s+,--similarity=}'[guess renamed files by similarity (0<=s<=100)]:' \ | 702 '(--similarity -s)'{-s+,--similarity=}'[guess renamed files by similarity (0<=s<=100)]:similarity' \ |
685 '*:patch:_files' | 703 '*:patch:_files' |
686 } | 704 } |
687 | 705 |
688 _hg_cmd_incoming() { | 706 _hg_cmd_incoming() { |
689 _arguments -s -S : $_hg_log_opts $_hg_branch_bmark_opts $_hg_remote_opts \ | 707 _arguments -s -S : $_hg_log_opts $_hg_branch_bmark_opts $_hg_remote_opts \ |
690 $_hg_subrepos_opts \ | 708 $_hg_subrepos_opts \ |
691 '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \ | 709 '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \ |
692 '(--rev -r)'{-r+,--rev=}'[a specific revision up to which you would like to pull]:revision:_hg_labels' \ | 710 '*'{-r+,--rev=}'[a remote changeset intended to be added]:revision:_hg_labels' \ |
693 '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \ | 711 '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \ |
694 '--bundle[file to store the bundles into]:bundle file:_files' \ | 712 '--bundle[file to store the bundles into]:bundle file:_files' \ |
695 ':source:_hg_remote' | 713 ':source:_hg_remote' |
696 } | 714 } |
697 | 715 |
702 | 720 |
703 _hg_cmd_locate() { | 721 _hg_cmd_locate() { |
704 _arguments -s -S : $_hg_global_opts $_hg_pat_opts \ | 722 _arguments -s -S : $_hg_global_opts $_hg_pat_opts \ |
705 '(--rev -r)'{-r+,--rev=}'[search repository as it stood at revision]:revision:_hg_labels' \ | 723 '(--rev -r)'{-r+,--rev=}'[search repository as it stood at revision]:revision:_hg_labels' \ |
706 '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \ | 724 '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \ |
707 '(--fullpath -f)'{-f,--fullpath}'[print complete paths]' \ | 725 '(--fullpath -f)'{-f,--fullpath}'[print complete paths from the filesystem root]' \ |
708 '*:search pattern:_hg_files' | 726 '*:search pattern:_hg_files' |
709 } | 727 } |
710 | 728 |
711 _hg_cmd_log() { | 729 _hg_cmd_log() { |
712 _arguments -s -S : $_hg_log_opts $_hg_pat_opts \ | 730 _arguments -s -S : $_hg_log_opts $_hg_pat_opts \ |
713 '(--follow --follow-first -f)'{-f,--follow}'[follow changeset or history]' \ | 731 '(--follow --follow-first -f)'{-f,--follow}'[follow changeset or history]' \ |
714 '(-f --follow)--follow-first[only follow the first parent of merge changesets]' \ | 732 '(-f --follow)--follow-first[only follow the first parent of merge changesets]' \ |
715 '(--copies -C)'{-C,--copies}'[show copied files]' \ | 733 '(--copies -C)'{-C,--copies}'[show copied files]' \ |
716 '(--keyword -k)'{-k+,--keyword}'[search for a keyword]:' \ | 734 '*'{-k+,--keyword=}'[search for a keyword]:keyword' \ |
717 '*'{-r+,--rev=}'[show the specified revision or revset]:revision:_hg_revrange' \ | 735 '*'{-r+,--rev=}'[show the specified revision or revset]:revision:_hg_revrange' \ |
718 '(--only-merges -m)'{-m,--only-merges}'[show only merges]' \ | 736 '(--only-merges -m)'{-m,--only-merges}'[show only merges]' \ |
719 '(--prune -P)'{-P+,--prune=}'[do not display revision or any of its ancestors]:revision:_hg_labels' \ | 737 '*'{-P+,--prune=}'[do not display revision or any of its ancestors]:revision:_hg_labels' \ |
720 '(--graph -G)'{-G,--graph}'[show the revision DAG]' \ | 738 '*'{-b+,--branch=}'[show changesets within the given named branch]:branch:_hg_branches' \ |
721 '(--branch -b)'{-b+,--branch=}'[show changesets within the given named branch]:branch:_hg_branches' \ | 739 '*'{-u+,--user=}'[revisions committed by user]:user' \ |
722 '(--user -u)'{-u+,--user=}'[revisions committed by user]:user:' \ | 740 '(--date -d)'{-d+,--date=}'[show revisions matching date spec]:date' \ |
723 '(--date -d)'{-d+,--date=}'[show revisions matching date spec]:date:' \ | |
724 '*:files:_hg_files' | 741 '*:files:_hg_files' |
725 } | 742 } |
726 | 743 |
727 _hg_cmd_manifest() { | 744 _hg_cmd_manifest() { |
728 _arguments -s -S : $_hg_global_opts \ | 745 _arguments -s -S : $_hg_global_opts \ |
740 } | 757 } |
741 | 758 |
742 _hg_cmd_outgoing() { | 759 _hg_cmd_outgoing() { |
743 _arguments -s -S : $_hg_log_opts $_hg_branch_bmark_opts $_hg_remote_opts \ | 760 _arguments -s -S : $_hg_log_opts $_hg_branch_bmark_opts $_hg_remote_opts \ |
744 $_hg_subrepos_opts \ | 761 $_hg_subrepos_opts \ |
745 '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \ | 762 '(--force -f)'{-f,--force}'[run even when the destination is unrelated]' \ |
746 '*'{-r+,--rev=}'[a specific revision you would like to push]:revision:_hg_revrange' \ | 763 '*'{-r+,--rev=}'[a changeset intended to be included in the destination]:revision:_hg_revrange' \ |
747 '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \ | 764 '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \ |
748 ':destination:_hg_remote' | 765 ':destination:_hg_remote' |
749 } | 766 } |
750 | 767 |
751 _hg_cmd_parents() { | 768 _hg_cmd_parents() { |
759 ':path:_hg_paths' | 776 ':path:_hg_paths' |
760 } | 777 } |
761 | 778 |
762 _hg_cmd_phase() { | 779 _hg_cmd_phase() { |
763 _arguments -s -S : $_hg_global_opts \ | 780 _arguments -s -S : $_hg_global_opts \ |
764 '(--public -p)'{-p,--public}'[set changeset phase to public]' \ | 781 '(--public -p --draft -d --secret -s)'{-p,--public}'[set changeset phase to public]' \ |
765 '(--draft -d)'{-d,--draft}'[set changeset phase to draft]' \ | 782 '(--public -p --draft -d --secret -s)'{-d,--draft}'[set changeset phase to draft]' \ |
766 '(--secret -s)'{-s,--secret}'[set changeset phase to secret]' \ | 783 '(--public -p --draft -d --secret -s)'{-s,--secret}'[set changeset phase to secret]' \ |
767 '(--force -f)'{-f,--force}'[allow to move boundary backward]' \ | 784 '(--force -f)'{-f,--force}'[allow to move boundary backward]' \ |
768 '(--rev -r)'{-r+,--rev=}'[target revision]:revision:_hg_labels' \ | 785 '*'{-r+,--rev=}'[target revision]:revision:_hg_labels' \ |
769 ':revision:_hg_labels' | 786 '*:revision:_hg_labels' |
770 } | 787 } |
771 | 788 |
772 _hg_cmd_pull() { | 789 _hg_cmd_pull() { |
773 _arguments -s -S : $_hg_global_opts $_hg_branch_bmark_opts $_hg_remote_opts \ | 790 _arguments -s -S : $_hg_global_opts $_hg_branch_bmark_opts $_hg_remote_opts \ |
774 '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \ | 791 '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \ |
775 '(--update -u)'{-u,--update}'[update to new tip if changesets were pulled]' \ | 792 '(--update -u)'{-u,--update}'[update to new branch head if new descendants were pulled]' \ |
776 '(--rev -r)'{-r+,--rev}'[a specific revision up to which you would like to pull]:revision:' \ | 793 '*'{-r+,--rev=}'[a remote changeset intended to be added]:revision:_hg_labels' \ |
777 ':source:_hg_remote' | 794 ':source:_hg_remote' |
778 } | 795 } |
779 | 796 |
780 _hg_cmd_push() { | 797 _hg_cmd_push() { |
781 _arguments -s -S : $_hg_global_opts $_hg_branch_bmark_opts $_hg_remote_opts \ | 798 _arguments -s -S : $_hg_global_opts $_hg_branch_bmark_opts $_hg_remote_opts \ |
782 '(--force -f)'{-f,--force}'[force push]' \ | 799 '(--force -f)'{-f,--force}'[force push]' \ |
783 '(--rev -r)'{-r+,--rev=}'[a specific revision you would like to push]:revision:_hg_labels' \ | 800 '*'{-r+,--rev=}'[a changeset intended to be included in the destination]:revision:_hg_labels' \ |
784 '--new-branch[allow pushing a new branch]' \ | 801 '--new-branch[allow pushing a new branch]' \ |
785 ':destination:_hg_remote' | 802 ':destination:_hg_remote' |
786 } | 803 } |
787 | 804 |
788 _hg_cmd_remove() { | 805 _hg_cmd_remove() { |
789 _arguments -s -S : $_hg_global_opts $_hg_pat_opts \ | 806 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \ |
790 '(--after -A)'{-A,--after}'[record remove that has already occurred]' \ | 807 '(--after -A)'{-A,--after}'[record delete for missing files]' \ |
791 '(--force -f)'{-f,--force}'[remove file even if modified]' \ | 808 '(--force -f)'{-f,--force}'[forget added files, delete modified files]' \ |
792 '*:file:_hg_files' | 809 '*:file:_hg_files' |
793 } | 810 } |
794 | 811 |
795 _hg_cmd_rename() { | 812 _hg_cmd_rename() { |
796 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \ | 813 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \ |
806 _arguments -s -S : $_hg_global_opts $_hg_mergetool_opts $_hg_pat_opts \ | 823 _arguments -s -S : $_hg_global_opts $_hg_mergetool_opts $_hg_pat_opts \ |
807 '(--all -a)'{-a,--all}'[select all unresolved files]' \ | 824 '(--all -a)'{-a,--all}'[select all unresolved files]' \ |
808 '(--no-status -n)'{-n,--no-status}'[hide status prefix]' \ | 825 '(--no-status -n)'{-n,--no-status}'[hide status prefix]' \ |
809 '(--list -l --mark -m --unmark -u)'{-l,--list}'[list state of files needing merge]:*:merged files:->resolve_files' \ | 826 '(--list -l --mark -m --unmark -u)'{-l,--list}'[list state of files needing merge]:*:merged files:->resolve_files' \ |
810 '(--mark -m --list -l --unmark -u)'{-m,--mark}'[mark files as resolved]:*:unresolved files:_hg_unresolved' \ | 827 '(--mark -m --list -l --unmark -u)'{-m,--mark}'[mark files as resolved]:*:unresolved files:_hg_unresolved' \ |
811 '(--unmark -u --list -l --mark -m)'{-u,--unmark}'[unmark files as resolved]:*:resolved files:_hg_resolved' \ | 828 '(--unmark -u --list -l --mark -m)'{-u,--unmark}'[mark files as unresolved]:*:resolved files:_hg_resolved' \ |
812 '*:file:_hg_unresolved' && ret=0 | 829 '*:file:_hg_unresolved' && ret=0 |
813 | 830 |
814 if [[ $state == 'resolve_files' ]] | 831 if [[ $state == 'resolve_files' ]] |
815 then | 832 then |
816 _alternative 'files:resolved files:_hg_resolved' \ | 833 _alternative 'files:resolved files:_hg_resolved' \ |
826 | 843 |
827 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \ | 844 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \ |
828 '(--all -a :)'{-a,--all}'[revert all changes when no arguments given]' \ | 845 '(--all -a :)'{-a,--all}'[revert all changes when no arguments given]' \ |
829 '(--rev -r)'{-r+,--rev=}'[revision to revert to]:revision:_hg_labels' \ | 846 '(--rev -r)'{-r+,--rev=}'[revision to revert to]:revision:_hg_labels' \ |
830 '(--no-backup -C)'{-C,--no-backup}'[do not save backup copies of files]' \ | 847 '(--no-backup -C)'{-C,--no-backup}'[do not save backup copies of files]' \ |
831 '(--date -d)'{-d+,--date=}'[tipmost revision matching date]:date code:' \ | 848 '(--date -d)'{-d+,--date=}'[tipmost revision matching date]:date' \ |
849 '(--interactive -i)'{-i,--interactive}'[interactively select the changes]' \ | |
832 '*:file:->revert_files' && ret=0 | 850 '*:file:->revert_files' && ret=0 |
833 | 851 |
834 if [[ $state == 'revert_files' ]] | 852 if [[ $state == 'revert_files' ]] |
835 then | 853 then |
836 if [[ -n $opt_args[-r] ]] | 854 if [[ -n $opt_args[-r] ]] |
851 '(--force -f)'{-f,--force}'[ignore safety measures]' \ | 869 '(--force -f)'{-f,--force}'[ignore safety measures]' \ |
852 } | 870 } |
853 | 871 |
854 _hg_cmd_serve() { | 872 _hg_cmd_serve() { |
855 _arguments -s -S : $_hg_global_opts \ | 873 _arguments -s -S : $_hg_global_opts \ |
856 '(--accesslog -A)'{-A+,--accesslog=}'[name of access log file]:log file:_files' \ | 874 '(--accesslog -A)'{-A+,--accesslog=}'[name of access log file to write to]:log file:_files' \ |
857 '(--errorlog -E)'{-E+,--errorlog=}'[name of error log file]:log file:_files' \ | 875 '(--errorlog -E)'{-E+,--errorlog=}'[name of error log file to write to]:log file:_files' \ |
858 '(--daemon -d)'{-d,--daemon}'[run server in background]' \ | 876 '(--daemon -d)'{-d,--daemon}'[run server in background]' \ |
859 '(--port -p)'{-p+,--port=}'[listen port]:listen port:' \ | 877 '(--port -p)'{-p+,--port=}'[port to listen on (default: 8000)]:listen port' \ |
860 '(--address -a)'{-a+,--address=}'[interface address]:interface address:' \ | 878 '(--address -a)'{-a+,--address=}'[address to listen on (default: all interfaces)]:interface address' \ |
861 '--prefix[prefix path to serve from]:directory:_files' \ | 879 '--prefix=[prefix path to serve from (default: server root)]:directory:_files' \ |
862 '(--name -n)'{-n+,--name=}'[name to show in web pages]:repository name:' \ | 880 '(--name -n)'{-n+,--name=}'[name to show in web pages (default: working directory)]:repository name' \ |
863 '--web-conf[name of the hgweb config file]:webconf_file:_files' \ | 881 '--web-conf=[name of the hgweb config file]:config file:_files' \ |
864 '--pid-file[name of file to write process ID to]:pid_file:_files' \ | 882 '--pid-file=[name of file to write process ID to]:pid file:_files' \ |
865 '--cmdserver[cmdserver mode]:mode:' \ | 883 '--cmdserver[for remote clients]' \ |
866 '(--templates -t)'{-t,--templates}'[web template directory]:template dir:_files -/' \ | 884 '(--templates -t)'{-t+,--templates=}'[web template directory]:template dir:_files -/' \ |
867 '--style[web template style]:style' \ | 885 '--style=[template style to use]:style' \ |
868 '--stdio[for remote clients]' \ | 886 '--stdio[for remote clients]' \ |
869 '--certificate[certificate file]:cert_file:_files' \ | 887 '(--ipv6 -6)'{-6,--ipv6}'[use IPv6 in addition to IPv4]' \ |
870 '(--ipv6 -6)'{-6,--ipv6}'[use IPv6 in addition to IPv4]' | 888 '--certificate=[SSL certificate file]:certificate file:_files' \ |
889 '--print-url[start and print only the URL]' | |
871 } | 890 } |
872 | 891 |
873 _hg_cmd_showconfig() { | 892 _hg_cmd_showconfig() { |
874 _arguments -s -S : $_hg_global_opts \ | 893 _arguments -s -S : $_hg_global_opts \ |
875 '(--untrusted -u)'{-u,--untrusted}'[show untrusted configuration options]' \ | 894 '(--untrusted -u)'{-u,--untrusted}'[show untrusted configuration options]' \ |
876 ':config item:_hg_config' | 895 '(--edit -e)'{-e,--edit}'[edit user config]' \ |
896 '(--local -l --global -g)'{-l,--local}'[edit repository config]' \ | |
897 '(--local -l --global -g)'{-g,--global}'[edit global config]' \ | |
898 '*:config item:_hg_config' | |
877 } | 899 } |
878 | 900 |
879 _hg_cmd_status() { | 901 _hg_cmd_status() { |
880 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \ | 902 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \ |
881 '(--all -A)'{-A,--all}'[show status of all files]' \ | 903 '(--all -A)'{-A,--all}'[show status of all files]' \ |
882 '(--modified -m)'{-m,--modified}'[show only modified files]' \ | 904 '(--modified -m)'{-m,--modified}'[show only modified files]' \ |
883 '(--added -a)'{-a,--added}'[show only added files]' \ | 905 '(--added -a)'{-a,--added}'[show only added files]' \ |
884 '(--removed -r)'{-r,--removed}'[show only removed files]' \ | 906 '(--removed -r)'{-r,--removed}'[show only removed files]' \ |
885 '(--deleted -d)'{-d,--deleted}'[show only deleted (but tracked) files]' \ | 907 '(--deleted -d)'{-d,--deleted}'[show only deleted (but tracked) files]' \ |
886 '(--clean -c)'{-c,--clean}'[show only files without changes]' \ | 908 '(--clean -c)'{-c,--clean}'[show only files without changes]' \ |
887 '(--unknown -u)'{-u,--unknown}'[show only unknown files]' \ | 909 '(--unknown -u)'{-u,--unknown}'[show only unknown (not tracked) files]' \ |
888 '(--ignored -i)'{-i,--ignored}'[show ignored files]' \ | 910 '(--ignored -i)'{-i,--ignored}'[show ignored files]' \ |
889 '(--no-status -n)'{-n,--no-status}'[hide status prefix]' \ | 911 '(--no-status -n)'{-n,--no-status}'[hide status prefix]' \ |
890 '(--copies -C)'{-C,--copies}'[show source of copied files]' \ | 912 '(--copies -C)'{-C,--copies}'[show source of copied files]' \ |
891 '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \ | 913 '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \ |
892 '--rev[show difference from revision]:revision:_hg_labels' \ | 914 '*--rev=[show difference from revision]:revision:_hg_labels' \ |
893 '--change[list the changed files of a revision]:revision:_hg_labels' \ | 915 '--change=[list the changed files of a revision]:revision:_hg_labels' \ |
894 '*:files:_files' | 916 '*:files:_files' |
895 } | 917 } |
896 | 918 |
897 _hg_cmd_summary() { | 919 _hg_cmd_summary() { |
898 _arguments -s -S : $_hg_global_opts \ | 920 _arguments -s -S : $_hg_global_opts \ |
900 } | 922 } |
901 | 923 |
902 _hg_cmd_tag() { | 924 _hg_cmd_tag() { |
903 _arguments -s -S : $_hg_global_opts \ | 925 _arguments -s -S : $_hg_global_opts \ |
904 '(--local -l)'{-l,--local}'[make the tag local]' \ | 926 '(--local -l)'{-l,--local}'[make the tag local]' \ |
905 '(--message -m)'{-m+,--message=}'[message for tag commit log entry]:message:' \ | 927 '(--message -m)'{-m+,--message=}'[message for tag commit log entry]:message' \ |
906 '(--date -d)'{-d+,--date=}'[record datecode as commit date]:date code:' \ | 928 '(--date -d)'{-d+,--date=}'[record the specified date as commit date]:date' \ |
907 '(--user -u)'{-u+,--user=}'[record user as commiter]:user:' \ | 929 '(--user -u)'{-u+,--user=}'[record the specified user as committer]:user' \ |
908 '(--rev -r)'{-r+,--rev=}'[revision to tag]:revision:_hg_labels' \ | 930 '(--rev -r)'{-r+,--rev=}'[revision to tag]:revision:_hg_labels' \ |
909 '(--force -f)'{-f,--force}'[force tag]' \ | 931 '(--force -f)'{-f,--force}'[force tag]' \ |
910 '--remove[remove a tag]' \ | 932 '--remove[remove a tag]' \ |
911 '(--edit -e)'{-e,--edit}'[edit commit message]' \ | 933 '(--edit -e)'{-e,--edit}'[edit commit message]' \ |
912 ':tag name:' | 934 ':tag name:' |
918 } | 940 } |
919 | 941 |
920 _hg_cmd_unbundle() { | 942 _hg_cmd_unbundle() { |
921 _arguments -s -S : $_hg_global_opts \ | 943 _arguments -s -S : $_hg_global_opts \ |
922 '(--update -u)'{-u,--update}'[update to new tip if changesets were unbundled]' \ | 944 '(--update -u)'{-u,--update}'[update to new tip if changesets were unbundled]' \ |
923 ':files:_files' | 945 '*:files:_files' |
924 } | 946 } |
925 | 947 |
926 _hg_cmd_update() { | 948 _hg_cmd_update() { |
927 _arguments -s -S : $_hg_global_opts \ | 949 _arguments -s -S : $_hg_global_opts $_hg_mergetool_opts \ |
928 '(--clean -C)'{-C,--clean}'[overwrite locally modified files]' \ | 950 '(--clean -C)'{-C,--clean}'[discard uncommitted changes (no backup)]' \ |
929 '(--rev -r)'{-r+,--rev=}'[revision]:revision:_hg_labels' \ | 951 '(--check -c)'{-c,--check}'[require clean working directory]' \ |
930 '(--check -c)'{-c,--check}'[update across branches if no uncommitted changes]' \ | 952 '(--merge -m)'{-m,--merge}'[merge uncommitted changes]' \ |
931 '(--date -d)'{-d+,--date=}'[tipmost revision matching date]:' \ | 953 '(--date -d)'{-d+,--date=}'[tipmost revision matching date]:date' \ |
954 '(--rev -r 1)'{-r+,--rev=}'[revision]:revision:_hg_labels' \ | |
932 ':revision:_hg_labels' | 955 ':revision:_hg_labels' |
933 } | 956 } |
934 | 957 |
935 ## extensions ## | 958 ## extensions ## |
936 | 959 |
937 # HGK | 960 # HGK |
938 _hg_cmd_view() { | 961 _hg_cmd_view() { |
939 _arguments -s -S : $_hg_global_opts \ | 962 _arguments -s -S : $_hg_global_opts \ |
940 '(--limit -l)'{-l+,--limit=}'[limit number of changes displayed]:' \ | 963 '(--limit -l)'{-l+,--limit=}'[limit number of changes displayed]:limit' \ |
941 ':revision range:_hg_labels' | 964 ':revision range:_hg_labels' |
942 } | 965 } |
943 | 966 |
944 # MQ | 967 # MQ |
945 _hg_qseries() { | 968 _hg_qseries() { |
1022 '*:patch:_hg_qapplied' | 1045 '*:patch:_hg_qapplied' |
1023 } | 1046 } |
1024 | 1047 |
1025 _hg_cmd_qfold() { | 1048 _hg_cmd_qfold() { |
1026 _arguments -s -S : $_hg_global_opts $_h_commit_opts \ | 1049 _arguments -s -S : $_hg_global_opts $_h_commit_opts \ |
1027 '(--keep,-k)'{-k,--keep}'[keep folded patch files]' \ | 1050 '(--keep -k)'{-k,--keep}'[keep folded patch files]' \ |
1028 '(--force -f)'{-f,--force}'[overwrite any local changes]' \ | 1051 '(--force -f)'{-f,--force}'[overwrite any local changes]' \ |
1029 '--no-backup[do not save backup copies of files]' \ | 1052 '--no-backup[do not save backup copies of files]' \ |
1030 '*:unapplied patch:_hg_qunapplied' | 1053 '*:unapplied patch:_hg_qunapplied' |
1031 } | 1054 } |
1032 | 1055 |
1051 } | 1074 } |
1052 | 1075 |
1053 _hg_cmd_qimport() { | 1076 _hg_cmd_qimport() { |
1054 _arguments -s -S : $_hg_global_opts $_hg_gitlike_opts \ | 1077 _arguments -s -S : $_hg_global_opts $_hg_gitlike_opts \ |
1055 '(--existing -e)'{-e,--existing}'[import file in patch dir]' \ | 1078 '(--existing -e)'{-e,--existing}'[import file in patch dir]' \ |
1056 '(--name -n 2)'{-n+,--name}'[patch file name]:name:' \ | 1079 '(--name -n 2)'{-n+,--name}'[patch file name]:name' \ |
1057 '(--force -f)'{-f,--force}'[overwrite existing files]' \ | 1080 '(--force -f)'{-f,--force}'[overwrite existing files]' \ |
1058 '*'{-r+,--rev=}'[place existing revisions under mq control]:revision:_hg_revrange' \ | 1081 '*'{-r+,--rev=}'[place existing revisions under mq control]:revision:_hg_revrange' \ |
1059 '(--push -P)'{-P,--push}'[qpush after importing]' \ | 1082 '(--push -P)'{-P,--push}'[qpush after importing]' \ |
1060 '*:patch:_files' | 1083 '*:patch:_files' |
1061 } | 1084 } |
1129 _arguments -s -S : $_hg_global_opts $_hg_qseries_opts | 1152 _arguments -s -S : $_hg_global_opts $_hg_qseries_opts |
1130 } | 1153 } |
1131 | 1154 |
1132 _hg_cmd_strip() { | 1155 _hg_cmd_strip() { |
1133 _arguments -s -S : $_hg_global_opts \ | 1156 _arguments -s -S : $_hg_global_opts \ |
1134 '(--force -f)'{-f,--force}'[force removal, discard uncommitted changes, no backup]' \ | 1157 '(--force -f)'{-f,--force}'[force removal of changesets, discard uncommitted changes (no backup)]' \ |
1135 '(--no-backup -n)'{-n,--no-backup}'[no backups]' \ | 1158 '--no-backup[no backups]' \ |
1136 '(--keep -k)'{-k,--keep}'[do not modify working copy during strip]' \ | 1159 '(--keep -k)'{-k,--keep}'[do not modify working directory during strip]' \ |
1137 '(--bookmark -B)'{-B+,--bookmark=}'[remove revs only reachable from given bookmark]:bookmark:_hg_bookmarks' \ | 1160 '*'{-B+,--bookmark=}'[remove revs only reachable from given bookmark]:bookmark:_hg_bookmarks' \ |
1138 '(--rev -r)'{-r+,--rev=}'[revision]:revision:_hg_labels' \ | 1161 '*'{-r+,--rev=}'[revision]:revision:_hg_labels' \ |
1139 ':revision:_hg_labels' | 1162 '*:revision:_hg_labels' |
1140 } | 1163 } |
1141 | 1164 |
1142 # Patchbomb | 1165 # Patchbomb |
1143 _hg_cmd_email() { | 1166 _hg_cmd_email() { |
1144 _arguments -s -S : $_hg_global_opts $_hg_remote_opts $_hg_gitlike_opts \ | 1167 _arguments -s -S : $_hg_global_opts $_hg_remote_opts $_hg_gitlike_opts \ |
1147 '(--outgoing -o)'{-o,--outgoing}'[send changes not found in the target repository]' \ | 1170 '(--outgoing -o)'{-o,--outgoing}'[send changes not found in the target repository]' \ |
1148 '(--bundle -b)'{-b,--bundle}'[send changes not in target as a binary bundle]' \ | 1171 '(--bundle -b)'{-b,--bundle}'[send changes not in target as a binary bundle]' \ |
1149 '--bundlename[name of the bundle attachment file (default: bundle)]:' \ | 1172 '--bundlename[name of the bundle attachment file (default: bundle)]:' \ |
1150 '*'{-r+,--rev=}'[search in given revision range]:revision:_hg_revrange' \ | 1173 '*'{-r+,--rev=}'[search in given revision range]:revision:_hg_revrange' \ |
1151 '--force[run even when remote repository is unrelated (with -b/--bundle)]' \ | 1174 '--force[run even when remote repository is unrelated (with -b/--bundle)]' \ |
1152 '*--base[a base changeset to specify instead of a destination (with -b/--bundle)]:revision:_hg_labels' \ | 1175 '*--base=[a base changeset to specify instead of a destination (with -b/--bundle)]:revision:_hg_labels' \ |
1153 '--intro[send an introduction email for a single patch]' \ | 1176 '--intro[send an introduction email for a single patch]' \ |
1154 '(--inline -i --attach -a)'{-a,--attach}'[send patches as attachments]' \ | 1177 '(--inline -i --attach -a)'{-a,--attach}'[send patches as attachments]' \ |
1155 '(--attach -a --inline -i)'{-i,--inline}'[send patches as inline attachments]' \ | 1178 '(--attach -a --inline -i)'{-i,--inline}'[send patches as inline attachments]' \ |
1156 '*--bcc[email addresses of blind carbon copy recipients]:email:' \ | 1179 '*--bcc=[email addresses of blind carbon copy recipients]:email' \ |
1157 '*'{-c+,--cc}'[email addresses of copy recipients]:email:' \ | 1180 '*'{-c+,--cc=}'[email addresses of copy recipients]:email' \ |
1158 '(--diffstat -d)'{-d,--diffstat}'[add diffstat output to messages]' \ | 1181 '(--diffstat -d)'{-d,--diffstat}'[add diffstat output to messages]' \ |
1159 '--date[use the given date as the sending date]:date:' \ | 1182 '--date=[use the given date as the sending date]:date' \ |
1160 '--desc[use the given file as the series description]:files:_files' \ | 1183 '--desc=[use the given file as the series description]:files:_files' \ |
1161 '(--from -f)'{-f,--from}'[email address of sender]:email:' \ | 1184 '(--from -f)'{-f+,--from=}'[email address of sender]:email' \ |
1162 '(--test -n)'{-n,--test}'[print messages that would be sent]' \ | 1185 '(--test -n)'{-n,--test}'[print messages that would be sent]' \ |
1163 '(--mbox -m)'{-m,--mbox}'[write messages to mbox file instead of sending them]:file:' \ | 1186 '(--mbox -m)'{-m+,--mbox=}'[write messages to mbox file instead of sending them]:file:_files' \ |
1164 '*--reply-to[email addresses replies should be sent to]:email:' \ | 1187 '*--reply-to=[email addresses replies should be sent to]:email' \ |
1165 '(--subject -s)'{-s,--subject}'[subject of first message (intro or single patch)]:subject:' \ | 1188 '(--subject -s)'{-s+,--subject=}'[subject of first message (intro or single patch)]:subject' \ |
1166 '--in-reply-to[message identifier to reply to]:msgid:' \ | 1189 '--in-reply-to=[message identifier to reply to]:msgid' \ |
1167 '*--flag[flags to add in subject prefixes]:flag:' \ | 1190 '*--flag=[flags to add in subject prefixes]:flag' \ |
1168 '*'{-t,--to}'[email addresses of recipients]:email:' \ | 1191 '*'{-t+,--to=}'[email addresses of recipients]:email' \ |
1169 ':revision:_hg_revrange' | 1192 ':revision:_hg_revrange' |
1170 } | 1193 } |
1171 | 1194 |
1172 # Rebase | 1195 # Rebase |
1173 _hg_cmd_rebase() { | 1196 _hg_cmd_rebase() { |
1174 _arguments -s -S : $_hg_global_opts $_hg_commit_opts $_hg_mergetool_opts \ | 1197 _arguments -s -S : $_hg_global_opts $_hg_commit_opts $_hg_mergetool_opts \ |
1175 '*'{-r+,--rev=}'[rebase these revisions]:revision:_hg_revrange' \ | 1198 '*'{-r+,--rev=}'[rebase these revisions]:revision:_hg_revrange' \ |
1176 '(--source -s)'{-s+,--source=}'[rebase from the specified changeset]:revision:_hg_labels' \ | 1199 '(--source -s --base -b)'{-s+,--source=}'[rebase the specified changeset and descendants]:revision:_hg_labels' \ |
1177 '(--base -b)'{-b+,--base=}'[rebase from the base of the specified changeset]:revision:_hg_labels' \ | 1200 '(--source -s --base -b)'{-b+,--base=}'[rebase everything from branching point of specified changeset]:revision:_hg_labels' \ |
1178 '(--dest -d)'{-d+,--dest=}'[rebase onto the specified changeset]:revision:_hg_labels' \ | 1201 '(--dest -d)'{-d+,--dest=}'[rebase onto the specified changeset]:revision:_hg_labels' \ |
1179 '--collapse[collapse the rebased changeset]' \ | 1202 '--collapse[collapse the rebased changesets]' \ |
1180 '--keep[keep original changeset]' \ | 1203 '(--keep -k)'{-k,--keep}'[keep original changesets]' \ |
1181 '--keepbranches[keep original branch name]' \ | 1204 '--keepbranches[keep original branch names]' \ |
1182 '(--continue -c)'{-c,--continue}'[continue an interrupted rebase]' \ | 1205 '(--continue -c --abort -a)'{-c,--continue}'[continue an interrupted rebase]' \ |
1183 '(--abort -a)'{-a,--abort}'[abort an interrupted rebase]' \ | 1206 '(--continue -c --abort -a)'{-a,--abort}'[abort an interrupted rebase]' \ |
1184 } | 1207 } |
1185 | 1208 |
1186 # Record | 1209 # Record |
1187 _hg_cmd_record() { | 1210 _hg_cmd_record() { |
1188 _arguments -s -S : $_hg_global_opts $_hg_commit_opts $_hg_pat_opts \ | 1211 _arguments -s -S : $_hg_global_opts $_hg_commit_opts $_hg_pat_opts \ |
1189 $_hg_ignore_space_opts $_hg_subrepos_opts \ | 1212 $_hg_ignore_space_opts $_hg_subrepos_opts \ |
1190 '(--addremove -A)'{-A,--addremove}'[mark new/missing files as added/removed before committing]' \ | 1213 '(--addremove -A)'{-A,--addremove}'[mark new/missing files as added/removed before committing]' \ |
1191 '--close-branch[mark a branch as closed, hiding it from the branch list]' \ | 1214 '--close-branch[mark a branch as closed, hiding it from the branch list]' \ |
1192 '--amend[amend the parent of the working dir]' \ | 1215 '--amend[amend the parent of the working dir]' \ |
1193 '(--date -d)'{-d+,--date=}'[record the specified date as commit date]:date:' \ | 1216 '(--date -d)'{-d+,--date=}'[record the specified date as commit date]:date' \ |
1194 '(--user -u)'{-u+,--user=}'[record the specified user as committer]:user:' | 1217 '(--user -u)'{-u+,--user=}'[record the specified user as committer]:user' |
1195 } | 1218 } |
1196 | 1219 |
1197 _hg_cmd_qrecord() { | 1220 _hg_cmd_qrecord() { |
1198 _arguments -s -S : $_hg_global_opts $_hg_commit_opts $_hg_date_user_opts $_hg_gitlike_opts \ | 1221 _arguments -s -S : $_hg_global_opts $_hg_commit_opts $_hg_date_user_opts $_hg_gitlike_opts \ |
1199 $_hg_pat_opts $_hg_ignore_space_opts $_hg_subrepos_opts | 1222 $_hg_pat_opts $_hg_ignore_space_opts $_hg_subrepos_opts |
1200 } | 1223 } |
1201 | 1224 |
1202 # Convert | 1225 # Convert |
1203 _hg_cmd_convert() { | 1226 _hg_cmd_convert() { |
1204 _arguments -s -S : $_hg_global_opts \ | 1227 _arguments -s -S : $_hg_global_opts \ |
1205 '(--source-type -s)'{-s,--source-type}'[source repository type]' \ | 1228 '(--source-type -s)'{-s+,--source-type=}'[source repository type]:type:(hg cvs darcs git svn mtn gnuarch bzr p4)' \ |
1206 '(--dest-type -d)'{-d,--dest-type}'[destination repository type]' \ | 1229 '(--dest-type -d)'{-d+,--dest-type=}'[destination repository type]:type:(hg svn)' \ |
1207 '(--rev -r)'{-r+,--rev=}'[import up to target revision]:revision:' \ | 1230 '*'{-r+,--rev=}'[import up to target revision]:revision' \ |
1208 '(--authormap -A)'{-A+,--authormap=}'[remap usernames using this file]:file:_files' \ | 1231 '(--authormap -A)'{-A+,--authormap=}'[remap usernames using this file]:file:_files' \ |
1209 '--filemap[remap file names using contents of file]:file:_files' \ | 1232 '--filemap=[remap file names using contents of file]:file:_files' \ |
1210 '--splicemap[splice synthesized history into place]:file:_files' \ | 1233 '--full[apply filemap changes by converting all files again]' \ |
1211 '--branchmap[change branch names while converting]:file:_files' \ | 1234 '--splicemap=[splice synthesized history into place]:file:_files' \ |
1235 '--branchmap=[change branch names while converting]:file:_files' \ | |
1212 '--branchsort[try to sort changesets by branches]' \ | 1236 '--branchsort[try to sort changesets by branches]' \ |
1213 '--datesort[try to sort changesets by date]' \ | 1237 '--datesort[try to sort changesets by date]' \ |
1214 '--sourcesort[preserve source changesets order]' | 1238 '--sourcesort[preserve source changesets order]' \ |
1239 '--closesort[try to reorder closed revisions]' | |
1215 } | 1240 } |
1216 | 1241 |
1217 # Purge | 1242 # Purge |
1218 _hg_cmd_purge() { | 1243 _hg_cmd_purge() { |
1219 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \ | 1244 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \ |