addremove, remove and serve accept -S/--subrepos, and purge actually doesn't.
qnew accepts -I/--include and -X/--exclude.
qrefresh accepts -D/--currentdate, -U/--currentuser, -d/--date and -u/--user.
rebase accepts -n/--dry-run.
| spectral |
| hg-reviewers |
addremove, remove and serve accept -S/--subrepos, and purge actually doesn't.
qnew accepts -I/--include and -X/--exclude.
qrefresh accepts -D/--currentdate, -U/--currentuser, -d/--date and -u/--user.
rebase accepts -n/--dry-run.
| Automatic diff as part of commit; lint not applicable. |
| Automatic diff as part of commit; unit tests not applicable. |
| } | } | ||||
| _hg_cmd_add() { | _hg_cmd_add() { | ||||
| _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts $_hg_subrepos_opts \ | _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts $_hg_subrepos_opts \ | ||||
| '*:unknown files:_hg_unknown' | '*:unknown files:_hg_unknown' | ||||
| } | } | ||||
| _hg_cmd_addremove() { | _hg_cmd_addremove() { | ||||
| _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \ | _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts $_hg_subrepos_opts \ | ||||
| '(--similarity -s)'{-s+,--similarity=}'[guess renamed files by similarity (0<=s<=100)]:similarity' \ | '(--similarity -s)'{-s+,--similarity=}'[guess renamed files by similarity (0<=s<=100)]:similarity' \ | ||||
| '*:unknown or missing files:_hg_addremove' | '*:unknown or missing files:_hg_addremove' | ||||
| } | } | ||||
| _hg_cmd_annotate() { | _hg_cmd_annotate() { | ||||
| _arguments -s -S : $_hg_global_opts $_hg_ignore_space_opts $_hg_pat_opts \ | _arguments -s -S : $_hg_global_opts $_hg_ignore_space_opts $_hg_pat_opts \ | ||||
| '(--rev -r)'{-r+,--rev=}'[annotate the specified revision]:revision:_hg_labels' \ | '(--rev -r)'{-r+,--rev=}'[annotate the specified revision]:revision:_hg_labels' \ | ||||
| "--no-follow[don't follow copies and renames]" \ | "--no-follow[don't follow copies and renames]" \ | ||||
| _arguments -s -S : $_hg_global_opts $_hg_branch_bmark_opts $_hg_remote_opts \ | _arguments -s -S : $_hg_global_opts $_hg_branch_bmark_opts $_hg_remote_opts \ | ||||
| '(--force -f)'{-f,--force}'[force push]' \ | '(--force -f)'{-f,--force}'[force push]' \ | ||||
| '*'{-r+,--rev=}'[a changeset intended to be included in the destination]:revision:_hg_labels' \ | '*'{-r+,--rev=}'[a changeset intended to be included in the destination]:revision:_hg_labels' \ | ||||
| '--new-branch[allow pushing a new branch]' \ | '--new-branch[allow pushing a new branch]' \ | ||||
| ':destination:_hg_remote' | ':destination:_hg_remote' | ||||
| } | } | ||||
| _hg_cmd_remove() { | _hg_cmd_remove() { | ||||
| _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \ | _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts $_hg_subrepos_opts \ | ||||
| '(--after -A)'{-A,--after}'[record delete for missing files]' \ | '(--after -A)'{-A,--after}'[record delete for missing files]' \ | ||||
| '(--force -f)'{-f,--force}'[forget added files, delete modified files]' \ | '(--force -f)'{-f,--force}'[forget added files, delete modified files]' \ | ||||
| '*:file:_hg_files' | '*:file:_hg_files' | ||||
| } | } | ||||
| _hg_cmd_rename() { | _hg_cmd_rename() { | ||||
| _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \ | _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \ | ||||
| '(--after -A)'{-A,--after}'[record a rename that has already occurred]' \ | '(--after -A)'{-A,--after}'[record a rename that has already occurred]' \ | ||||
| } | } | ||||
| _hg_cmd_rollback() { | _hg_cmd_rollback() { | ||||
| _arguments -s -S : $_hg_global_opts $_hg_dryrun_opts \ | _arguments -s -S : $_hg_global_opts $_hg_dryrun_opts \ | ||||
| '(--force -f)'{-f,--force}'[ignore safety measures]' \ | '(--force -f)'{-f,--force}'[ignore safety measures]' \ | ||||
| } | } | ||||
| _hg_cmd_serve() { | _hg_cmd_serve() { | ||||
| _arguments -s -S : $_hg_global_opts \ | _arguments -s -S : $_hg_global_opts $_hg_subrepos_opts \ | ||||
| '(--accesslog -A)'{-A+,--accesslog=}'[name of access log file to write to]:log file:_files' \ | '(--accesslog -A)'{-A+,--accesslog=}'[name of access log file to write to]:log file:_files' \ | ||||
| '(--errorlog -E)'{-E+,--errorlog=}'[name of error log file to write to]:log file:_files' \ | '(--errorlog -E)'{-E+,--errorlog=}'[name of error log file to write to]:log file:_files' \ | ||||
| '(--daemon -d)'{-d,--daemon}'[run server in background]' \ | '(--daemon -d)'{-d,--daemon}'[run server in background]' \ | ||||
| '(--port -p)'{-p+,--port=}'[port to listen on (default: 8000)]:listen port' \ | '(--port -p)'{-p+,--port=}'[port to listen on (default: 8000)]:listen port' \ | ||||
| '(--address -a)'{-a+,--address=}'[address to listen on (default: all interfaces)]:interface address' \ | '(--address -a)'{-a+,--address=}'[address to listen on (default: all interfaces)]:interface address' \ | ||||
| '--prefix=[prefix path to serve from (default: server root)]:directory:_files' \ | '--prefix=[prefix path to serve from (default: server root)]:directory:_files' \ | ||||
| '(--name -n)'{-n+,--name=}'[name to show in web pages (default: working directory)]:repository name' \ | '(--name -n)'{-n+,--name=}'[name to show in web pages (default: working directory)]:repository name' \ | ||||
| '--web-conf=[name of the hgweb config file]:config file:_files' \ | '--web-conf=[name of the hgweb config file]:config file:_files' \ | ||||
| _hg_cmd_qfinish() { | _hg_cmd_qfinish() { | ||||
| _arguments -s -S : $_hg_global_opts \ | _arguments -s -S : $_hg_global_opts \ | ||||
| '(--applied -a)'{-a,--applied}'[finish all applied patches]' \ | '(--applied -a)'{-a,--applied}'[finish all applied patches]' \ | ||||
| '*:patch:_hg_qapplied' | '*:patch:_hg_qapplied' | ||||
| } | } | ||||
| _hg_cmd_qfold() { | _hg_cmd_qfold() { | ||||
| _arguments -s -S : $_hg_global_opts $_h_commit_opts \ | _arguments -s -S : $_hg_global_opts $_hg_commit_opts \ | ||||
| '(--keep -k)'{-k,--keep}'[keep folded patch files]' \ | '(--keep -k)'{-k,--keep}'[keep folded patch files]' \ | ||||
| '(--force -f)'{-f,--force}'[overwrite any local changes]' \ | '(--force -f)'{-f,--force}'[overwrite any local changes]' \ | ||||
| '--no-backup[do not save backup copies of files]' \ | '--no-backup[do not save backup copies of files]' \ | ||||
| '*:unapplied patch:_hg_qunapplied' | '*:unapplied patch:_hg_qunapplied' | ||||
| } | } | ||||
| _hg_cmd_qgoto() { | _hg_cmd_qgoto() { | ||||
| _arguments -s -S : $_hg_global_opts \ | _arguments -s -S : $_hg_global_opts \ | ||||
| '(--name -n 2)'{-n+,--name}'[patch file name]:name' \ | '(--name -n 2)'{-n+,--name}'[patch file name]:name' \ | ||||
| '(--force -f)'{-f,--force}'[overwrite existing files]' \ | '(--force -f)'{-f,--force}'[overwrite existing files]' \ | ||||
| '*'{-r+,--rev=}'[place existing revisions under mq control]:revision:_hg_revrange' \ | '*'{-r+,--rev=}'[place existing revisions under mq control]:revision:_hg_revrange' \ | ||||
| '(--push -P)'{-P,--push}'[qpush after importing]' \ | '(--push -P)'{-P,--push}'[qpush after importing]' \ | ||||
| '*:patch:_files' | '*:patch:_files' | ||||
| } | } | ||||
| _hg_cmd_qnew() { | _hg_cmd_qnew() { | ||||
| _arguments -s -S : $_hg_global_opts $_hg_commit_opts $_hg_date_user_opts $_hg_gitlike_opts \ | _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_commit_opts $_hg_date_user_opts $_hg_gitlike_opts \ | ||||
| ':patch:' | ':patch:' | ||||
| } | } | ||||
| _hg_cmd_qnext() { | _hg_cmd_qnext() { | ||||
| _arguments -s -S : $_hg_global_opts $_hg_qseries_opts | _arguments -s -S : $_hg_global_opts $_hg_qseries_opts | ||||
| } | } | ||||
| _hg_cmd_qpop() { | _hg_cmd_qpop() { | ||||
| '(--exact -e)'{-e,--exact}'[apply the target patch to its recorded parent]' \ | '(--exact -e)'{-e,--exact}'[apply the target patch to its recorded parent]' \ | ||||
| '--move[reorder patch series and apply only the patch]' \ | '--move[reorder patch series and apply only the patch]' \ | ||||
| '--keep-changes[tolerate non-conflicting local changes]' \ | '--keep-changes[tolerate non-conflicting local changes]' \ | ||||
| '--no-backup[do not save backup copies of files]' \ | '--no-backup[do not save backup copies of files]' \ | ||||
| ':patch:_hg_qunapplied' | ':patch:_hg_qunapplied' | ||||
| } | } | ||||
| _hg_cmd_qrefresh() { | _hg_cmd_qrefresh() { | ||||
| _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_commit_opts $_hg_gitlike_opts \ | _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_commit_opts $_hg_date_user_opts $_hg_gitlike_opts \ | ||||
| '(--short -s)'{-s,--short}'[short refresh]' \ | '(--short -s)'{-s,--short}'[short refresh]' \ | ||||
| '*:files:_hg_files' | '*:files:_hg_files' | ||||
| } | } | ||||
| _hg_cmd_qrename() { | _hg_cmd_qrename() { | ||||
| _arguments -s -S : $_hg_global_opts \ | _arguments -s -S : $_hg_global_opts \ | ||||
| ':patch:_hg_qunapplied' \ | ':patch:_hg_qunapplied' \ | ||||
| ':destination:' | ':destination:' | ||||
| '--in-reply-to=[message identifier to reply to]:msgid' \ | '--in-reply-to=[message identifier to reply to]:msgid' \ | ||||
| '*--flag=[flags to add in subject prefixes]:flag' \ | '*--flag=[flags to add in subject prefixes]:flag' \ | ||||
| '*'{-t+,--to=}'[email addresses of recipients]:email' \ | '*'{-t+,--to=}'[email addresses of recipients]:email' \ | ||||
| ':revision:_hg_revrange' | ':revision:_hg_revrange' | ||||
| } | } | ||||
| # Rebase | # Rebase | ||||
| _hg_cmd_rebase() { | _hg_cmd_rebase() { | ||||
| _arguments -s -S : $_hg_global_opts $_hg_commit_opts $_hg_mergetool_opts \ | _arguments -s -S : $_hg_global_opts $_hg_commit_opts $_hg_mergetool_opts $_hg_dryrun_opts \ | ||||
| '*'{-r+,--rev=}'[rebase these revisions]:revision:_hg_revrange' \ | '*'{-r+,--rev=}'[rebase these revisions]:revision:_hg_revrange' \ | ||||
| '(--source -s --base -b)'{-s+,--source=}'[rebase the specified changeset and descendants]:revision:_hg_labels' \ | '(--source -s --base -b)'{-s+,--source=}'[rebase the specified changeset and descendants]:revision:_hg_labels' \ | ||||
| '(--source -s --base -b)'{-b+,--base=}'[rebase everything from branching point of specified changeset]:revision:_hg_labels' \ | '(--source -s --base -b)'{-b+,--base=}'[rebase everything from branching point of specified changeset]:revision:_hg_labels' \ | ||||
| '(--dest -d)'{-d+,--dest=}'[rebase onto the specified changeset]:revision:_hg_labels' \ | '(--dest -d)'{-d+,--dest=}'[rebase onto the specified changeset]:revision:_hg_labels' \ | ||||
| '--collapse[collapse the rebased changesets]' \ | '--collapse[collapse the rebased changesets]' \ | ||||
| '(--keep -k)'{-k,--keep}'[keep original changesets]' \ | '(--keep -k)'{-k,--keep}'[keep original changesets]' \ | ||||
| '--keepbranches[keep original branch names]' \ | '--keepbranches[keep original branch names]' \ | ||||
| '(--continue -c --abort -a)'{-c,--continue}'[continue an interrupted rebase]' \ | '(--continue -c --abort -a)'{-c,--continue}'[continue an interrupted rebase]' \ | ||||
| '--branchsort[try to sort changesets by branches]' \ | '--branchsort[try to sort changesets by branches]' \ | ||||
| '--datesort[try to sort changesets by date]' \ | '--datesort[try to sort changesets by date]' \ | ||||
| '--sourcesort[preserve source changesets order]' \ | '--sourcesort[preserve source changesets order]' \ | ||||
| '--closesort[try to reorder closed revisions]' | '--closesort[try to reorder closed revisions]' | ||||
| } | } | ||||
| # Purge | # Purge | ||||
| _hg_cmd_purge() { | _hg_cmd_purge() { | ||||
| _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \ | _arguments -s -S : $_hg_global_opts $_hg_pat_opts \ | ||||
| '(--abort-on-err -a)'{-a,--abort-on-err}'[abort if an error occurs]' \ | '(--abort-on-err -a)'{-a,--abort-on-err}'[abort if an error occurs]' \ | ||||
| '--all[purge ignored files too]' \ | '--all[purge ignored files too]' \ | ||||
| '(--print -p)'{-p,--print}'[print filenames instead of deleting them]' \ | '(--print -p)'{-p,--print}'[print filenames instead of deleting them]' \ | ||||
| '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs (implies -p/--print)]' | '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs (implies -p/--print)]' | ||||
| } | } | ||||
| _hg "$@" | _hg "$@" | ||||