Mercurial > dotfiles
comparison .zfun/_hg @ 240:c451e42b3ecc
zsh _hg: correctly complete bookmarks from hg 1.8 and later
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Mon, 28 Feb 2011 21:51:08 -0600 |
parents | e5a40e768cf8 |
children | 1e2125a577da |
comparison
equal
deleted
inserted
replaced
239:b742c194dba3 | 240:c451e42b3ecc |
---|---|
157 _describe -t commands 'mercurial command' _hg_cmd_list | 157 _describe -t commands 'mercurial command' _hg_cmd_list |
158 } | 158 } |
159 | 159 |
160 _hg_revrange() { | 160 _hg_revrange() { |
161 compset -P 1 '*:' | 161 compset -P 1 '*:' |
162 _hg_labels "$@" | |
163 } | |
164 | |
165 _hg_labels() { | |
162 _hg_tags "$@" | 166 _hg_tags "$@" |
167 _hg_bookmarks "$@" | |
163 } | 168 } |
164 | 169 |
165 _hg_tags() { | 170 _hg_tags() { |
166 typeset -a tags | 171 typeset -a tags |
167 local tag rev | 172 local tag rev |
169 _hg_cmd tags | while read tag | 174 _hg_cmd tags | while read tag |
170 do | 175 do |
171 tags+=(${tag/ # [0-9]#:*}) | 176 tags+=(${tag/ # [0-9]#:*}) |
172 done | 177 done |
173 (( $#tags )) && _describe -t tags 'tags' tags | 178 (( $#tags )) && _describe -t tags 'tags' tags |
179 } | |
180 | |
181 _hg_bookmarks() { | |
182 typeset -a bookmark bookmarks | |
183 | |
184 _hg_cmd bookmarks | while read -A bookmark | |
185 do | |
186 if test -z ${bookmark[-1]:#[0-9]*} | |
187 then | |
188 bookmarks+=($bookmark[-2]) | |
189 fi | |
190 done | |
191 (( $#bookmarks )) && _describe -t bookmarks 'bookmarks' bookmarks | |
174 } | 192 } |
175 | 193 |
176 # likely merge candidates | 194 # likely merge candidates |
177 _hg_mergerevs() { | 195 _hg_mergerevs() { |
178 typeset -a heads | 196 typeset -a heads |
391 '*:unknown or missing files:_hg_addremove' | 409 '*:unknown or missing files:_hg_addremove' |
392 } | 410 } |
393 | 411 |
394 _hg_cmd_annotate() { | 412 _hg_cmd_annotate() { |
395 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ | 413 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ |
396 '(--rev -r)'{-r+,--rev}'[annotate the specified revision]:revision:_hg_tags' \ | 414 '(--rev -r)'{-r+,--rev}'[annotate the specified revision]:revision:_hg_labels' \ |
397 '(--follow -f)'{-f,--follow}'[follow file copies and renames]' \ | 415 '(--follow -f)'{-f,--follow}'[follow file copies and renames]' \ |
398 '(--text -a)'{-a,--text}'[treat all files as text]' \ | 416 '(--text -a)'{-a,--text}'[treat all files as text]' \ |
399 '(--user -u)'{-u,--user}'[list the author]' \ | 417 '(--user -u)'{-u,--user}'[list the author]' \ |
400 '(--date -d)'{-d,--date}'[list the date]' \ | 418 '(--date -d)'{-d,--date}'[list the date]' \ |
401 '(--number -n)'{-n,--number}'[list the revision number (default)]' \ | 419 '(--number -n)'{-n,--number}'[list the revision number (default)]' \ |
405 | 423 |
406 _hg_cmd_archive() { | 424 _hg_cmd_archive() { |
407 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ | 425 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ |
408 '--no-decode[do not pass files through decoders]' \ | 426 '--no-decode[do not pass files through decoders]' \ |
409 '(--prefix -p)'{-p+,--prefix}'[directory prefix for files in archive]:' \ | 427 '(--prefix -p)'{-p+,--prefix}'[directory prefix for files in archive]:' \ |
410 '(--rev -r)'{-r+,--rev}'[revision to distribute]:revision:_hg_tags' \ | 428 '(--rev -r)'{-r+,--rev}'[revision to distribute]:revision:_hg_labels' \ |
411 '(--type -t)'{-t+,--type}'[type of distribution to create]:archive type:(files tar tbz2 tgz uzip zip)' \ | 429 '(--type -t)'{-t+,--type}'[type of distribution to create]:archive type:(files tar tbz2 tgz uzip zip)' \ |
412 '*:destination:_files' | 430 '*:destination:_files' |
413 } | 431 } |
414 | 432 |
415 _hg_cmd_backout() { | 433 _hg_cmd_backout() { |
416 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ | 434 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ |
417 '--merge[merge with old dirstate parent after backout]' \ | 435 '--merge[merge with old dirstate parent after backout]' \ |
418 '(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \ | 436 '(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \ |
419 '--parent[parent to choose when backing out merge]' \ | 437 '--parent[parent to choose when backing out merge]' \ |
420 '(--user -u)'{-u+,--user}'[record user as commiter]:user:' \ | 438 '(--user -u)'{-u+,--user}'[record user as commiter]:user:' \ |
421 '(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_tags' \ | 439 '(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_labels' \ |
422 '(--message -m)'{-m+,--message}'[use <text> as commit message]:text:' \ | 440 '(--message -m)'{-m+,--message}'[use <text> as commit message]:text:' \ |
423 '(--logfile -l)'{-l+,--logfile}'[read commit message from <file>]:log file:_files -g \*.txt' | 441 '(--logfile -l)'{-l+,--logfile}'[read commit message from <file>]:log file:_files -g \*.txt' |
424 } | 442 } |
425 | 443 |
426 _hg_cmd_bisect() { | 444 _hg_cmd_bisect() { |
427 _arguments -s -w : $_hg_global_opts \ | 445 _arguments -s -w : $_hg_global_opts \ |
428 '(-)'{-r,--reset}'[reset bisect state]' \ | 446 '(-)'{-r,--reset}'[reset bisect state]' \ |
429 '(--good -g --bad -b --skip -s --reset -r)'{-g,--good}'[mark changeset good]'::revision:_hg_tags \ | 447 '(--good -g --bad -b --skip -s --reset -r)'{-g,--good}'[mark changeset good]'::revision:_hg_labels \ |
430 '(--good -g --bad -b --skip -s --reset -r)'{-b,--bad}'[mark changeset bad]'::revision:_hg_tags \ | 448 '(--good -g --bad -b --skip -s --reset -r)'{-b,--bad}'[mark changeset bad]'::revision:_hg_labels \ |
431 '(--good -g --bad -b --skip -s --reset -r)'{-s,--skip}'[skip testing changeset]' \ | 449 '(--good -g --bad -b --skip -s --reset -r)'{-s,--skip}'[skip testing changeset]' \ |
432 '(--command -c --noupdate -U)'{-c+,--command}'[use command to check changeset state]':commands:_command_names \ | 450 '(--command -c --noupdate -U)'{-c+,--command}'[use command to check changeset state]':commands:_command_names \ |
433 '(--command -c --noupdate -U)'{-U,--noupdate}'[do not update to target]' | 451 '(--command -c --noupdate -U)'{-U,--noupdate}'[do not update to target]' |
434 } | 452 } |
435 | 453 |
454 _hg_cmd_bookmarks() { | |
455 _arguments -s -w : $_hg_global_opts \ | |
456 '(--force -f)'{-f,--force}'[force]' \ | |
457 '(--rev -r --delete -d --rename -m)'{-r+,--rev}'[revision]:revision:_hg_labels' \ | |
458 '(--rev -r --delete -d --rename -m)'{-d,--delete}'[delete a given bookmark]' \ | |
459 '(--rev -r --delete -d --rename -m)'{-m+,--rename}'[rename a given bookmark]:bookmark:_hg_bookmarks' \ | |
460 ':bookmark:_hg_bookmarks' | |
461 } | |
462 | |
436 _hg_cmd_branch() { | 463 _hg_cmd_branch() { |
437 _arguments -s -w : $_hg_global_opts \ | 464 _arguments -s -w : $_hg_global_opts \ |
438 '(--force -f)'{-f,--force}'[set branch name even if it shadows an existing branch]' \ | 465 '(--force -f)'{-f,--force}'[set branch name even if it shadows an existing branch]' \ |
439 '(--clean -C)'{-C,--clean}'[reset branch name to parent branch name]' | 466 '(--clean -C)'{-C,--clean}'[reset branch name to parent branch name]' |
440 } | 467 } |
445 } | 472 } |
446 | 473 |
447 _hg_cmd_bundle() { | 474 _hg_cmd_bundle() { |
448 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \ | 475 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \ |
449 '(--force -f)'{-f,--force}'[run even when remote repository is unrelated]' \ | 476 '(--force -f)'{-f,--force}'[run even when remote repository is unrelated]' \ |
450 '(2)*--base[a base changeset to specify instead of a destination]:revision:_hg_tags' \ | 477 '(2)*--base[a base changeset to specify instead of a destination]:revision:_hg_labels' \ |
451 ':output file:_files' \ | 478 ':output file:_files' \ |
452 ':destination repository:_files -/' | 479 ':destination repository:_files -/' |
453 } | 480 } |
454 | 481 |
455 _hg_cmd_cat() { | 482 _hg_cmd_cat() { |
456 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ | 483 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ |
457 '(--output -o)'{-o+,--output}'[print output to file with formatted name]:filespec:' \ | 484 '(--output -o)'{-o+,--output}'[print output to file with formatted name]:filespec:' \ |
458 '(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_tags' \ | 485 '(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_labels' \ |
459 '*:file:_hg_files' | 486 '*:file:_hg_files' |
460 } | 487 } |
461 | 488 |
462 _hg_cmd_clone() { | 489 _hg_cmd_clone() { |
463 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \ | 490 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \ |
508 | 535 |
509 _hg_cmd_export() { | 536 _hg_cmd_export() { |
510 _arguments -s -w : $_hg_global_opts $_hg_diff_opts \ | 537 _arguments -s -w : $_hg_global_opts $_hg_diff_opts \ |
511 '(--outout -o)'{-o+,--output}'[print output to file with formatted name]:filespec:' \ | 538 '(--outout -o)'{-o+,--output}'[print output to file with formatted name]:filespec:' \ |
512 '--switch-parent[diff against the second parent]' \ | 539 '--switch-parent[diff against the second parent]' \ |
513 '*:revision:_hg_tags' | 540 '*:revision:_hg_labels' |
514 } | 541 } |
515 | 542 |
516 _hg_cmd_grep() { | 543 _hg_cmd_grep() { |
517 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ | 544 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ |
518 '(--print0 -0)'{-0,--print0}'[end filenames with NUL]' \ | 545 '(--print0 -0)'{-0,--print0}'[end filenames with NUL]' \ |
527 '*:files:_hg_files' | 554 '*:files:_hg_files' |
528 } | 555 } |
529 | 556 |
530 _hg_cmd_heads() { | 557 _hg_cmd_heads() { |
531 _arguments -s -w : $_hg_global_opts $_hg_style_opts \ | 558 _arguments -s -w : $_hg_global_opts $_hg_style_opts \ |
532 '(--rev -r)'{-r+,--rev}'[show only heads which are descendants of rev]:revision:_hg_tags' | 559 '(--rev -r)'{-r+,--rev}'[show only heads which are descendants of rev]:revision:_hg_labels' |
533 } | 560 } |
534 | 561 |
535 _hg_cmd_help() { | 562 _hg_cmd_help() { |
536 _arguments -s -w : $_hg_global_opts \ | 563 _arguments -s -w : $_hg_global_opts \ |
537 '*:mercurial command:_hg_commands' | 564 '*:mercurial command:_hg_commands' |
538 } | 565 } |
539 | 566 |
540 _hg_cmd_identify() { | 567 _hg_cmd_identify() { |
541 _arguments -s -w : $_hg_global_opts \ | 568 _arguments -s -w : $_hg_global_opts \ |
542 '(--rev -r)'{-r+,--rev}'[identify the specified rev]:revision:_hg_tags' \ | 569 '(--rev -r)'{-r+,--rev}'[identify the specified rev]:revision:_hg_labels' \ |
543 '(--num -n)'{-n+,--num}'[show local revision number]' \ | 570 '(--num -n)'{-n+,--num}'[show local revision number]' \ |
544 '(--id -i)'{-i+,--id}'[show global revision id]' \ | 571 '(--id -i)'{-i+,--id}'[show global revision id]' \ |
545 '(--branch -b)'{-b+,--branch}'[show branch]' \ | 572 '(--branch -b)'{-b+,--branch}'[show branch]' \ |
546 '(--tags -t)'{-t+,--tags}'[show tags]' | 573 '(--tags -t)'{-t+,--tags}'[show tags]' |
547 } | 574 } |
570 ':dir:_files -/' | 597 ':dir:_files -/' |
571 } | 598 } |
572 | 599 |
573 _hg_cmd_locate() { | 600 _hg_cmd_locate() { |
574 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ | 601 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ |
575 '(--rev -r)'{-r+,--rev}'[search repository as it stood at revision]:revision:_hg_tags' \ | 602 '(--rev -r)'{-r+,--rev}'[search repository as it stood at revision]:revision:_hg_labels' \ |
576 '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \ | 603 '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \ |
577 '(--fullpath -f)'{-f,--fullpath}'[print complete paths]' \ | 604 '(--fullpath -f)'{-f,--fullpath}'[print complete paths]' \ |
578 '*:search pattern:_hg_files' | 605 '*:search pattern:_hg_files' |
579 } | 606 } |
580 | 607 |
587 '(--limit -l)'{-l+,--limit}'[limit number of changes displayed]:' \ | 614 '(--limit -l)'{-l+,--limit}'[limit number of changes displayed]:' \ |
588 '*'{-r,--rev}'[show the specified revision or range]:revision:_hg_revrange' \ | 615 '*'{-r,--rev}'[show the specified revision or range]:revision:_hg_revrange' \ |
589 '(--no-merges -M)'{-M,--no-merges}'[do not show merges]' \ | 616 '(--no-merges -M)'{-M,--no-merges}'[do not show merges]' \ |
590 '(--only-merges -m)'{-m,--only-merges}'[show only merges]' \ | 617 '(--only-merges -m)'{-m,--only-merges}'[show only merges]' \ |
591 '(--patch -p)'{-p,--patch}'[show patch]' \ | 618 '(--patch -p)'{-p,--patch}'[show patch]' \ |
592 '(--prune -P)'{-P+,--prune}'[do not display revision or any of its ancestors]:revision:_hg_tags' \ | 619 '(--prune -P)'{-P+,--prune}'[do not display revision or any of its ancestors]:revision:_hg_labels' \ |
593 '*:files:_hg_files' | 620 '*:files:_hg_files' |
594 } | 621 } |
595 | 622 |
596 _hg_cmd_manifest() { | 623 _hg_cmd_manifest() { |
597 _arguments -s -w : $_hg_global_opts \ | 624 _arguments -s -w : $_hg_global_opts \ |
598 ':revision:_hg_tags' | 625 ':revision:_hg_labels' |
599 } | 626 } |
600 | 627 |
601 _hg_cmd_merge() { | 628 _hg_cmd_merge() { |
602 _arguments -s -w : $_hg_global_opts \ | 629 _arguments -s -w : $_hg_global_opts \ |
603 '(--force -f)'{-f,--force}'[force a merge with outstanding changes]' \ | 630 '(--force -f)'{-f,--force}'[force a merge with outstanding changes]' \ |
616 ':destination:_hg_remote' | 643 ':destination:_hg_remote' |
617 } | 644 } |
618 | 645 |
619 _hg_cmd_parents() { | 646 _hg_cmd_parents() { |
620 _arguments -s -w : $_hg_global_opts $_hg_style_opts \ | 647 _arguments -s -w : $_hg_global_opts $_hg_style_opts \ |
621 '(--rev -r)'{-r+,--rev}'[show parents of the specified rev]:revision:_hg_tags' \ | 648 '(--rev -r)'{-r+,--rev}'[show parents of the specified rev]:revision:_hg_labels' \ |
622 ':last modified file:_hg_files' | 649 ':last modified file:_hg_files' |
623 } | 650 } |
624 | 651 |
625 _hg_cmd_paths() { | 652 _hg_cmd_paths() { |
626 _arguments -s -w : $_hg_global_opts \ | 653 _arguments -s -w : $_hg_global_opts \ |
636 } | 663 } |
637 | 664 |
638 _hg_cmd_push() { | 665 _hg_cmd_push() { |
639 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \ | 666 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \ |
640 '(--force -f)'{-f,--force}'[force push]' \ | 667 '(--force -f)'{-f,--force}'[force push]' \ |
641 '(--rev -r)'{-r+,--rev}'[a specific revision you would like to push]:revision:_hg_tags' \ | 668 '(--rev -r)'{-r+,--rev}'[a specific revision you would like to push]:revision:_hg_labels' \ |
642 ':destination:_hg_remote' | 669 ':destination:_hg_remote' |
643 } | 670 } |
644 | 671 |
645 _hg_cmd_remove() { | 672 _hg_cmd_remove() { |
646 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ | 673 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ |
677 local context state line | 704 local context state line |
678 typeset -A opt_args | 705 typeset -A opt_args |
679 | 706 |
680 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \ | 707 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \ |
681 '(--all -a :)'{-a,--all}'[revert all changes when no arguments given]' \ | 708 '(--all -a :)'{-a,--all}'[revert all changes when no arguments given]' \ |
682 '(--rev -r)'{-r+,--rev}'[revision to revert to]:revision:_hg_tags' \ | 709 '(--rev -r)'{-r+,--rev}'[revision to revert to]:revision:_hg_labels' \ |
683 '--no-backup[do not save backup copies of files]' \ | 710 '--no-backup[do not save backup copies of files]' \ |
684 '*:file:->diff_files' | 711 '*:file:->diff_files' |
685 | 712 |
686 if [[ $state == 'diff_files' ]] | 713 if [[ $state == 'diff_files' ]] |
687 then | 714 then |
727 '(--unknown -u)'{-u,--unknown}'[show only unknown files]' \ | 754 '(--unknown -u)'{-u,--unknown}'[show only unknown files]' \ |
728 '(--ignored -i)'{-i,--ignored}'[show ignored files]' \ | 755 '(--ignored -i)'{-i,--ignored}'[show ignored files]' \ |
729 '(--no-status -n)'{-n,--no-status}'[hide status prefix]' \ | 756 '(--no-status -n)'{-n,--no-status}'[hide status prefix]' \ |
730 '(--copies -C)'{-C,--copies}'[show source of copied files]' \ | 757 '(--copies -C)'{-C,--copies}'[show source of copied files]' \ |
731 '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \ | 758 '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \ |
732 '--rev[show difference from revision]:revision:_hg_tags' \ | 759 '--rev[show difference from revision]:revision:_hg_labels' \ |
733 '*:files:_files' | 760 '*:files:_files' |
734 } | 761 } |
735 | 762 |
736 _hg_cmd_summary() { | 763 _hg_cmd_summary() { |
737 _arguments -s -w : $_hg_global_opts \ | 764 _arguments -s -w : $_hg_global_opts \ |
742 _arguments -s -w : $_hg_global_opts \ | 769 _arguments -s -w : $_hg_global_opts \ |
743 '(--local -l)'{-l,--local}'[make the tag local]' \ | 770 '(--local -l)'{-l,--local}'[make the tag local]' \ |
744 '(--message -m)'{-m+,--message}'[message for tag commit log entry]:message:' \ | 771 '(--message -m)'{-m+,--message}'[message for tag commit log entry]:message:' \ |
745 '(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \ | 772 '(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \ |
746 '(--user -u)'{-u+,--user}'[record user as commiter]:user:' \ | 773 '(--user -u)'{-u+,--user}'[record user as commiter]:user:' \ |
747 '(--rev -r)'{-r+,--rev}'[revision to tag]:revision:_hg_tags' \ | 774 '(--rev -r)'{-r+,--rev}'[revision to tag]:revision:_hg_labels' \ |
748 ':tag name:' | 775 ':tag name:' |
749 } | 776 } |
750 | 777 |
751 _hg_cmd_tip() { | 778 _hg_cmd_tip() { |
752 _arguments -s -w : $_hg_global_opts $_hg_style_opts \ | 779 _arguments -s -w : $_hg_global_opts $_hg_style_opts \ |
760 } | 787 } |
761 | 788 |
762 _hg_cmd_update() { | 789 _hg_cmd_update() { |
763 _arguments -s -w : $_hg_global_opts \ | 790 _arguments -s -w : $_hg_global_opts \ |
764 '(--clean -C)'{-C,--clean}'[overwrite locally modified files]' \ | 791 '(--clean -C)'{-C,--clean}'[overwrite locally modified files]' \ |
765 '(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_tags' \ | 792 '(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_labels' \ |
766 ':revision:_hg_tags' | 793 ':revision:_hg_labels' |
767 } | 794 } |
768 | 795 |
769 ## extensions ## | 796 ## extensions ## |
770 | |
771 # bookmarks | |
772 _hg_bookmarks() { | |
773 typeset -a bookmark bookmarks | |
774 | |
775 _hg_cmd bookmarks | while read -A bookmark | |
776 do | |
777 if test -z ${bookmark[-1]:#[0-9]*} | |
778 then | |
779 bookmarks+=($bookmark[-2]) | |
780 fi | |
781 done | |
782 (( $#bookmarks )) && _describe -t bookmarks 'bookmarks' bookmarks | |
783 } | |
784 | |
785 _hg_cmd_bookmarks() { | |
786 _arguments -s -w : $_hg_global_opts \ | |
787 '(--force -f)'{-f,--force}'[force]' \ | |
788 '(--rev -r --delete -d --rename -m)'{-r+,--rev}'[revision]:revision:_hg_tags' \ | |
789 '(--rev -r --delete -d --rename -m)'{-d,--delete}'[delete a given bookmark]' \ | |
790 '(--rev -r --delete -d --rename -m)'{-m+,--rename}'[rename a given bookmark]:bookmark:_hg_bookmarks' \ | |
791 ':bookmark:_hg_bookmarks' | |
792 } | |
793 | 797 |
794 # HGK | 798 # HGK |
795 _hg_cmd_view() { | 799 _hg_cmd_view() { |
796 _arguments -s -w : $_hg_global_opts \ | 800 _arguments -s -w : $_hg_global_opts \ |
797 '(--limit -l)'{-l+,--limit}'[limit number of changes displayed]:' \ | 801 '(--limit -l)'{-l+,--limit}'[limit number of changes displayed]:' \ |
968 _hg_cmd_strip() { | 972 _hg_cmd_strip() { |
969 _arguments -s -w : $_hg_global_opts \ | 973 _arguments -s -w : $_hg_global_opts \ |
970 '(--force -f)'{-f,--force}'[force multi-head removal]' \ | 974 '(--force -f)'{-f,--force}'[force multi-head removal]' \ |
971 '(--backup -b)'{-b,--backup}'[bundle unrelated changesets]' \ | 975 '(--backup -b)'{-b,--backup}'[bundle unrelated changesets]' \ |
972 '(--nobackup -n)'{-n,--nobackup}'[no backups]' \ | 976 '(--nobackup -n)'{-n,--nobackup}'[no backups]' \ |
973 ':revision:_hg_tags' | 977 ':revision:_hg_labels' |
974 } | 978 } |
975 | 979 |
976 # Patchbomb | 980 # Patchbomb |
977 _hg_cmd_email() { | 981 _hg_cmd_email() { |
978 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \ | 982 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \ |
981 '(--outgoing -o)'{-o,--outgoing}'[send changes not found in the target repository]' \ | 985 '(--outgoing -o)'{-o,--outgoing}'[send changes not found in the target repository]' \ |
982 '(--bundle -b)'{-b,--bundle}'[send changes not in target as a binary bundle]' \ | 986 '(--bundle -b)'{-b,--bundle}'[send changes not in target as a binary bundle]' \ |
983 '--bundlename[name of the bundle attachment file (default: bundle)]:' \ | 987 '--bundlename[name of the bundle attachment file (default: bundle)]:' \ |
984 '*'{-r+,--rev}'[search in given revision range]:revision:_hg_revrange' \ | 988 '*'{-r+,--rev}'[search in given revision range]:revision:_hg_revrange' \ |
985 '--force[run even when remote repository is unrelated (with -b/--bundle)]' \ | 989 '--force[run even when remote repository is unrelated (with -b/--bundle)]' \ |
986 '*--base[a base changeset to specify instead of a destination (with -b/--bundle)]:revision:_hg_tags' \ | 990 '*--base[a base changeset to specify instead of a destination (with -b/--bundle)]:revision:_hg_labels' \ |
987 '--intro[send an introduction email for a single patch]' \ | 991 '--intro[send an introduction email for a single patch]' \ |
988 '(--inline -i --attach -a)'{-a,--attach}'[send patches as attachments]' \ | 992 '(--inline -i --attach -a)'{-a,--attach}'[send patches as attachments]' \ |
989 '(--attach -a --inline -i)'{-i,--inline}'[send patches as inline attachments]' \ | 993 '(--attach -a --inline -i)'{-i,--inline}'[send patches as inline attachments]' \ |
990 '*--bcc[email addresses of blind carbon copy recipients]:email:' \ | 994 '*--bcc[email addresses of blind carbon copy recipients]:email:' \ |
991 '*'{-c+,--cc}'[email addresses of copy recipients]:email:' \ | 995 '*'{-c+,--cc}'[email addresses of copy recipients]:email:' \ |