##// END OF EJS Templates
zsh_completion: update all options...
av6 -
r39241:362c4603 default
parent child Browse files
Show More
@@ -371,22 +371,24 b' typeset -A _hg_cmd_globals'
371 371
372 372 # Common options
373 373 _hg_global_opts=(
374 '(--repository -R)'{-R+,--repository=}'[repository root directory]:repository:_files -/'
375 '--cwd[change working directory]:new working directory:_files -/'
376 '(--noninteractive -y)'{-y,--noninteractive}'[do not prompt, assume yes for any required answers]'
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 -/'
376 '(--noninteractive -y)'{-y,--noninteractive}'[do not prompt, automatically pick the first choice for all prompts]'
377 377 '(--verbose -v)'{-v,--verbose}'[enable additional output]'
378 378 '*--config[set/override config option]:defined config items:_hg_config'
379 379 '(--quiet -q)'{-q,--quiet}'[suppress output]'
380 380 '(--help -h)'{-h,--help}'[display help and exit]'
381 '--debug[debug mode]'
381 '--debug[enable debugging output]'
382 382 '--debugger[start debugger]'
383 '--encoding[set the charset encoding]'
384 '--encodingmode[set the charset encoding mode]'
385 '--lsprof[print improved command execution profile]'
386 '--traceback[print traceback on exception]'
383 '--encoding=[set the charset encoding]:encoding'
384 '--encodingmode=[set the charset encoding mode]:encoding mode'
385 '--traceback[always print a traceback on exception]'
387 386 '--time[time how long the command takes]'
388 '--profile[profile]'
387 '--profile[print command execution profile]'
389 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 394 _hg_pat_opts=(
@@ -402,8 +404,8 b' typeset -A _hg_cmd_globals'
402 404 _hg_date_user_opts=(
403 405 '(--currentdate -D)'{-D,--currentdate}'[record the current date as commit date]'
404 406 '(--currentuser -U)'{-U,--currentuser}'[record the current user as committer]'
405 '(--date -d)'{-d+,--date=}'[record the specified date as commit date]:date:'
406 '(--user -u)'{-u+,--user=}'[record the specified user as committer]:user:')
407 '(--date -d)'{-d+,--date=}'[record the specified date as commit date]:date'
408 '(--user -u)'{-u+,--user=}'[record the specified user as committer]:user')
407 409
408 410 _hg_gitlike_opts=(
409 411 '(--git -g)'{-g,--git}'[use git extended diff format]')
@@ -414,7 +416,8 b' typeset -A _hg_cmd_globals'
414 416 '--nodates[omit dates from diff headers]')
415 417
416 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 422 _hg_dryrun_opts=(
420 423 '(--dry-run -n)'{-n,--dry-run}'[do not perform actions, just print output]')
@@ -422,7 +425,9 b' typeset -A _hg_cmd_globals'
422 425 _hg_ignore_space_opts=(
423 426 '(--ignore-all-space -w)'{-w,--ignore-all-space}'[ignore white space when comparing lines]'
424 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 432 _hg_template_opts=(
428 433 '--template[display with template]:template'
@@ -430,20 +435,23 b' typeset -A _hg_cmd_globals'
430 435
431 436 _hg_log_opts=(
432 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 439 '(--no-merges -M)'{-M,--no-merges}'[do not show merges]'
435 440 '(--patch -p)'{-p,--patch}'[show patch]'
436 441 '--stat[output diffstat-style summary of changes]'
442 '(--graph -G)'{-G,--graph}'[show the revision DAG]'
437 443 )
438 444
439 445 _hg_commit_opts=(
440 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 448 '(-e --edit -m --message --logfile -l)'{-l+,--logfile=}'[read the commit message from <file>]:log file:_files')
443 449
444 450 _hg_remote_opts=(
445 '(--ssh -e)'{-e+,--ssh=}'[specify ssh command to use]:'
446 '--remotecmd[specify hg command to run on the remote side]:')
451 '(--ssh -e)'{-e+,--ssh=}'[specify ssh command to use]:command'
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 456 _hg_branch_bmark_opts=(
449 457 '(--bookmark -B)'{-B+,--bookmark=}'[specify bookmark(s)]:bookmark:_hg_bookmarks'
@@ -464,26 +472,28 b' typeset -A _hg_cmd_globals'
464 472
465 473 _hg_cmd_addremove() {
466 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 476 '*:unknown or missing files:_hg_addremove'
469 477 }
470 478
471 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 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 483 '(--text -a)'{-a,--text}'[treat all files as text]' \
476 '(--user -u)'{-u,--user}'[list the author]' \
477 '(--date -d)'{-d,--date}'[list the date]' \
484 '(--user -u)'{-u,--user}'[list the author (long with -v)]' \
485 '(--file -f)'{-f,--file}'[list the filename]' \
486 '(--date -d)'{-d,--date}'[list the date (short with -q)]' \
478 487 '(--number -n)'{-n,--number}'[list the revision number (default)]' \
479 488 '(--changeset -c)'{-c,--changeset}'[list the changeset]' \
489 '(--line-number -l)'{-l,--line-number}'[show line number at the first appearance]' \
480 490 '*:files:_hg_files'
481 491 }
482 492
483 493 _hg_cmd_archive() {
484 494 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \
485 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 497 '(--rev -r)'{-r+,--rev=}'[revision to distribute]:revision:_hg_labels' \
488 498 '(--type -t)'{-t+,--type=}'[type of distribution to create]:archive type:(files tar tbz2 tgz uzip zip)' \
489 499 '*:destination:_files'
@@ -492,12 +502,13 b' typeset -A _hg_cmd_globals'
492 502 _hg_cmd_backout() {
493 503 _arguments -s -S : $_hg_global_opts $_hg_mergetool_opts $_hg_pat_opts \
494 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 506 '--parent[parent to choose when backing out merge]' \
497 '(--user -u)'{-u+,--user=}'[record user as commiter]:user:' \
498 '(--rev -r)'{-r+,--rev=}'[revision]:revision:_hg_labels' \
499 '(--message -m)'{-m+,--message=}'[use <text> as commit message]:text:' \
500 '(--logfile -l)'{-l+,--logfile=}'[read commit message from <file>]:log file:_files'
507 '(--user -u)'{-u+,--user=}'[record the specified user as committer]:user' \
508 '(--rev -r 1)'{-r+,--rev=}'[revision to backout]:revision:_hg_labels' \
509 '(--message -m)'{-m+,--message=}'[use <text> as commit message]:text' \
510 '(--logfile -l)'{-l+,--logfile=}'[read commit message from <file>]:log file:_files' \
511 ':revision:_hg_labels'
501 512 }
502 513
503 514 _hg_cmd_bisect() {
@@ -529,24 +540,24 b' typeset -A _hg_cmd_globals'
529 540
530 541 _hg_cmd_branches() {
531 542 _arguments -s -S : $_hg_global_opts \
532 '(--active -a)'{-a,--active}'[show only branches that have unmerge heads]' \
533 543 '(--closed -c)'{-c,--closed}'[show normal and closed branches]'
534 544 }
535 545
536 546 _hg_cmd_bundle() {
537 547 _arguments -s -S : $_hg_global_opts $_hg_remote_opts \
538 '(--force -f)'{-f,--force}'[run even when remote repository is unrelated]' \
539 '(2)*--base[a base changeset to specify instead of a destination]:revision:_hg_labels' \
540 '(--branch -b)'{-b+,--branch=}'[a specific branch to bundle]:' \
541 '(--rev -r)'{-r+,--rev=}'[changeset(s) to bundle]:' \
548 '(--force -f)'{-f,--force}'[run even when the destination is unrelated]' \
549 '(2)*--base[a base changeset assumed to be available at the destination]:revision:_hg_labels' \
550 '*'{-b+,--branch=}'[a specific branch you would like to bundle]:branch:_hg_branches' \
551 '*'{-r+,--rev=}'[a changeset intended to be added to the destination]:revision:_hg_labels' \
542 552 '--all[bundle all changesets in the repository]' \
553 '--type[bundle compression type to use (default: bzip2)]:bundle type' \
543 554 ':output file:_files' \
544 555 ':destination repository:_files -/'
545 556 }
546 557
547 558 _hg_cmd_cat() {
548 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 561 '(--rev -r)'{-r+,--rev=}'[revision]:revision:_hg_labels' \
551 562 '--decode[apply any matching decode filter]' \
552 563 '*:file:_hg_files'
@@ -554,9 +565,9 b' typeset -A _hg_cmd_globals'
554 565
555 566 _hg_cmd_clone() {
556 567 _arguments -s -S : $_hg_global_opts $_hg_clone_opts \
557 '(--rev -r)'{-r+,--rev=}'[a changeset you would like to have after cloning]:' \
558 '(--updaterev -u)'{-u+,--updaterev=}'[revision, tag or branch to check out]:' \
559 '(--branch -b)'{-b+,--branch=}'[clone only the specified branch]:' \
568 '*'{-r+,--rev=}'[do not clone everything, but include this changeset and its ancestors]:revision' \
569 '(--updaterev -u)'{-u+,--updaterev=}'[revision, tag or branch to check out]:revision' \
570 '*'{-b+,--branch=}"[do not clone everything, but include this branch's changesets and their ancestors]:branch" \
560 571 ':source repository:_hg_remote' \
561 572 ':destination:_hg_clone_dest'
562 573 }
@@ -564,12 +575,14 b' typeset -A _hg_cmd_globals'
564 575 _hg_cmd_commit() {
565 576 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \
566 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 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:' \
570 '(--user -u)'{-u+,--user=}'[record user as commiter]:user:' \
571 '--amend[amend the parent of the working dir]' \
572 '--close-branch[mark a branch as closed]' \
580 '(--date -d)'{-d+,--date=}'[record the specified date as commit date]:date' \
581 '(--user -u)'{-u+,--user=}'[record the specified user as committer]:user' \
582 '--amend[amend the parent of the working directory]' \
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 586 '*:file:_hg_committable'
574 587 }
575 588
@@ -587,12 +600,14 b' typeset -A _hg_cmd_globals'
587 600 _arguments -s -S : $_hg_global_opts $_hg_diff_opts $_hg_ignore_space_opts \
588 601 $_hg_pat_opts $_hg_subrepos_opts \
589 602 '*'{-r+,--rev=}'[revision]:revision:_hg_revrange' \
603 '--noprefix[omit a/ and b/ prefixes from filenames]' \
590 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 606 '(--text -a)'{-a,--text}'[treat all files as text]' \
593 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 609 '--stat[output diffstat-style summary of changes]' \
610 '--root=[produce diffs relative to subdirectory]:directory:_files -/' \
596 611 '*:file:->diff_files' && ret=0
597 612
598 613 if [[ $state == 'diff_files' ]]
@@ -610,21 +625,24 b' typeset -A _hg_cmd_globals'
610 625
611 626 _hg_cmd_export() {
612 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 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 631 '*:revision:_hg_labels'
617 632 }
618 633
619 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 637 '*:file:_hg_files'
622 638 }
623 639
624 640 _hg_cmd_graft() {
625 641 _arguments -s -S : $_hg_global_opts $_hg_dryrun_opts \
626 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 646 '(--edit -e)'{-e,--edit}'[invoke editor on commit messages]' \
629 647 '--log[append graft info to log message]' \
630 648 '*:revision:_hg_labels'
@@ -656,7 +674,7 b' typeset -A _hg_cmd_globals'
656 674 _arguments -s -S : $_hg_global_opts \
657 675 '(--extension -e)'{-e,--extension}'[show only help for extensions]' \
658 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 678 '*:mercurial help topic:_hg_help_topics'
661 679 }
662 680
@@ -666,22 +684,22 b' typeset -A _hg_cmd_globals'
666 684 '(--num -n)'{-n,--num}'[show local revision number]' \
667 685 '(--id -i)'{-i,--id}'[show global revision id]' \
668 686 '(--branch -b)'{-b,--branch}'[show branch]' \
669 '(--bookmark -B)'{-B,--bookmark}'[show bookmarks]' \
687 '(--bookmarks -B)'{-B,--bookmarks}'[show bookmarks]' \
670 688 '(--tags -t)'{-t,--tags}'[show tags]'
671 689 }
672 690
673 691 _hg_cmd_import() {
674 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 694 '(--force -f)'{-f,--force}'[skip check for outstanding uncommitted changes]' \
677 695 '--bypass[apply patch without touching the working directory]' \
678 696 '--no-commit[do not commit, just update the working directory]' \
679 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 699 '--import-branch[use any branch information in patch (implied by --exact)]' \
682 '(--date -d)'{-d+,--date=}'[record datecode as commit date]:date code:' \
683 '(--user -u)'{-u+,--user=}'[record user as commiter]:user:' \
684 '(--similarity -s)'{-s+,--similarity=}'[guess renamed files by similarity (0<=s<=100)]:' \
700 '(--date -d)'{-d+,--date=}'[record the specified date as commit date]:date' \
701 '(--user -u)'{-u+,--user=}'[record the specified user as committer]:user' \
702 '(--similarity -s)'{-s+,--similarity=}'[guess renamed files by similarity (0<=s<=100)]:similarity' \
685 703 '*:patch:_files'
686 704 }
687 705
@@ -689,7 +707,7 b' typeset -A _hg_cmd_globals'
689 707 _arguments -s -S : $_hg_log_opts $_hg_branch_bmark_opts $_hg_remote_opts \
690 708 $_hg_subrepos_opts \
691 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 711 '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \
694 712 '--bundle[file to store the bundles into]:bundle file:_files' \
695 713 ':source:_hg_remote'
@@ -704,7 +722,7 b' typeset -A _hg_cmd_globals'
704 722 _arguments -s -S : $_hg_global_opts $_hg_pat_opts \
705 723 '(--rev -r)'{-r+,--rev=}'[search repository as it stood at revision]:revision:_hg_labels' \
706 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 726 '*:search pattern:_hg_files'
709 727 }
710 728
@@ -713,14 +731,13 b' typeset -A _hg_cmd_globals'
713 731 '(--follow --follow-first -f)'{-f,--follow}'[follow changeset or history]' \
714 732 '(-f --follow)--follow-first[only follow the first parent of merge changesets]' \
715 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 735 '*'{-r+,--rev=}'[show the specified revision or revset]:revision:_hg_revrange' \
718 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' \
720 '(--graph -G)'{-G,--graph}'[show the revision DAG]' \
721 '(--branch -b)'{-b+,--branch=}'[show changesets within the given named branch]:branch:_hg_branches' \
722 '(--user -u)'{-u+,--user=}'[revisions committed by user]:user:' \
723 '(--date -d)'{-d+,--date=}'[show revisions matching date spec]:date:' \
737 '*'{-P+,--prune=}'[do not display revision or any of its ancestors]:revision:_hg_labels' \
738 '*'{-b+,--branch=}'[show changesets within the given named branch]:branch:_hg_branches' \
739 '*'{-u+,--user=}'[revisions committed by user]:user' \
740 '(--date -d)'{-d+,--date=}'[show revisions matching date spec]:date' \
724 741 '*:files:_hg_files'
725 742 }
726 743
@@ -742,8 +759,8 b' typeset -A _hg_cmd_globals'
742 759 _hg_cmd_outgoing() {
743 760 _arguments -s -S : $_hg_log_opts $_hg_branch_bmark_opts $_hg_remote_opts \
744 761 $_hg_subrepos_opts \
745 '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \
746 '*'{-r+,--rev=}'[a specific revision you would like to push]:revision:_hg_revrange' \
762 '(--force -f)'{-f,--force}'[run even when the destination is unrelated]' \
763 '*'{-r+,--rev=}'[a changeset intended to be included in the destination]:revision:_hg_revrange' \
747 764 '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \
748 765 ':destination:_hg_remote'
749 766 }
@@ -761,34 +778,34 b' typeset -A _hg_cmd_globals'
761 778
762 779 _hg_cmd_phase() {
763 780 _arguments -s -S : $_hg_global_opts \
764 '(--public -p)'{-p,--public}'[set changeset phase to public]' \
765 '(--draft -d)'{-d,--draft}'[set changeset phase to draft]' \
766 '(--secret -s)'{-s,--secret}'[set changeset phase to secret]' \
781 '(--public -p --draft -d --secret -s)'{-p,--public}'[set changeset phase to public]' \
782 '(--public -p --draft -d --secret -s)'{-d,--draft}'[set changeset phase to draft]' \
783 '(--public -p --draft -d --secret -s)'{-s,--secret}'[set changeset phase to secret]' \
767 784 '(--force -f)'{-f,--force}'[allow to move boundary backward]' \
768 '(--rev -r)'{-r+,--rev=}'[target revision]:revision:_hg_labels' \
769 ':revision:_hg_labels'
785 '*'{-r+,--rev=}'[target revision]:revision:_hg_labels' \
786 '*:revision:_hg_labels'
770 787 }
771 788
772 789 _hg_cmd_pull() {
773 790 _arguments -s -S : $_hg_global_opts $_hg_branch_bmark_opts $_hg_remote_opts \
774 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]' \
776 '(--rev -r)'{-r+,--rev}'[a specific revision up to which you would like to pull]:revision:' \
792 '(--update -u)'{-u,--update}'[update to new branch head if new descendants were pulled]' \
793 '*'{-r+,--rev=}'[a remote changeset intended to be added]:revision:_hg_labels' \
777 794 ':source:_hg_remote'
778 795 }
779 796
780 797 _hg_cmd_push() {
781 798 _arguments -s -S : $_hg_global_opts $_hg_branch_bmark_opts $_hg_remote_opts \
782 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 801 '--new-branch[allow pushing a new branch]' \
785 802 ':destination:_hg_remote'
786 803 }
787 804
788 805 _hg_cmd_remove() {
789 _arguments -s -S : $_hg_global_opts $_hg_pat_opts \
790 '(--after -A)'{-A,--after}'[record remove that has already occurred]' \
791 '(--force -f)'{-f,--force}'[remove file even if modified]' \
806 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \
807 '(--after -A)'{-A,--after}'[record delete for missing files]' \
808 '(--force -f)'{-f,--force}'[forget added files, delete modified files]' \
792 809 '*:file:_hg_files'
793 810 }
794 811
@@ -808,7 +825,7 b' typeset -A _hg_cmd_globals'
808 825 '(--no-status -n)'{-n,--no-status}'[hide status prefix]' \
809 826 '(--list -l --mark -m --unmark -u)'{-l,--list}'[list state of files needing merge]:*:merged files:->resolve_files' \
810 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 829 '*:file:_hg_unresolved' && ret=0
813 830
814 831 if [[ $state == 'resolve_files' ]]
@@ -828,7 +845,8 b' typeset -A _hg_cmd_globals'
828 845 '(--all -a :)'{-a,--all}'[revert all changes when no arguments given]' \
829 846 '(--rev -r)'{-r+,--rev=}'[revision to revert to]:revision:_hg_labels' \
830 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 850 '*:file:->revert_files' && ret=0
833 851
834 852 if [[ $state == 'revert_files' ]]
@@ -853,27 +871,31 b' typeset -A _hg_cmd_globals'
853 871
854 872 _hg_cmd_serve() {
855 873 _arguments -s -S : $_hg_global_opts \
856 '(--accesslog -A)'{-A+,--accesslog=}'[name of access log file]:log file:_files' \
857 '(--errorlog -E)'{-E+,--errorlog=}'[name of error log file]:log file:_files' \
874 '(--accesslog -A)'{-A+,--accesslog=}'[name of access log file to write to]:log file:_files' \
875 '(--errorlog -E)'{-E+,--errorlog=}'[name of error log file to write to]:log file:_files' \
858 876 '(--daemon -d)'{-d,--daemon}'[run server in background]' \
859 '(--port -p)'{-p+,--port=}'[listen port]:listen port:' \
860 '(--address -a)'{-a+,--address=}'[interface address]:interface address:' \
861 '--prefix[prefix path to serve from]:directory:_files' \
862 '(--name -n)'{-n+,--name=}'[name to show in web pages]:repository name:' \
863 '--web-conf[name of the hgweb config file]:webconf_file:_files' \
864 '--pid-file[name of file to write process ID to]:pid_file:_files' \
865 '--cmdserver[cmdserver mode]:mode:' \
866 '(--templates -t)'{-t,--templates}'[web template directory]:template dir:_files -/' \
867 '--style[web template style]:style' \
877 '(--port -p)'{-p+,--port=}'[port to listen on (default: 8000)]:listen port' \
878 '(--address -a)'{-a+,--address=}'[address to listen on (default: all interfaces)]:interface address' \
879 '--prefix=[prefix path to serve from (default: server root)]:directory:_files' \
880 '(--name -n)'{-n+,--name=}'[name to show in web pages (default: working directory)]:repository name' \
881 '--web-conf=[name of the hgweb config file]:config file:_files' \
882 '--pid-file=[name of file to write process ID to]:pid file:_files' \
883 '--cmdserver[for remote clients]' \
884 '(--templates -t)'{-t+,--templates=}'[web template directory]:template dir:_files -/' \
885 '--style=[template style to use]:style' \
868 886 '--stdio[for remote clients]' \
869 '--certificate[certificate file]:cert_file:_files' \
870 '(--ipv6 -6)'{-6,--ipv6}'[use IPv6 in addition to IPv4]'
887 '(--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 892 _hg_cmd_showconfig() {
874 893 _arguments -s -S : $_hg_global_opts \
875 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 901 _hg_cmd_status() {
@@ -884,13 +906,13 b' typeset -A _hg_cmd_globals'
884 906 '(--removed -r)'{-r,--removed}'[show only removed files]' \
885 907 '(--deleted -d)'{-d,--deleted}'[show only deleted (but tracked) files]' \
886 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 910 '(--ignored -i)'{-i,--ignored}'[show ignored files]' \
889 911 '(--no-status -n)'{-n,--no-status}'[hide status prefix]' \
890 912 '(--copies -C)'{-C,--copies}'[show source of copied files]' \
891 913 '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \
892 '--rev[show difference from revision]:revision:_hg_labels' \
893 '--change[list the changed files of a revision]:revision:_hg_labels' \
914 '*--rev=[show difference from revision]:revision:_hg_labels' \
915 '--change=[list the changed files of a revision]:revision:_hg_labels' \
894 916 '*:files:_files'
895 917 }
896 918
@@ -902,9 +924,9 b' typeset -A _hg_cmd_globals'
902 924 _hg_cmd_tag() {
903 925 _arguments -s -S : $_hg_global_opts \
904 926 '(--local -l)'{-l,--local}'[make the tag local]' \
905 '(--message -m)'{-m+,--message=}'[message for tag commit log entry]:message:' \
906 '(--date -d)'{-d+,--date=}'[record datecode as commit date]:date code:' \
907 '(--user -u)'{-u+,--user=}'[record user as commiter]:user:' \
927 '(--message -m)'{-m+,--message=}'[message for tag commit log entry]:message' \
928 '(--date -d)'{-d+,--date=}'[record the specified date as commit date]:date' \
929 '(--user -u)'{-u+,--user=}'[record the specified user as committer]:user' \
908 930 '(--rev -r)'{-r+,--rev=}'[revision to tag]:revision:_hg_labels' \
909 931 '(--force -f)'{-f,--force}'[force tag]' \
910 932 '--remove[remove a tag]' \
@@ -920,15 +942,16 b' typeset -A _hg_cmd_globals'
920 942 _hg_cmd_unbundle() {
921 943 _arguments -s -S : $_hg_global_opts \
922 944 '(--update -u)'{-u,--update}'[update to new tip if changesets were unbundled]' \
923 ':files:_files'
945 '*:files:_files'
924 946 }
925 947
926 948 _hg_cmd_update() {
927 _arguments -s -S : $_hg_global_opts \
928 '(--clean -C)'{-C,--clean}'[overwrite locally modified files]' \
929 '(--rev -r)'{-r+,--rev=}'[revision]:revision:_hg_labels' \
930 '(--check -c)'{-c,--check}'[update across branches if no uncommitted changes]' \
931 '(--date -d)'{-d+,--date=}'[tipmost revision matching date]:' \
949 _arguments -s -S : $_hg_global_opts $_hg_mergetool_opts \
950 '(--clean -C)'{-C,--clean}'[discard uncommitted changes (no backup)]' \
951 '(--check -c)'{-c,--check}'[require clean working directory]' \
952 '(--merge -m)'{-m,--merge}'[merge uncommitted changes]' \
953 '(--date -d)'{-d+,--date=}'[tipmost revision matching date]:date' \
954 '(--rev -r 1)'{-r+,--rev=}'[revision]:revision:_hg_labels' \
932 955 ':revision:_hg_labels'
933 956 }
934 957
@@ -937,7 +960,7 b' typeset -A _hg_cmd_globals'
937 960 # HGK
938 961 _hg_cmd_view() {
939 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 964 ':revision range:_hg_labels'
942 965 }
943 966
@@ -1024,7 +1047,7 b' typeset -A _hg_cmd_globals'
1024 1047
1025 1048 _hg_cmd_qfold() {
1026 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 1051 '(--force -f)'{-f,--force}'[overwrite any local changes]' \
1029 1052 '--no-backup[do not save backup copies of files]' \
1030 1053 '*:unapplied patch:_hg_qunapplied'
@@ -1053,7 +1076,7 b' typeset -A _hg_cmd_globals'
1053 1076 _hg_cmd_qimport() {
1054 1077 _arguments -s -S : $_hg_global_opts $_hg_gitlike_opts \
1055 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 1080 '(--force -f)'{-f,--force}'[overwrite existing files]' \
1058 1081 '*'{-r+,--rev=}'[place existing revisions under mq control]:revision:_hg_revrange' \
1059 1082 '(--push -P)'{-P,--push}'[qpush after importing]' \
@@ -1131,12 +1154,12 b' typeset -A _hg_cmd_globals'
1131 1154
1132 1155 _hg_cmd_strip() {
1133 1156 _arguments -s -S : $_hg_global_opts \
1134 '(--force -f)'{-f,--force}'[force removal, discard uncommitted changes, no backup]' \
1135 '(--no-backup -n)'{-n,--no-backup}'[no backups]' \
1136 '(--keep -k)'{-k,--keep}'[do not modify working copy during strip]' \
1137 '(--bookmark -B)'{-B+,--bookmark=}'[remove revs only reachable from given bookmark]:bookmark:_hg_bookmarks' \
1138 '(--rev -r)'{-r+,--rev=}'[revision]:revision:_hg_labels' \
1139 ':revision:_hg_labels'
1157 '(--force -f)'{-f,--force}'[force removal of changesets, discard uncommitted changes (no backup)]' \
1158 '--no-backup[no backups]' \
1159 '(--keep -k)'{-k,--keep}'[do not modify working directory during strip]' \
1160 '*'{-B+,--bookmark=}'[remove revs only reachable from given bookmark]:bookmark:_hg_bookmarks' \
1161 '*'{-r+,--rev=}'[revision]:revision:_hg_labels' \
1162 '*:revision:_hg_labels'
1140 1163 }
1141 1164
1142 1165 # Patchbomb
@@ -1149,23 +1172,23 b' typeset -A _hg_cmd_globals'
1149 1172 '--bundlename[name of the bundle attachment file (default: bundle)]:' \
1150 1173 '*'{-r+,--rev=}'[search in given revision range]:revision:_hg_revrange' \
1151 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 1176 '--intro[send an introduction email for a single patch]' \
1154 1177 '(--inline -i --attach -a)'{-a,--attach}'[send patches as attachments]' \
1155 1178 '(--attach -a --inline -i)'{-i,--inline}'[send patches as inline attachments]' \
1156 '*--bcc[email addresses of blind carbon copy recipients]:email:' \
1157 '*'{-c+,--cc}'[email addresses of copy recipients]:email:' \
1179 '*--bcc=[email addresses of blind carbon copy recipients]:email' \
1180 '*'{-c+,--cc=}'[email addresses of copy recipients]:email' \
1158 1181 '(--diffstat -d)'{-d,--diffstat}'[add diffstat output to messages]' \
1159 '--date[use the given date as the sending date]:date:' \
1160 '--desc[use the given file as the series description]:files:_files' \
1161 '(--from -f)'{-f,--from}'[email address of sender]:email:' \
1182 '--date=[use the given date as the sending date]:date' \
1183 '--desc=[use the given file as the series description]:files:_files' \
1184 '(--from -f)'{-f+,--from=}'[email address of sender]:email' \
1162 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:' \
1164 '*--reply-to[email addresses replies should be sent to]:email:' \
1165 '(--subject -s)'{-s,--subject}'[subject of first message (intro or single patch)]:subject:' \
1166 '--in-reply-to[message identifier to reply to]:msgid:' \
1167 '*--flag[flags to add in subject prefixes]:flag:' \
1168 '*'{-t,--to}'[email addresses of recipients]:email:' \
1186 '(--mbox -m)'{-m+,--mbox=}'[write messages to mbox file instead of sending them]:file:_files' \
1187 '*--reply-to=[email addresses replies should be sent to]:email' \
1188 '(--subject -s)'{-s+,--subject=}'[subject of first message (intro or single patch)]:subject' \
1189 '--in-reply-to=[message identifier to reply to]:msgid' \
1190 '*--flag=[flags to add in subject prefixes]:flag' \
1191 '*'{-t+,--to=}'[email addresses of recipients]:email' \
1169 1192 ':revision:_hg_revrange'
1170 1193 }
1171 1194
@@ -1173,14 +1196,14 b' typeset -A _hg_cmd_globals'
1173 1196 _hg_cmd_rebase() {
1174 1197 _arguments -s -S : $_hg_global_opts $_hg_commit_opts $_hg_mergetool_opts \
1175 1198 '*'{-r+,--rev=}'[rebase these revisions]:revision:_hg_revrange' \
1176 '(--source -s)'{-s+,--source=}'[rebase from the specified changeset]:revision:_hg_labels' \
1177 '(--base -b)'{-b+,--base=}'[rebase from the base of the specified changeset]:revision:_hg_labels' \
1199 '(--source -s --base -b)'{-s+,--source=}'[rebase the specified changeset and descendants]:revision:_hg_labels' \
1200 '(--source -s --base -b)'{-b+,--base=}'[rebase everything from branching point of specified changeset]:revision:_hg_labels' \
1178 1201 '(--dest -d)'{-d+,--dest=}'[rebase onto the specified changeset]:revision:_hg_labels' \
1179 '--collapse[collapse the rebased changeset]' \
1180 '--keep[keep original changeset]' \
1181 '--keepbranches[keep original branch name]' \
1182 '(--continue -c)'{-c,--continue}'[continue an interrupted rebase]' \
1183 '(--abort -a)'{-a,--abort}'[abort an interrupted rebase]' \
1202 '--collapse[collapse the rebased changesets]' \
1203 '(--keep -k)'{-k,--keep}'[keep original changesets]' \
1204 '--keepbranches[keep original branch names]' \
1205 '(--continue -c --abort -a)'{-c,--continue}'[continue an interrupted rebase]' \
1206 '(--continue -c --abort -a)'{-a,--abort}'[abort an interrupted rebase]' \
1184 1207 }
1185 1208
1186 1209 # Record
@@ -1190,8 +1213,8 b' typeset -A _hg_cmd_globals'
1190 1213 '(--addremove -A)'{-A,--addremove}'[mark new/missing files as added/removed before committing]' \
1191 1214 '--close-branch[mark a branch as closed, hiding it from the branch list]' \
1192 1215 '--amend[amend the parent of the working dir]' \
1193 '(--date -d)'{-d+,--date=}'[record the specified date as commit date]:date:' \
1194 '(--user -u)'{-u+,--user=}'[record the specified user as committer]:user:'
1216 '(--date -d)'{-d+,--date=}'[record the specified date as commit date]:date' \
1217 '(--user -u)'{-u+,--user=}'[record the specified user as committer]:user'
1195 1218 }
1196 1219
1197 1220 _hg_cmd_qrecord() {
@@ -1202,16 +1225,18 b' typeset -A _hg_cmd_globals'
1202 1225 # Convert
1203 1226 _hg_cmd_convert() {
1204 1227 _arguments -s -S : $_hg_global_opts \
1205 '(--source-type -s)'{-s,--source-type}'[source repository type]' \
1206 '(--dest-type -d)'{-d,--dest-type}'[destination repository type]' \
1207 '(--rev -r)'{-r+,--rev=}'[import up to target revision]:revision:' \
1228 '(--source-type -s)'{-s+,--source-type=}'[source repository type]:type:(hg cvs darcs git svn mtn gnuarch bzr p4)' \
1229 '(--dest-type -d)'{-d+,--dest-type=}'[destination repository type]:type:(hg svn)' \
1230 '*'{-r+,--rev=}'[import up to target revision]:revision' \
1208 1231 '(--authormap -A)'{-A+,--authormap=}'[remap usernames using this file]:file:_files' \
1209 '--filemap[remap file names using contents of file]:file:_files' \
1210 '--splicemap[splice synthesized history into place]:file:_files' \
1211 '--branchmap[change branch names while converting]:file:_files' \
1232 '--filemap=[remap file names using contents of file]:file:_files' \
1233 '--full[apply filemap changes by converting all files again]' \
1234 '--splicemap=[splice synthesized history into place]:file:_files' \
1235 '--branchmap=[change branch names while converting]:file:_files' \
1212 1236 '--branchsort[try to sort changesets by branches]' \
1213 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 1242 # Purge
General Comments 0
You need to be logged in to leave comments. Login now