comparison contrib/zsh_completion @ 30215:438173c41587 stable 4.0-rc

merge default into stable for 4.0 code freeze
author Kevin Bullock <kbullock+mercurial@ringworld.org>
date Tue, 18 Oct 2016 14:15:15 -0500
parents 33e8a5a00007
children 9212fd003993
comparison
equal deleted inserted replaced
30214:fc11bb10425f 30215:438173c41587
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]: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, assume yes for any required answers]'
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]'
388 '--profile[profile]' 388 '--profile[profile]'
389 '--version[output version information and exit]' 389 '--version[output version information and exit]'
390 ) 390 )
391 391
392 _hg_pat_opts=( 392 _hg_pat_opts=(
393 '*'{-I+,--include}'[include names matching the given patterns]:dir:_files -W $(_hg_cmd root) -/' 393 '*'{-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) -/') 394 '*'{-X+,--exclude=}'[exclude names matching the given patterns]:dir:_files -W $(_hg_cmd root) -/')
395 395
396 _hg_clone_opts=( 396 _hg_clone_opts=(
397 $_hg_remote_opts 397 $_hg_remote_opts
398 '(--noupdate -U)'{-U,--noupdate}'[do not update the new working directory]' 398 '(--noupdate -U)'{-U,--noupdate}'[do not update the new working directory]'
399 '--pull[use pull protocol to copy metadata]' 399 '--pull[use pull protocol to copy metadata]'
400 '--uncompressed[use uncompressed transfer (fast over LAN)]') 400 '--uncompressed[use uncompressed transfer (fast over LAN)]')
401 401
402 _hg_date_user_opts=( 402 _hg_date_user_opts=(
403 '(--currentdate -D)'{-D,--currentdate}'[record the current date as commit date]' 403 '(--currentdate -D)'{-D,--currentdate}'[record the current date as commit date]'
404 '(--currentuser -U)'{-U,--currentuser}'[record the current user as committer]' 404 '(--currentuser -U)'{-U,--currentuser}'[record the current user as committer]'
405 '(--date -d)'{-d+,--date}'[record the specified date as commit date]:date:' 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:') 406 '(--user -u)'{-u+,--user=}'[record the specified user as committer]:user:')
407 407
408 _hg_gitlike_opts=( 408 _hg_gitlike_opts=(
409 '(--git -g)'{-g,--git}'[use git extended diff format]') 409 '(--git -g)'{-g,--git}'[use git extended diff format]')
410 410
411 _hg_diff_opts=( 411 _hg_diff_opts=(
412 $_hg_gitlike_opts 412 $_hg_gitlike_opts
413 '(--text -a)'{-a,--text}'[treat all files as text]' 413 '(--text -a)'{-a,--text}'[treat all files as text]'
414 '--nodates[omit dates from diff headers]') 414 '--nodates[omit dates from diff headers]')
415 415
416 _hg_mergetool_opts=( 416 _hg_mergetool_opts=(
417 '(--tool -t)'{-t+,--tool}'[specify merge tool]:tool:') 417 '(--tool -t)'{-t+,--tool=}'[specify merge tool]:tool:')
418 418
419 _hg_dryrun_opts=( 419 _hg_dryrun_opts=(
420 '(--dry-run -n)'{-n,--dry-run}'[do not perform actions, just print output]') 420 '(--dry-run -n)'{-n,--dry-run}'[do not perform actions, just print output]')
421 421
422 _hg_ignore_space_opts=( 422 _hg_ignore_space_opts=(
428 '--style[display using template map file]:' 428 '--style[display using template map file]:'
429 '--template[display with template]:') 429 '--template[display with template]:')
430 430
431 _hg_log_opts=( 431 _hg_log_opts=(
432 $_hg_global_opts $_hg_style_opts $_hg_gitlike_opts 432 $_hg_global_opts $_hg_style_opts $_hg_gitlike_opts
433 '(--limit -l)'{-l+,--limit}'[limit number of changes displayed]:' 433 '(--limit -l)'{-l+,--limit=}'[limit number of changes displayed]:'
434 '(--no-merges -M)'{-M,--no-merges}'[do not show merges]' 434 '(--no-merges -M)'{-M,--no-merges}'[do not show merges]'
435 '(--patch -p)'{-p,--patch}'[show patch]' 435 '(--patch -p)'{-p,--patch}'[show patch]'
436 '--stat[output diffstat-style summary of changes]' 436 '--stat[output diffstat-style summary of changes]'
437 ) 437 )
438 438
439 _hg_commit_opts=( 439 _hg_commit_opts=(
440 '(-m --message -l --logfile --edit -e)'{-e,--edit}'[edit commit message]' 440 '(-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:' 441 '(-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') 442 '(-e --edit -m --message --logfile -l)'{-l+,--logfile=}'[read the commit message from <file>]:log file:_files')
443 443
444 _hg_remote_opts=( 444 _hg_remote_opts=(
445 '(--ssh -e)'{-e+,--ssh}'[specify ssh command to use]:' 445 '(--ssh -e)'{-e+,--ssh=}'[specify ssh command to use]:'
446 '--remotecmd[specify hg command to run on the remote side]:') 446 '--remotecmd[specify hg command to run on the remote side]:')
447 447
448 _hg_branch_bmark_opts=( 448 _hg_branch_bmark_opts=(
449 '(--bookmark -B)'{-B+,--bookmark}'[specify bookmark(s)]:bookmark:_hg_bookmarks' 449 '(--bookmark -B)'{-B+,--bookmark=}'[specify bookmark(s)]:bookmark:_hg_bookmarks'
450 '(--branch -b)'{-b+,--branch}'[specify branch(es)]:branch:_hg_branches' 450 '(--branch -b)'{-b+,--branch=}'[specify branch(es)]:branch:_hg_branches'
451 ) 451 )
452 452
453 _hg_subrepos_opts=( 453 _hg_subrepos_opts=(
454 '(--subrepos -S)'{-S,--subrepos}'[recurse into subrepositories]') 454 '(--subrepos -S)'{-S,--subrepos}'[recurse into subrepositories]')
455 455
462 '*:unknown files:_hg_unknown' 462 '*:unknown files:_hg_unknown'
463 } 463 }
464 464
465 _hg_cmd_addremove() { 465 _hg_cmd_addremove() {
466 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \ 466 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \
467 '(--similarity -s)'{-s+,--similarity}'[guess renamed files by similarity (0<=s<=100)]:' \ 467 '(--similarity -s)'{-s+,--similarity=}'[guess renamed files by similarity (0<=s<=100)]:' \
468 '*:unknown or missing files:_hg_addremove' 468 '*:unknown or missing files:_hg_addremove'
469 } 469 }
470 470
471 _hg_cmd_annotate() { 471 _hg_cmd_annotate() {
472 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ 472 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
473 '(--rev -r)'{-r+,--rev}'[annotate the specified revision]:revision:_hg_labels' \ 473 '(--rev -r)'{-r+,--rev=}'[annotate the specified revision]:revision:_hg_labels' \
474 '(--follow -f)'{-f,--follow}'[follow file copies and renames]' \ 474 '(--follow -f)'{-f,--follow}'[follow file copies and renames]' \
475 '(--text -a)'{-a,--text}'[treat all files as text]' \ 475 '(--text -a)'{-a,--text}'[treat all files as text]' \
476 '(--user -u)'{-u,--user}'[list the author]' \ 476 '(--user -u)'{-u,--user}'[list the author]' \
477 '(--date -d)'{-d,--date}'[list the date]' \ 477 '(--date -d)'{-d,--date}'[list the date]' \
478 '(--number -n)'{-n,--number}'[list the revision number (default)]' \ 478 '(--number -n)'{-n,--number}'[list the revision number (default)]' \
481 } 481 }
482 482
483 _hg_cmd_archive() { 483 _hg_cmd_archive() {
484 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \ 484 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \
485 '--no-decode[do not pass files through decoders]' \ 485 '--no-decode[do not pass files through decoders]' \
486 '(--prefix -p)'{-p+,--prefix}'[directory prefix for files in archive]:' \ 486 '(--prefix -p)'{-p+,--prefix=}'[directory prefix for files in archive]:' \
487 '(--rev -r)'{-r+,--rev}'[revision to distribute]:revision:_hg_labels' \ 487 '(--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)' \ 488 '(--type -t)'{-t+,--type=}'[type of distribution to create]:archive type:(files tar tbz2 tgz uzip zip)' \
489 '*:destination:_files' 489 '*:destination:_files'
490 } 490 }
491 491
492 _hg_cmd_backout() { 492 _hg_cmd_backout() {
493 _arguments -s -w : $_hg_global_opts $_hg_mergetool_opts $_hg_pat_opts \ 493 _arguments -s -w : $_hg_global_opts $_hg_mergetool_opts $_hg_pat_opts \
494 '--merge[merge with old dirstate parent after backout]' \ 494 '--merge[merge with old dirstate parent after backout]' \
495 '(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \ 495 '(--date -d)'{-d+,--date=}'[record datecode as commit date]:date code:' \
496 '--parent[parent to choose when backing out merge]' \ 496 '--parent[parent to choose when backing out merge]' \
497 '(--user -u)'{-u+,--user}'[record user as commiter]:user:' \ 497 '(--user -u)'{-u+,--user=}'[record user as commiter]:user:' \
498 '(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_labels' \ 498 '(--rev -r)'{-r+,--rev=}'[revision]:revision:_hg_labels' \
499 '(--message -m)'{-m+,--message}'[use <text> as commit message]:text:' \ 499 '(--message -m)'{-m+,--message=}'[use <text> as commit message]:text:' \
500 '(--logfile -l)'{-l+,--logfile}'[read commit message from <file>]:log file:_files' 500 '(--logfile -l)'{-l+,--logfile=}'[read commit message from <file>]:log file:_files'
501 } 501 }
502 502
503 _hg_cmd_bisect() { 503 _hg_cmd_bisect() {
504 _arguments -s -w : $_hg_global_opts \ 504 _arguments -s -w : $_hg_global_opts \
505 '(-)'{-r,--reset}'[reset bisect state]' \ 505 '(-)'{-r,--reset}'[reset bisect state]' \
506 '(--extend -e)'{-e,--extend}'[extend the bisect range]' \ 506 '(--extend -e)'{-e,--extend}'[extend the bisect range]' \
507 '(--good -g --bad -b --skip -s --reset -r)'{-g,--good}'[mark changeset good]'::revision:_hg_labels \ 507 '(--good -g --bad -b --skip -s --reset -r)'{-g,--good}'[mark changeset good]'::revision:_hg_labels \
508 '(--good -g --bad -b --skip -s --reset -r)'{-b,--bad}'[mark changeset bad]'::revision:_hg_labels \ 508 '(--good -g --bad -b --skip -s --reset -r)'{-b,--bad}'[mark changeset bad]'::revision:_hg_labels \
509 '(--good -g --bad -b --skip -s --reset -r)'{-s,--skip}'[skip testing changeset]' \ 509 '(--good -g --bad -b --skip -s --reset -r)'{-s,--skip}'[skip testing changeset]' \
510 '(--command -c --noupdate -U)'{-c+,--command}'[use command to check changeset state]':commands:_command_names \ 510 '(--command -c --noupdate -U)'{-c+,--command=}'[use command to check changeset state]':commands:_command_names \
511 '(--command -c --noupdate -U)'{-U,--noupdate}'[do not update to target]' 511 '(--command -c --noupdate -U)'{-U,--noupdate}'[do not update to target]'
512 } 512 }
513 513
514 _hg_cmd_bookmarks() { 514 _hg_cmd_bookmarks() {
515 _arguments -s -w : $_hg_global_opts \ 515 _arguments -s -w : $_hg_global_opts \
516 '(--force -f)'{-f,--force}'[force]' \ 516 '(--force -f)'{-f,--force}'[force]' \
517 '(--inactive -i)'{-i,--inactive}'[mark a bookmark inactive]' \ 517 '(--inactive -i)'{-i,--inactive}'[mark a bookmark inactive]' \
518 '(--rev -r --delete -d --rename -m)'{-r+,--rev}'[revision]:revision:_hg_labels' \ 518 '(--rev -r --delete -d --rename -m)'{-r+,--rev=}'[revision]:revision:_hg_labels' \
519 '(--rev -r --delete -d --rename -m)'{-d,--delete}'[delete a given bookmark]' \ 519 '(--rev -r --delete -d --rename -m)'{-d,--delete}'[delete a given bookmark]' \
520 '(--rev -r --delete -d --rename -m)'{-m+,--rename}'[rename a given bookmark]:bookmark:_hg_bookmarks' \ 520 '(--rev -r --delete -d --rename -m)'{-m+,--rename=}'[rename a given bookmark]:bookmark:_hg_bookmarks' \
521 ':bookmark:_hg_bookmarks' 521 ':bookmark:_hg_bookmarks'
522 } 522 }
523 523
524 _hg_cmd_branch() { 524 _hg_cmd_branch() {
525 _arguments -s -w : $_hg_global_opts \ 525 _arguments -s -w : $_hg_global_opts \
535 535
536 _hg_cmd_bundle() { 536 _hg_cmd_bundle() {
537 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \ 537 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \
538 '(--force -f)'{-f,--force}'[run even when remote repository is unrelated]' \ 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' \ 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]' \ 540 '(--branch -b)'{-b+,--branch=}'[a specific branch to bundle]:' \
541 '(--rev -r)'{-r+,--rev}'[changeset(s) to bundle]:' \ 541 '(--rev -r)'{-r+,--rev=}'[changeset(s) to bundle]:' \
542 '--all[bundle all changesets in the repository]' \ 542 '--all[bundle all changesets in the repository]' \
543 ':output file:_files' \ 543 ':output file:_files' \
544 ':destination repository:_files -/' 544 ':destination repository:_files -/'
545 } 545 }
546 546
547 _hg_cmd_cat() { 547 _hg_cmd_cat() {
548 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ 548 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
549 '(--output -o)'{-o+,--output}'[print output to file with formatted name]:filespec:' \ 549 '(--output -o)'{-o+,--output=}'[print output to file with formatted name]:filespec:' \
550 '(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_labels' \ 550 '(--rev -r)'{-r+,--rev=}'[revision]:revision:_hg_labels' \
551 '--decode[apply any matching decode filter]' \ 551 '--decode[apply any matching decode filter]' \
552 '*:file:_hg_files' 552 '*:file:_hg_files'
553 } 553 }
554 554
555 _hg_cmd_clone() { 555 _hg_cmd_clone() {
556 _arguments -s -w : $_hg_global_opts $_hg_clone_opts \ 556 _arguments -s -w : $_hg_global_opts $_hg_clone_opts \
557 '(--rev -r)'{-r+,--rev}'[a changeset you would like to have after cloning]:' \ 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]' \ 558 '(--updaterev -u)'{-u+,--updaterev=}'[revision, tag or branch to check out]:' \
559 '(--branch -b)'{-b+,--branch}'[clone only the specified branch]' \ 559 '(--branch -b)'{-b+,--branch=}'[clone only the specified branch]:' \
560 ':source repository:_hg_remote' \ 560 ':source repository:_hg_remote' \
561 ':destination:_hg_clone_dest' 561 ':destination:_hg_clone_dest'
562 } 562 }
563 563
564 _hg_cmd_commit() { 564 _hg_cmd_commit() {
565 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \ 565 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \
566 '(--addremove -A)'{-A,--addremove}'[mark new/missing files as added/removed before committing]' \ 566 '(--addremove -A)'{-A,--addremove}'[mark new/missing files as added/removed before committing]' \
567 '(--message -m)'{-m+,--message}'[use <text> as commit message]:text:' \ 567 '(--message -m)'{-m+,--message=}'[use <text> as commit message]:text:' \
568 '(--logfile -l)'{-l+,--logfile}'[read commit message from <file>]:log file:_files' \ 568 '(--logfile -l)'{-l+,--logfile=}'[read commit message from <file>]:log file:_files' \
569 '(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \ 569 '(--date -d)'{-d+,--date=}'[record datecode as commit date]:date code:' \
570 '(--user -u)'{-u+,--user}'[record user as commiter]:user:' \ 570 '(--user -u)'{-u+,--user=}'[record user as commiter]:user:' \
571 '--amend[amend the parent of the working dir]' \ 571 '--amend[amend the parent of the working dir]' \
572 '--close-branch[mark a branch as closed]' \ 572 '--close-branch[mark a branch as closed]' \
573 '*:file:_hg_files' 573 '*:file:_hg_files'
574 } 574 }
575 575
582 582
583 _hg_cmd_diff() { 583 _hg_cmd_diff() {
584 typeset -A opt_args 584 typeset -A opt_args
585 _arguments -s -w : $_hg_global_opts $_hg_diff_opts $_hg_ignore_space_opts \ 585 _arguments -s -w : $_hg_global_opts $_hg_diff_opts $_hg_ignore_space_opts \
586 $_hg_pat_opts $_hg_subrepos_opts \ 586 $_hg_pat_opts $_hg_subrepos_opts \
587 '*'{-r,--rev}'+[revision]:revision:_hg_revrange' \ 587 '*'{-r+,--rev=}'[revision]:revision:_hg_revrange' \
588 '(--show-function -p)'{-p,--show-function}'[show which function each change is in]' \ 588 '(--show-function -p)'{-p,--show-function}'[show which function each change is in]' \
589 '(--change -c)'{-c,--change}'[change made by revision]' \ 589 '(--change -c)'{-c+,--change=}'[change made by revision]:' \
590 '(--text -a)'{-a,--text}'[treat all files as text]' \ 590 '(--text -a)'{-a,--text}'[treat all files as text]' \
591 '--reverse[produce a diff that undoes the changes]' \ 591 '--reverse[produce a diff that undoes the changes]' \
592 '(--unified -U)'{-U,--unified}'[number of lines of context to show]' \ 592 '(--unified -U)'{-U+,--unified=}'[number of lines of context to show]:' \
593 '--stat[output diffstat-style summary of changes]' \ 593 '--stat[output diffstat-style summary of changes]' \
594 '*:file:->diff_files' 594 '*:file:->diff_files'
595 595
596 if [[ $state == 'diff_files' ]] 596 if [[ $state == 'diff_files' ]]
597 then 597 then
604 fi 604 fi
605 } 605 }
606 606
607 _hg_cmd_export() { 607 _hg_cmd_export() {
608 _arguments -s -w : $_hg_global_opts $_hg_diff_opts \ 608 _arguments -s -w : $_hg_global_opts $_hg_diff_opts \
609 '(--outout -o)'{-o+,--output}'[print output to file with formatted name]:filespec:' \ 609 '(--outout -o)'{-o+,--output=}'[print output to file with formatted name]:filespec:' \
610 '--switch-parent[diff against the second parent]' \ 610 '--switch-parent[diff against the second parent]' \
611 '(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_labels' \ 611 '(--rev -r)'{-r+,--rev=}'[revision]:revision:_hg_labels' \
612 '*:revision:_hg_labels' 612 '*:revision:_hg_labels'
613 } 613 }
614 614
615 _hg_cmd_forget() { 615 _hg_cmd_forget() {
616 _arguments -s -w : $_hg_global_opts \ 616 _arguments -s -w : $_hg_global_opts \
632 '--all[print all revisions with matches]' \ 632 '--all[print all revisions with matches]' \
633 '(--follow -f)'{-f,--follow}'[follow changeset or file history]' \ 633 '(--follow -f)'{-f,--follow}'[follow changeset or file history]' \
634 '(--ignore-case -i)'{-i,--ignore-case}'[ignore case when matching]' \ 634 '(--ignore-case -i)'{-i,--ignore-case}'[ignore case when matching]' \
635 '(--files-with-matches -l)'{-l,--files-with-matches}'[print only filenames and revs that match]' \ 635 '(--files-with-matches -l)'{-l,--files-with-matches}'[print only filenames and revs that match]' \
636 '(--line-number -n)'{-n,--line-number}'[print matching line numbers]' \ 636 '(--line-number -n)'{-n,--line-number}'[print matching line numbers]' \
637 '*'{-r+,--rev}'[search in given revision range]:revision:_hg_revrange' \ 637 '*'{-r+,--rev=}'[search in given revision range]:revision:_hg_revrange' \
638 '(--user -u)'{-u,--user}'[print user who committed change]' \ 638 '(--user -u)'{-u,--user}'[print user who committed change]' \
639 '(--date -d)'{-d,--date}'[print date of a changeset]' \ 639 '(--date -d)'{-d,--date}'[print date of a changeset]' \
640 '1:search pattern:' \ 640 '1:search pattern:' \
641 '*:files:_hg_files' 641 '*:files:_hg_files'
642 } 642 }
643 643
644 _hg_cmd_heads() { 644 _hg_cmd_heads() {
645 _arguments -s -w : $_hg_global_opts $_hg_style_opts \ 645 _arguments -s -w : $_hg_global_opts $_hg_style_opts \
646 '(--topo -t)'{-t,--topo}'[show topological heads only]' \ 646 '(--topo -t)'{-t,--topo}'[show topological heads only]' \
647 '(--closed -c)'{-c,--closed}'[show normal and closed branch heads]' \ 647 '(--closed -c)'{-c,--closed}'[show normal and closed branch heads]' \
648 '(--rev -r)'{-r+,--rev}'[show only heads which are descendants of rev]:revision:_hg_labels' 648 '(--rev -r)'{-r+,--rev=}'[show only heads which are descendants of rev]:revision:_hg_labels'
649 } 649 }
650 650
651 _hg_cmd_help() { 651 _hg_cmd_help() {
652 _arguments -s -w : $_hg_global_opts \ 652 _arguments -s -w : $_hg_global_opts \
653 '(--extension -e)'{-e,--extension}'[show only help for extensions]' \ 653 '(--extension -e)'{-e,--extension}'[show only help for extensions]' \
656 '*:mercurial help topic:_hg_help_topics' 656 '*:mercurial help topic:_hg_help_topics'
657 } 657 }
658 658
659 _hg_cmd_identify() { 659 _hg_cmd_identify() {
660 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \ 660 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \
661 '(--rev -r)'{-r+,--rev}'[identify the specified rev]:revision:_hg_labels' \ 661 '(--rev -r)'{-r+,--rev=}'[identify the specified rev]:revision:_hg_labels' \
662 '(--num -n)'{-n+,--num}'[show local revision number]' \ 662 '(--num -n)'{-n,--num}'[show local revision number]' \
663 '(--id -i)'{-i+,--id}'[show global revision id]' \ 663 '(--id -i)'{-i,--id}'[show global revision id]' \
664 '(--branch -b)'{-b+,--branch}'[show branch]' \ 664 '(--branch -b)'{-b,--branch}'[show branch]' \
665 '(--bookmark -B)'{-B+,--bookmark}'[show bookmarks]' \ 665 '(--bookmark -B)'{-B,--bookmark}'[show bookmarks]' \
666 '(--tags -t)'{-t+,--tags}'[show tags]' 666 '(--tags -t)'{-t,--tags}'[show tags]'
667 } 667 }
668 668
669 _hg_cmd_import() { 669 _hg_cmd_import() {
670 _arguments -s -w : $_hg_global_opts $_hg_commit_opts \ 670 _arguments -s -w : $_hg_global_opts $_hg_commit_opts \
671 '(--strip -p)'{-p+,--strip}'[directory strip option for patch (default: 1)]:count:' \ 671 '(--strip -p)'{-p+,--strip=}'[directory strip option for patch (default: 1)]:count:' \
672 '(--force -f)'{-f,--force}'[skip check for outstanding uncommitted changes]' \ 672 '(--force -f)'{-f,--force}'[skip check for outstanding uncommitted changes]' \
673 '--bypass[apply patch without touching the working directory]' \ 673 '--bypass[apply patch without touching the working directory]' \
674 '--no-commit[do not commit, just update the working directory]' \ 674 '--no-commit[do not commit, just update the working directory]' \
675 '--exact[apply patch to the nodes from which it was generated]' \ 675 '--exact[apply patch to the nodes from which it was generated]' \
676 '--import-branch[use any branch information in patch (implied by --exact)]' \ 676 '--import-branch[use any branch information in patch (implied by --exact)]' \
677 '(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \ 677 '(--date -d)'{-d+,--date=}'[record datecode as commit date]:date code:' \
678 '(--user -u)'{-u+,--user}'[record user as commiter]:user:' \ 678 '(--user -u)'{-u+,--user=}'[record user as commiter]:user:' \
679 '(--similarity -s)'{-s+,--similarity}'[guess renamed files by similarity (0<=s<=100)]:' \ 679 '(--similarity -s)'{-s+,--similarity=}'[guess renamed files by similarity (0<=s<=100)]:' \
680 '*:patch:_files' 680 '*:patch:_files'
681 } 681 }
682 682
683 _hg_cmd_incoming() { 683 _hg_cmd_incoming() {
684 _arguments -s -w : $_hg_log_opts $_hg_branch_bmark_opts $_hg_remote_opts \ 684 _arguments -s -w : $_hg_log_opts $_hg_branch_bmark_opts $_hg_remote_opts \
685 $_hg_subrepos_opts \ 685 $_hg_subrepos_opts \
686 '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \ 686 '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \
687 '(--rev -r)'{-r+,--rev}'[a specific revision up to which you would like to pull]:revision:_hg_labels' \ 687 '(--rev -r)'{-r+,--rev=}'[a specific revision up to which you would like to pull]:revision:_hg_labels' \
688 '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \ 688 '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \
689 '--bundle[file to store the bundles into]:bundle file:_files' \ 689 '--bundle[file to store the bundles into]:bundle file:_files' \
690 ':source:_hg_remote' 690 ':source:_hg_remote'
691 } 691 }
692 692
695 ':dir:_files -/' 695 ':dir:_files -/'
696 } 696 }
697 697
698 _hg_cmd_locate() { 698 _hg_cmd_locate() {
699 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ 699 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
700 '(--rev -r)'{-r+,--rev}'[search repository as it stood at revision]:revision:_hg_labels' \ 700 '(--rev -r)'{-r+,--rev=}'[search repository as it stood at revision]:revision:_hg_labels' \
701 '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \ 701 '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \
702 '(--fullpath -f)'{-f,--fullpath}'[print complete paths]' \ 702 '(--fullpath -f)'{-f,--fullpath}'[print complete paths]' \
703 '*:search pattern:_hg_files' 703 '*:search pattern:_hg_files'
704 } 704 }
705 705
707 _arguments -s -w : $_hg_log_opts $_hg_pat_opts \ 707 _arguments -s -w : $_hg_log_opts $_hg_pat_opts \
708 '(--follow --follow-first -f)'{-f,--follow}'[follow changeset or history]' \ 708 '(--follow --follow-first -f)'{-f,--follow}'[follow changeset or history]' \
709 '(-f --follow)--follow-first[only follow the first parent of merge changesets]' \ 709 '(-f --follow)--follow-first[only follow the first parent of merge changesets]' \
710 '(--copies -C)'{-C,--copies}'[show copied files]' \ 710 '(--copies -C)'{-C,--copies}'[show copied files]' \
711 '(--keyword -k)'{-k+,--keyword}'[search for a keyword]:' \ 711 '(--keyword -k)'{-k+,--keyword}'[search for a keyword]:' \
712 '*'{-r,--rev}'[show the specified revision or revset]:revision:_hg_revrange' \ 712 '*'{-r+,--rev=}'[show the specified revision or revset]:revision:_hg_revrange' \
713 '(--only-merges -m)'{-m,--only-merges}'[show only merges]' \ 713 '(--only-merges -m)'{-m,--only-merges}'[show only merges]' \
714 '(--prune -P)'{-P+,--prune}'[do not display revision or any of its ancestors]:revision:_hg_labels' \ 714 '(--prune -P)'{-P+,--prune=}'[do not display revision or any of its ancestors]:revision:_hg_labels' \
715 '(--graph -G)'{-G+,--graph}'[show the revision DAG]' \ 715 '(--graph -G)'{-G,--graph}'[show the revision DAG]' \
716 '(--branch -b)'{-b+,--branch}'[show changesets within the given named branch]:branch:_hg_branches' \ 716 '(--branch -b)'{-b+,--branch=}'[show changesets within the given named branch]:branch:_hg_branches' \
717 '(--user -u)'{-u+,--user}'[revisions committed by user]:user:' \ 717 '(--user -u)'{-u+,--user=}'[revisions committed by user]:user:' \
718 '(--date -d)'{-d+,--date}'[show revisions matching date spec]:date:' \ 718 '(--date -d)'{-d+,--date=}'[show revisions matching date spec]:date:' \
719 '*:files:_hg_files' 719 '*:files:_hg_files'
720 } 720 }
721 721
722 _hg_cmd_manifest() { 722 _hg_cmd_manifest() {
723 _arguments -s -w : $_hg_global_opts \ 723 _arguments -s -w : $_hg_global_opts \
724 '--all[list files from all revisions]' \ 724 '--all[list files from all revisions]' \
725 '(--rev -r)'{-r+,--rev}'[revision to display]:revision:_hg_labels' \ 725 '(--rev -r)'{-r+,--rev=}'[revision to display]:revision:_hg_labels' \
726 ':revision:_hg_labels' 726 ':revision:_hg_labels'
727 } 727 }
728 728
729 _hg_cmd_merge() { 729 _hg_cmd_merge() {
730 _arguments -s -w : $_hg_global_opts $_hg_mergetool_opts \ 730 _arguments -s -w : $_hg_global_opts $_hg_mergetool_opts \
731 '(--force -f)'{-f,--force}'[force a merge with outstanding changes]' \ 731 '(--force -f)'{-f,--force}'[force a merge with outstanding changes]' \
732 '(--rev -r 1)'{-r,--rev}'[revision to merge]:revision:_hg_mergerevs' \ 732 '(--rev -r 1)'{-r+,--rev=}'[revision to merge]:revision:_hg_mergerevs' \
733 '(--preview -P)'{-P,--preview}'[review revisions to merge (no merge is performed)]' \ 733 '(--preview -P)'{-P,--preview}'[review revisions to merge (no merge is performed)]' \
734 ':revision:_hg_mergerevs' 734 ':revision:_hg_mergerevs'
735 } 735 }
736 736
737 _hg_cmd_outgoing() { 737 _hg_cmd_outgoing() {
738 _arguments -s -w : $_hg_log_opts $_hg_branch_bmark_opts $_hg_remote_opts \ 738 _arguments -s -w : $_hg_log_opts $_hg_branch_bmark_opts $_hg_remote_opts \
739 $_hg_subrepos_opts \ 739 $_hg_subrepos_opts \
740 '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \ 740 '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \
741 '*'{-r,--rev}'[a specific revision you would like to push]:revision:_hg_revrange' \ 741 '*'{-r+,--rev=}'[a specific revision you would like to push]:revision:_hg_revrange' \
742 '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \ 742 '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \
743 ':destination:_hg_remote' 743 ':destination:_hg_remote'
744 } 744 }
745 745
746 _hg_cmd_parents() { 746 _hg_cmd_parents() {
747 _arguments -s -w : $_hg_global_opts $_hg_style_opts \ 747 _arguments -s -w : $_hg_global_opts $_hg_style_opts \
748 '(--rev -r)'{-r+,--rev}'[show parents of the specified rev]:revision:_hg_labels' \ 748 '(--rev -r)'{-r+,--rev=}'[show parents of the specified rev]:revision:_hg_labels' \
749 ':last modified file:_hg_files' 749 ':last modified file:_hg_files'
750 } 750 }
751 751
752 _hg_cmd_paths() { 752 _hg_cmd_paths() {
753 _arguments -s -w : $_hg_global_opts \ 753 _arguments -s -w : $_hg_global_opts \
758 _arguments -s -w : $_hg_global_opts \ 758 _arguments -s -w : $_hg_global_opts \
759 '(--public -p)'{-p,--public}'[set changeset phase to public]' \ 759 '(--public -p)'{-p,--public}'[set changeset phase to public]' \
760 '(--draft -d)'{-d,--draft}'[set changeset phase to draft]' \ 760 '(--draft -d)'{-d,--draft}'[set changeset phase to draft]' \
761 '(--secret -s)'{-s,--secret}'[set changeset phase to secret]' \ 761 '(--secret -s)'{-s,--secret}'[set changeset phase to secret]' \
762 '(--force -f)'{-f,--force}'[allow to move boundary backward]' \ 762 '(--force -f)'{-f,--force}'[allow to move boundary backward]' \
763 '(--rev -r)'{-r+,--rev}'[target revision]:revision:_hg_labels' \ 763 '(--rev -r)'{-r+,--rev=}'[target revision]:revision:_hg_labels' \
764 ':revision:_hg_labels' 764 ':revision:_hg_labels'
765 } 765 }
766 766
767 _hg_cmd_pull() { 767 _hg_cmd_pull() {
768 _arguments -s -w : $_hg_global_opts $_hg_branch_bmark_opts $_hg_remote_opts \ 768 _arguments -s -w : $_hg_global_opts $_hg_branch_bmark_opts $_hg_remote_opts \
773 } 773 }
774 774
775 _hg_cmd_push() { 775 _hg_cmd_push() {
776 _arguments -s -w : $_hg_global_opts $_hg_branch_bmark_opts $_hg_remote_opts \ 776 _arguments -s -w : $_hg_global_opts $_hg_branch_bmark_opts $_hg_remote_opts \
777 '(--force -f)'{-f,--force}'[force push]' \ 777 '(--force -f)'{-f,--force}'[force push]' \
778 '(--rev -r)'{-r+,--rev}'[a specific revision you would like to push]:revision:_hg_labels' \ 778 '(--rev -r)'{-r+,--rev=}'[a specific revision you would like to push]:revision:_hg_labels' \
779 '--new-branch[allow pushing a new branch]' \ 779 '--new-branch[allow pushing a new branch]' \
780 ':destination:_hg_remote' 780 ':destination:_hg_remote'
781 } 781 }
782 782
783 _hg_cmd_remove() { 783 _hg_cmd_remove() {
817 local context state line 817 local context state line
818 typeset -A opt_args 818 typeset -A opt_args
819 819
820 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \ 820 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \
821 '(--all -a :)'{-a,--all}'[revert all changes when no arguments given]' \ 821 '(--all -a :)'{-a,--all}'[revert all changes when no arguments given]' \
822 '(--rev -r)'{-r+,--rev}'[revision to revert to]:revision:_hg_labels' \ 822 '(--rev -r)'{-r+,--rev=}'[revision to revert to]:revision:_hg_labels' \
823 '(--no-backup -C)'{-C,--no-backup}'[do not save backup copies of files]' \ 823 '(--no-backup -C)'{-C,--no-backup}'[do not save backup copies of files]' \
824 '(--date -d)'{-d+,--date}'[tipmost revision matching date]:date code:' \ 824 '(--date -d)'{-d+,--date=}'[tipmost revision matching date]:date code:' \
825 '*:file:->diff_files' 825 '*:file:->diff_files'
826 826
827 if [[ $state == 'diff_files' ]] 827 if [[ $state == 'diff_files' ]]
828 then 828 then
829 if [[ -n $opt_args[-r] ]] 829 if [[ -n $opt_args[-r] ]]
842 '(--force -f)'{-f,--force}'[ignore safety measures]' \ 842 '(--force -f)'{-f,--force}'[ignore safety measures]' \
843 } 843 }
844 844
845 _hg_cmd_serve() { 845 _hg_cmd_serve() {
846 _arguments -s -w : $_hg_global_opts \ 846 _arguments -s -w : $_hg_global_opts \
847 '(--accesslog -A)'{-A+,--accesslog}'[name of access log file]:log file:_files' \ 847 '(--accesslog -A)'{-A+,--accesslog=}'[name of access log file]:log file:_files' \
848 '(--errorlog -E)'{-E+,--errorlog}'[name of error log file]:log file:_files' \ 848 '(--errorlog -E)'{-E+,--errorlog=}'[name of error log file]:log file:_files' \
849 '(--daemon -d)'{-d,--daemon}'[run server in background]' \ 849 '(--daemon -d)'{-d,--daemon}'[run server in background]' \
850 '(--port -p)'{-p+,--port}'[listen port]:listen port:' \ 850 '(--port -p)'{-p+,--port=}'[listen port]:listen port:' \
851 '(--address -a)'{-a+,--address}'[interface address]:interface address:' \ 851 '(--address -a)'{-a+,--address=}'[interface address]:interface address:' \
852 '--prefix[prefix path to serve from]:directory:_files' \ 852 '--prefix[prefix path to serve from]:directory:_files' \
853 '(--name -n)'{-n+,--name}'[name to show in web pages]:repository name:' \ 853 '(--name -n)'{-n+,--name=}'[name to show in web pages]:repository name:' \
854 '--web-conf[name of the hgweb config file]:webconf_file:_files' \ 854 '--web-conf[name of the hgweb config file]:webconf_file:_files' \
855 '--pid-file[name of file to write process ID to]:pid_file:_files' \ 855 '--pid-file[name of file to write process ID to]:pid_file:_files' \
856 '--cmdserver[cmdserver mode]:mode:' \ 856 '--cmdserver[cmdserver mode]:mode:' \
857 '(--templates -t)'{-t,--templates}'[web template directory]:template dir:_files -/' \ 857 '(--templates -t)'{-t,--templates}'[web template directory]:template dir:_files -/' \
858 '--style[web template style]:style' \ 858 '--style[web template style]:style' \
861 '(--ipv6 -6)'{-6,--ipv6}'[use IPv6 in addition to IPv4]' 861 '(--ipv6 -6)'{-6,--ipv6}'[use IPv6 in addition to IPv4]'
862 } 862 }
863 863
864 _hg_cmd_showconfig() { 864 _hg_cmd_showconfig() {
865 _arguments -s -w : $_hg_global_opts \ 865 _arguments -s -w : $_hg_global_opts \
866 '(--untrusted -u)'{-u+,--untrusted}'[show untrusted configuration options]' \ 866 '(--untrusted -u)'{-u,--untrusted}'[show untrusted configuration options]' \
867 ':config item:_hg_config' 867 ':config item:_hg_config'
868 } 868 }
869 869
870 _hg_cmd_status() { 870 _hg_cmd_status() {
871 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \ 871 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \
891 } 891 }
892 892
893 _hg_cmd_tag() { 893 _hg_cmd_tag() {
894 _arguments -s -w : $_hg_global_opts \ 894 _arguments -s -w : $_hg_global_opts \
895 '(--local -l)'{-l,--local}'[make the tag local]' \ 895 '(--local -l)'{-l,--local}'[make the tag local]' \
896 '(--message -m)'{-m+,--message}'[message for tag commit log entry]:message:' \ 896 '(--message -m)'{-m+,--message=}'[message for tag commit log entry]:message:' \
897 '(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \ 897 '(--date -d)'{-d+,--date=}'[record datecode as commit date]:date code:' \
898 '(--user -u)'{-u+,--user}'[record user as commiter]:user:' \ 898 '(--user -u)'{-u+,--user=}'[record user as commiter]:user:' \
899 '(--rev -r)'{-r+,--rev}'[revision to tag]:revision:_hg_labels' \ 899 '(--rev -r)'{-r+,--rev=}'[revision to tag]:revision:_hg_labels' \
900 '(--force -f)'{-f,--force}'[force tag]' \ 900 '(--force -f)'{-f,--force}'[force tag]' \
901 '--remove[remove a tag]' \ 901 '--remove[remove a tag]' \
902 '(--edit -e)'{-e,--edit}'[edit commit message]' \ 902 '(--edit -e)'{-e,--edit}'[edit commit message]' \
903 ':tag name:' 903 ':tag name:'
904 } 904 }
915 } 915 }
916 916
917 _hg_cmd_update() { 917 _hg_cmd_update() {
918 _arguments -s -w : $_hg_global_opts \ 918 _arguments -s -w : $_hg_global_opts \
919 '(--clean -C)'{-C,--clean}'[overwrite locally modified files]' \ 919 '(--clean -C)'{-C,--clean}'[overwrite locally modified files]' \
920 '(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_labels' \ 920 '(--rev -r)'{-r+,--rev=}'[revision]:revision:_hg_labels' \
921 '(--check -c)'{-c,--check}'[update across branches if no uncommitted changes]' \ 921 '(--check -c)'{-c,--check}'[update across branches if no uncommitted changes]' \
922 '(--date -d)'{-d+,--date}'[tipmost revision matching date]' \ 922 '(--date -d)'{-d+,--date=}'[tipmost revision matching date]:' \
923 ':revision:_hg_labels' 923 ':revision:_hg_labels'
924 } 924 }
925 925
926 ## extensions ## 926 ## extensions ##
927 927
928 # HGK 928 # HGK
929 _hg_cmd_view() { 929 _hg_cmd_view() {
930 _arguments -s -w : $_hg_global_opts \ 930 _arguments -s -w : $_hg_global_opts \
931 '(--limit -l)'{-l+,--limit}'[limit number of changes displayed]:' \ 931 '(--limit -l)'{-l+,--limit=}'[limit number of changes displayed]:' \
932 ':revision range:_hg_labels' 932 ':revision range:_hg_labels'
933 } 933 }
934 934
935 # MQ 935 # MQ
936 _hg_qseries() { 936 _hg_qseries() {
987 '*:patch:_hg_qapplied' 987 '*:patch:_hg_qapplied'
988 } 988 }
989 989
990 _hg_cmd_qclone() { 990 _hg_cmd_qclone() {
991 _arguments -s -w : $_hg_global_opts $_hg_remote_opts $_hg_clone_opts \ 991 _arguments -s -w : $_hg_global_opts $_hg_remote_opts $_hg_clone_opts \
992 '(--patches -p)'{-p+,--patches}'[location of source patch repository]' \ 992 '(--patches -p)'{-p+,--patches=}'[location of source patch repository]:' \
993 ':source repository:_hg_remote' \ 993 ':source repository:_hg_remote' \
994 ':destination:_hg_clone_dest' 994 ':destination:_hg_clone_dest'
995 } 995 }
996 996
997 _hg_cmd_qdelete() { 997 _hg_cmd_qdelete() {
998 _arguments -s -w : $_hg_global_opts \ 998 _arguments -s -w : $_hg_global_opts \
999 '(--keep -k)'{-k,--keep}'[keep patch file]' \ 999 '(--keep -k)'{-k,--keep}'[keep patch file]' \
1000 '*'{-r+,--rev}'[stop managing a revision]:applied patch:_hg_revrange' \ 1000 '*'{-r+,--rev=}'[stop managing a revision]:applied patch:_hg_revrange' \
1001 '*:unapplied patch:_hg_qdeletable' 1001 '*:unapplied patch:_hg_qdeletable'
1002 } 1002 }
1003 1003
1004 _hg_cmd_qdiff() { 1004 _hg_cmd_qdiff() {
1005 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_diff_opts \ 1005 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_diff_opts \
1044 _hg_cmd_qimport() { 1044 _hg_cmd_qimport() {
1045 _arguments -s -w : $_hg_global_opts $_hg_gitlike_opts \ 1045 _arguments -s -w : $_hg_global_opts $_hg_gitlike_opts \
1046 '(--existing -e)'{-e,--existing}'[import file in patch dir]' \ 1046 '(--existing -e)'{-e,--existing}'[import file in patch dir]' \
1047 '(--name -n 2)'{-n+,--name}'[patch file name]:name:' \ 1047 '(--name -n 2)'{-n+,--name}'[patch file name]:name:' \
1048 '(--force -f)'{-f,--force}'[overwrite existing files]' \ 1048 '(--force -f)'{-f,--force}'[overwrite existing files]' \
1049 '*'{-r+,--rev}'[place existing revisions under mq control]:revision:_hg_revrange' \ 1049 '*'{-r+,--rev=}'[place existing revisions under mq control]:revision:_hg_revrange' \
1050 '(--push -P)'{-P,--push}'[qpush after importing]' \ 1050 '(--push -P)'{-P,--push}'[qpush after importing]' \
1051 '*:patch:_files' 1051 '*:patch:_files'
1052 } 1052 }
1053 1053
1054 _hg_cmd_qnew() { 1054 _hg_cmd_qnew() {
1123 _hg_cmd_strip() { 1123 _hg_cmd_strip() {
1124 _arguments -s -w : $_hg_global_opts \ 1124 _arguments -s -w : $_hg_global_opts \
1125 '(--force -f)'{-f,--force}'[force removal, discard uncommitted changes, no backup]' \ 1125 '(--force -f)'{-f,--force}'[force removal, discard uncommitted changes, no backup]' \
1126 '(--no-backup -n)'{-n,--no-backup}'[no backups]' \ 1126 '(--no-backup -n)'{-n,--no-backup}'[no backups]' \
1127 '(--keep -k)'{-k,--keep}'[do not modify working copy during strip]' \ 1127 '(--keep -k)'{-k,--keep}'[do not modify working copy during strip]' \
1128 '(--bookmark -B)'{-B+,--bookmark}'[remove revs only reachable from given bookmark]:bookmark:_hg_bookmarks' \ 1128 '(--bookmark -B)'{-B+,--bookmark=}'[remove revs only reachable from given bookmark]:bookmark:_hg_bookmarks' \
1129 '(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_labels' \ 1129 '(--rev -r)'{-r+,--rev=}'[revision]:revision:_hg_labels' \
1130 ':revision:_hg_labels' 1130 ':revision:_hg_labels'
1131 } 1131 }
1132 1132
1133 # Patchbomb 1133 # Patchbomb
1134 _hg_cmd_email() { 1134 _hg_cmd_email() {
1136 '--plain[omit hg patch header]' \ 1136 '--plain[omit hg patch header]' \
1137 '--body[send patches as inline message text (default)]' \ 1137 '--body[send patches as inline message text (default)]' \
1138 '(--outgoing -o)'{-o,--outgoing}'[send changes not found in the target repository]' \ 1138 '(--outgoing -o)'{-o,--outgoing}'[send changes not found in the target repository]' \
1139 '(--bundle -b)'{-b,--bundle}'[send changes not in target as a binary bundle]' \ 1139 '(--bundle -b)'{-b,--bundle}'[send changes not in target as a binary bundle]' \
1140 '--bundlename[name of the bundle attachment file (default: bundle)]:' \ 1140 '--bundlename[name of the bundle attachment file (default: bundle)]:' \
1141 '*'{-r+,--rev}'[search in given revision range]:revision:_hg_revrange' \ 1141 '*'{-r+,--rev=}'[search in given revision range]:revision:_hg_revrange' \
1142 '--force[run even when remote repository is unrelated (with -b/--bundle)]' \ 1142 '--force[run even when remote repository is unrelated (with -b/--bundle)]' \
1143 '*--base[a base changeset to specify instead of a destination (with -b/--bundle)]:revision:_hg_labels' \ 1143 '*--base[a base changeset to specify instead of a destination (with -b/--bundle)]:revision:_hg_labels' \
1144 '--intro[send an introduction email for a single patch]' \ 1144 '--intro[send an introduction email for a single patch]' \
1145 '(--inline -i --attach -a)'{-a,--attach}'[send patches as attachments]' \ 1145 '(--inline -i --attach -a)'{-a,--attach}'[send patches as attachments]' \
1146 '(--attach -a --inline -i)'{-i,--inline}'[send patches as inline attachments]' \ 1146 '(--attach -a --inline -i)'{-i,--inline}'[send patches as inline attachments]' \
1161 } 1161 }
1162 1162
1163 # Rebase 1163 # Rebase
1164 _hg_cmd_rebase() { 1164 _hg_cmd_rebase() {
1165 _arguments -s -w : $_hg_global_opts $_hg_commit_opts $_hg_mergetool_opts \ 1165 _arguments -s -w : $_hg_global_opts $_hg_commit_opts $_hg_mergetool_opts \
1166 '*'{-r,--rev}'[rebase these revisions]:revision:_hg_revrange' \ 1166 '*'{-r+,--rev=}'[rebase these revisions]:revision:_hg_revrange' \
1167 '(--source -s)'{-s+,--source}'[rebase from the specified changeset]:revision:_hg_labels' \ 1167 '(--source -s)'{-s+,--source=}'[rebase from the specified changeset]:revision:_hg_labels' \
1168 '(--base -b)'{-b+,--base}'[rebase from the base of the specified changeset]:revision:_hg_labels' \ 1168 '(--base -b)'{-b+,--base=}'[rebase from the base of the specified changeset]:revision:_hg_labels' \
1169 '(--dest -d)'{-d+,--dest}'[rebase onto the specified changeset]:revision:_hg_labels' \ 1169 '(--dest -d)'{-d+,--dest=}'[rebase onto the specified changeset]:revision:_hg_labels' \
1170 '--collapse[collapse the rebased changeset]' \ 1170 '--collapse[collapse the rebased changeset]' \
1171 '--keep[keep original changeset]' \ 1171 '--keep[keep original changeset]' \
1172 '--keepbranches[keep original branch name]' \ 1172 '--keepbranches[keep original branch name]' \
1173 '(--continue -c)'{-c,--continue}'[continue an interrupted rebase]' \ 1173 '(--continue -c)'{-c,--continue}'[continue an interrupted rebase]' \
1174 '(--abort -a)'{-a,--abort}'[abort an interrupted rebase]' \ 1174 '(--abort -a)'{-a,--abort}'[abort an interrupted rebase]' \
1179 _arguments -s -w : $_hg_global_opts $_hg_commit_opts $_hg_pat_opts \ 1179 _arguments -s -w : $_hg_global_opts $_hg_commit_opts $_hg_pat_opts \
1180 $_hg_ignore_space_opts $_hg_subrepos_opts \ 1180 $_hg_ignore_space_opts $_hg_subrepos_opts \
1181 '(--addremove -A)'{-A,--addremove}'[mark new/missing files as added/removed before committing]' \ 1181 '(--addremove -A)'{-A,--addremove}'[mark new/missing files as added/removed before committing]' \
1182 '--close-branch[mark a branch as closed, hiding it from the branch list]' \ 1182 '--close-branch[mark a branch as closed, hiding it from the branch list]' \
1183 '--amend[amend the parent of the working dir]' \ 1183 '--amend[amend the parent of the working dir]' \
1184 '(--date -d)'{-d+,--date}'[record the specified date as commit date]:date:' \ 1184 '(--date -d)'{-d+,--date=}'[record the specified date as commit date]:date:' \
1185 '(--user -u)'{-u+,--user}'[record the specified user as committer]:user:' 1185 '(--user -u)'{-u+,--user=}'[record the specified user as committer]:user:'
1186 } 1186 }
1187 1187
1188 _hg_cmd_qrecord() { 1188 _hg_cmd_qrecord() {
1189 _arguments -s -w : $_hg_global_opts $_hg_commit_opts $_hg_date_user_opts $_hg_gitlike_opts \ 1189 _arguments -s -w : $_hg_global_opts $_hg_commit_opts $_hg_date_user_opts $_hg_gitlike_opts \
1190 $_hg_pat_opts $_hg_ignore_space_opts $_hg_subrepos_opts 1190 $_hg_pat_opts $_hg_ignore_space_opts $_hg_subrepos_opts
1193 # Convert 1193 # Convert
1194 _hg_cmd_convert() { 1194 _hg_cmd_convert() {
1195 _arguments -s -w : $_hg_global_opts \ 1195 _arguments -s -w : $_hg_global_opts \
1196 '(--source-type -s)'{-s,--source-type}'[source repository type]' \ 1196 '(--source-type -s)'{-s,--source-type}'[source repository type]' \
1197 '(--dest-type -d)'{-d,--dest-type}'[destination repository type]' \ 1197 '(--dest-type -d)'{-d,--dest-type}'[destination repository type]' \
1198 '(--rev -r)'{-r+,--rev}'[import up to target revision]:revision:' \ 1198 '(--rev -r)'{-r+,--rev=}'[import up to target revision]:revision:' \
1199 '(--authormap -A)'{-A+,--authormap}'[remap usernames using this file]:file:_files' \ 1199 '(--authormap -A)'{-A+,--authormap=}'[remap usernames using this file]:file:_files' \
1200 '--filemap[remap file names using contents of file]:file:_files' \ 1200 '--filemap[remap file names using contents of file]:file:_files' \
1201 '--splicemap[splice synthesized history into place]:file:_files' \ 1201 '--splicemap[splice synthesized history into place]:file:_files' \
1202 '--branchmap[change branch names while converting]:file:_files' \ 1202 '--branchmap[change branch names while converting]:file:_files' \
1203 '--branchsort[try to sort changesets by branches]' \ 1203 '--branchsort[try to sort changesets by branches]' \
1204 '--datesort[try to sort changesets by date]' \ 1204 '--datesort[try to sort changesets by date]' \