--- a/contrib/zsh_completion Fri Aug 10 14:46:56 2018 +0800
+++ b/contrib/zsh_completion Fri Aug 10 23:24:33 2018 +0800
@@ -371,22 +371,24 @@
# Common options
_hg_global_opts=(
- '(--repository -R)'{-R+,--repository=}'[repository root directory]:repository:_files -/'
- '--cwd[change working directory]:new working directory:_files -/'
- '(--noninteractive -y)'{-y,--noninteractive}'[do not prompt, assume yes for any required answers]'
+ '(--repository -R)'{-R+,--repository=}'[repository root directory or name of overlay bundle file]:repository:_files -/'
+ '--cwd=[change working directory]:new working directory:_files -/'
+ '(--noninteractive -y)'{-y,--noninteractive}'[do not prompt, automatically pick the first choice for all prompts]'
'(--verbose -v)'{-v,--verbose}'[enable additional output]'
'*--config[set/override config option]:defined config items:_hg_config'
'(--quiet -q)'{-q,--quiet}'[suppress output]'
'(--help -h)'{-h,--help}'[display help and exit]'
- '--debug[debug mode]'
+ '--debug[enable debugging output]'
'--debugger[start debugger]'
- '--encoding[set the charset encoding]'
- '--encodingmode[set the charset encoding mode]'
- '--lsprof[print improved command execution profile]'
- '--traceback[print traceback on exception]'
+ '--encoding=[set the charset encoding]:encoding'
+ '--encodingmode=[set the charset encoding mode]:encoding mode'
+ '--traceback[always print a traceback on exception]'
'--time[time how long the command takes]'
- '--profile[profile]'
+ '--profile[print command execution profile]'
'--version[output version information and exit]'
+ '--hidden[consider hidden changesets]'
+ '--color=[when to colorize]:when:(true false yes no always auto never debug)'
+ '--pager=[when to paginate (default: auto)]:when:(true false yes no always auto never)'
)
_hg_pat_opts=(
@@ -402,8 +404,8 @@
_hg_date_user_opts=(
'(--currentdate -D)'{-D,--currentdate}'[record the current date as commit date]'
'(--currentuser -U)'{-U,--currentuser}'[record the current user as committer]'
- '(--date -d)'{-d+,--date=}'[record the specified date as commit date]:date:'
- '(--user -u)'{-u+,--user=}'[record the specified user as committer]:user:')
+ '(--date -d)'{-d+,--date=}'[record the specified date as commit date]:date'
+ '(--user -u)'{-u+,--user=}'[record the specified user as committer]:user')
_hg_gitlike_opts=(
'(--git -g)'{-g,--git}'[use git extended diff format]')
@@ -414,7 +416,8 @@
'--nodates[omit dates from diff headers]')
_hg_mergetool_opts=(
- '(--tool -t)'{-t+,--tool=}'[specify merge tool]:tool:')
+ '(--tool -t)'{-t+,--tool=}'[specify merge tool]:merge tool'
+)
_hg_dryrun_opts=(
'(--dry-run -n)'{-n,--dry-run}'[do not perform actions, just print output]')
@@ -422,7 +425,9 @@
_hg_ignore_space_opts=(
'(--ignore-all-space -w)'{-w,--ignore-all-space}'[ignore white space when comparing lines]'
'(--ignore-space-change -b)'{-b,--ignore-space-change}'[ignore changes in the amount of white space]'
- '(--ignore-blank-lines -B)'{-B,--ignore-blank-lines}'[ignore changes whose lines are all blank]')
+ '(--ignore-blank-lines -B)'{-B,--ignore-blank-lines}'[ignore changes whose lines are all blank]'
+ '(--ignore-space-at-eol -Z)'{-Z,--ignore-space-at-eol}'[ignore changes in whitespace at EOL]'
+)
_hg_template_opts=(
'--template[display with template]:template'
@@ -430,20 +435,23 @@
_hg_log_opts=(
$_hg_global_opts $_hg_template_opts $_hg_gitlike_opts
- '(--limit -l)'{-l+,--limit=}'[limit number of changes displayed]:'
+ '(--limit -l)'{-l+,--limit=}'[limit number of changes displayed]:limit'
'(--no-merges -M)'{-M,--no-merges}'[do not show merges]'
'(--patch -p)'{-p,--patch}'[show patch]'
'--stat[output diffstat-style summary of changes]'
+ '(--graph -G)'{-G,--graph}'[show the revision DAG]'
)
_hg_commit_opts=(
'(-m --message -l --logfile --edit -e)'{-e,--edit}'[edit commit message]'
- '(-e --edit -l --logfile --message -m)'{-m+,--message=}'[use <text> as commit message]:message:'
+ '(-e --edit -l --logfile --message -m)'{-m+,--message=}'[use <text> as commit message]:message'
'(-e --edit -m --message --logfile -l)'{-l+,--logfile=}'[read the commit message from <file>]:log file:_files')
_hg_remote_opts=(
- '(--ssh -e)'{-e+,--ssh=}'[specify ssh command to use]:'
- '--remotecmd[specify hg command to run on the remote side]:')
+ '(--ssh -e)'{-e+,--ssh=}'[specify ssh command to use]:command'
+ '--remotecmd=[specify hg command to run on the remote side]:remote command'
+ '--insecure[do not verify server certificate (ignoring web.cacerts config)]'
+)
_hg_branch_bmark_opts=(
'(--bookmark -B)'{-B+,--bookmark=}'[specify bookmark(s)]:bookmark:_hg_bookmarks'
@@ -464,26 +472,28 @@
_hg_cmd_addremove() {
_arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \
- '(--similarity -s)'{-s+,--similarity=}'[guess renamed files by similarity (0<=s<=100)]:' \
+ '(--similarity -s)'{-s+,--similarity=}'[guess renamed files by similarity (0<=s<=100)]:similarity' \
'*:unknown or missing files:_hg_addremove'
}
_hg_cmd_annotate() {
- _arguments -s -S : $_hg_global_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' \
- '(--follow -f)'{-f,--follow}'[follow file copies and renames]' \
+ "--no-follow[don't follow copies and renames]" \
'(--text -a)'{-a,--text}'[treat all files as text]' \
- '(--user -u)'{-u,--user}'[list the author]' \
- '(--date -d)'{-d,--date}'[list the date]' \
+ '(--user -u)'{-u,--user}'[list the author (long with -v)]' \
+ '(--file -f)'{-f,--file}'[list the filename]' \
+ '(--date -d)'{-d,--date}'[list the date (short with -q)]' \
'(--number -n)'{-n,--number}'[list the revision number (default)]' \
'(--changeset -c)'{-c,--changeset}'[list the changeset]' \
+ '(--line-number -l)'{-l,--line-number}'[show line number at the first appearance]' \
'*:files:_hg_files'
}
_hg_cmd_archive() {
_arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \
'--no-decode[do not pass files through decoders]' \
- '(--prefix -p)'{-p+,--prefix=}'[directory prefix for files in archive]:' \
+ '(--prefix -p)'{-p+,--prefix=}'[directory prefix for files in archive]:prefix' \
'(--rev -r)'{-r+,--rev=}'[revision to distribute]:revision:_hg_labels' \
'(--type -t)'{-t+,--type=}'[type of distribution to create]:archive type:(files tar tbz2 tgz uzip zip)' \
'*:destination:_files'
@@ -492,12 +502,13 @@
_hg_cmd_backout() {
_arguments -s -S : $_hg_global_opts $_hg_mergetool_opts $_hg_pat_opts \
'--merge[merge with old dirstate parent after backout]' \
- '(--date -d)'{-d+,--date=}'[record datecode as commit date]:date code:' \
+ '(--date -d)'{-d+,--date=}'[record the specified date as commit date]:date' \
'--parent[parent to choose when backing out merge]' \
- '(--user -u)'{-u+,--user=}'[record user as commiter]:user:' \
- '(--rev -r)'{-r+,--rev=}'[revision]:revision:_hg_labels' \
- '(--message -m)'{-m+,--message=}'[use <text> as commit message]:text:' \
- '(--logfile -l)'{-l+,--logfile=}'[read commit message from <file>]:log file:_files'
+ '(--user -u)'{-u+,--user=}'[record the specified user as committer]:user' \
+ '(--rev -r 1)'{-r+,--rev=}'[revision to backout]:revision:_hg_labels' \
+ '(--message -m)'{-m+,--message=}'[use <text> as commit message]:text' \
+ '(--logfile -l)'{-l+,--logfile=}'[read commit message from <file>]:log file:_files' \
+ ':revision:_hg_labels'
}
_hg_cmd_bisect() {
@@ -529,24 +540,24 @@
_hg_cmd_branches() {
_arguments -s -S : $_hg_global_opts \
- '(--active -a)'{-a,--active}'[show only branches that have unmerge heads]' \
'(--closed -c)'{-c,--closed}'[show normal and closed branches]'
}
_hg_cmd_bundle() {
_arguments -s -S : $_hg_global_opts $_hg_remote_opts \
- '(--force -f)'{-f,--force}'[run even when remote repository is unrelated]' \
- '(2)*--base[a base changeset to specify instead of a destination]:revision:_hg_labels' \
- '(--branch -b)'{-b+,--branch=}'[a specific branch to bundle]:' \
- '(--rev -r)'{-r+,--rev=}'[changeset(s) to bundle]:' \
+ '(--force -f)'{-f,--force}'[run even when the destination is unrelated]' \
+ '(2)*--base[a base changeset assumed to be available at the destination]:revision:_hg_labels' \
+ '*'{-b+,--branch=}'[a specific branch you would like to bundle]:branch:_hg_branches' \
+ '*'{-r+,--rev=}'[a changeset intended to be added to the destination]:revision:_hg_labels' \
'--all[bundle all changesets in the repository]' \
+ '--type[bundle compression type to use (default: bzip2)]:bundle type' \
':output file:_files' \
':destination repository:_files -/'
}
_hg_cmd_cat() {
_arguments -s -S : $_hg_global_opts $_hg_pat_opts \
- '(--output -o)'{-o+,--output=}'[print output to file with formatted name]:filespec:' \
+ '(--output -o)'{-o+,--output=}'[print output to file with formatted name]:format string' \
'(--rev -r)'{-r+,--rev=}'[revision]:revision:_hg_labels' \
'--decode[apply any matching decode filter]' \
'*:file:_hg_files'
@@ -554,9 +565,9 @@
_hg_cmd_clone() {
_arguments -s -S : $_hg_global_opts $_hg_clone_opts \
- '(--rev -r)'{-r+,--rev=}'[a changeset you would like to have after cloning]:' \
- '(--updaterev -u)'{-u+,--updaterev=}'[revision, tag or branch to check out]:' \
- '(--branch -b)'{-b+,--branch=}'[clone only the specified branch]:' \
+ '*'{-r+,--rev=}'[do not clone everything, but include this changeset and its ancestors]:revision' \
+ '(--updaterev -u)'{-u+,--updaterev=}'[revision, tag or branch to check out]:revision' \
+ '*'{-b+,--branch=}"[do not clone everything, but include this branch's changesets and their ancestors]:branch" \
':source repository:_hg_remote' \
':destination:_hg_clone_dest'
}
@@ -564,12 +575,14 @@
_hg_cmd_commit() {
_arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \
'(--addremove -A)'{-A,--addremove}'[mark new/missing files as added/removed before committing]' \
- '(--message -m)'{-m+,--message=}'[use <text> as commit message]:text:' \
+ '(--message -m)'{-m+,--message=}'[use <text> as commit message]:text' \
'(--logfile -l)'{-l+,--logfile=}'[read commit message from <file>]:log file:_files' \
- '(--date -d)'{-d+,--date=}'[record datecode as commit date]:date code:' \
- '(--user -u)'{-u+,--user=}'[record user as commiter]:user:' \
- '--amend[amend the parent of the working dir]' \
- '--close-branch[mark a branch as closed]' \
+ '(--date -d)'{-d+,--date=}'[record the specified date as commit date]:date' \
+ '(--user -u)'{-u+,--user=}'[record the specified user as committer]:user' \
+ '--amend[amend the parent of the working directory]' \
+ '--close-branch[mark a branch head as closed]' \
+ '(--interactive -i)'{-i,--interactive}'[use interactive mode]' \
+ '(--secret -s)'{-s,--secret}'[use the secret phase for committing]' \
'*:file:_hg_committable'
}
@@ -587,12 +600,14 @@
_arguments -s -S : $_hg_global_opts $_hg_diff_opts $_hg_ignore_space_opts \
$_hg_pat_opts $_hg_subrepos_opts \
'*'{-r+,--rev=}'[revision]:revision:_hg_revrange' \
+ '--noprefix[omit a/ and b/ prefixes from filenames]' \
'(--show-function -p)'{-p,--show-function}'[show which function each change is in]' \
- '(--change -c)'{-c+,--change=}'[change made by revision]:' \
+ '(--change -c)'{-c+,--change=}'[change made by revision]:revision:_hg_labels' \
'(--text -a)'{-a,--text}'[treat all files as text]' \
'--reverse[produce a diff that undoes the changes]' \
- '(--unified -U)'{-U+,--unified=}'[number of lines of context to show]:' \
+ '(--unified -U)'{-U+,--unified=}'[number of lines of context to show]:count' \
'--stat[output diffstat-style summary of changes]' \
+ '--root=[produce diffs relative to subdirectory]:directory:_files -/' \
'*:file:->diff_files' && ret=0
if [[ $state == 'diff_files' ]]
@@ -610,21 +625,24 @@
_hg_cmd_export() {
_arguments -s -S : $_hg_global_opts $_hg_diff_opts \
- '(--outout -o)'{-o+,--output=}'[print output to file with formatted name]:filespec:' \
+ '(--output -o)'{-o+,--output=}'[print output to file with formatted name]:format string' \
'--switch-parent[diff against the second parent]' \
- '(--rev -r)'{-r+,--rev=}'[revision]:revision:_hg_labels' \
+ '*'{-r+,--rev=}'[revisions to export]:revision:_hg_labels' \
'*:revision:_hg_labels'
}
_hg_cmd_forget() {
- _arguments -s -S : $_hg_global_opts \
+ _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \
+ '(--interactive -i)'{-i,--interactive}'[use interactive mode]' \
'*:file:_hg_files'
}
_hg_cmd_graft() {
_arguments -s -S : $_hg_global_opts $_hg_dryrun_opts \
$_hg_date_user_opts $_hg_mergetool_opts \
- '(--continue -c)'{-c,--continue}'[resume interrupted graft]' \
+ '*'{-r+,--rev=}'[revisions to graft]:revision:_hg_labels' \
+ '(--continue -c --abort -a)'{-c,--continue}'[resume interrupted graft]' \
+ '(--continue -c --abort -a)'{-a,--abort}'[abort interrupted graft]' \
'(--edit -e)'{-e,--edit}'[invoke editor on commit messages]' \
'--log[append graft info to log message]' \
'*:revision:_hg_labels'
@@ -656,7 +674,7 @@
_arguments -s -S : $_hg_global_opts \
'(--extension -e)'{-e,--extension}'[show only help for extensions]' \
'(--command -c)'{-c,--command}'[show only help for commands]' \
- '(--keyword -k)'{-k+,--keyword}'[show topics matching keyword]' \
+ '(--keyword -k)'{-k,--keyword}'[show topics matching keyword]' \
'*:mercurial help topic:_hg_help_topics'
}
@@ -666,22 +684,22 @@
'(--num -n)'{-n,--num}'[show local revision number]' \
'(--id -i)'{-i,--id}'[show global revision id]' \
'(--branch -b)'{-b,--branch}'[show branch]' \
- '(--bookmark -B)'{-B,--bookmark}'[show bookmarks]' \
+ '(--bookmarks -B)'{-B,--bookmarks}'[show bookmarks]' \
'(--tags -t)'{-t,--tags}'[show tags]'
}
_hg_cmd_import() {
_arguments -s -S : $_hg_global_opts $_hg_commit_opts \
- '(--strip -p)'{-p+,--strip=}'[directory strip option for patch (default: 1)]:count:' \
+ '(--strip -p)'{-p+,--strip=}'[directory strip option for patch (default: 1)]:count' \
'(--force -f)'{-f,--force}'[skip check for outstanding uncommitted changes]' \
'--bypass[apply patch without touching the working directory]' \
'--no-commit[do not commit, just update the working directory]' \
'--partial[commit even if some hunks fail]' \
- '--exact[apply patch to the nodes from which it was generated]' \
+ '--exact[abort if patch would apply lossily]' \
'--import-branch[use any branch information in patch (implied by --exact)]' \
- '(--date -d)'{-d+,--date=}'[record datecode as commit date]:date code:' \
- '(--user -u)'{-u+,--user=}'[record user as commiter]:user:' \
- '(--similarity -s)'{-s+,--similarity=}'[guess renamed files by similarity (0<=s<=100)]:' \
+ '(--date -d)'{-d+,--date=}'[record the specified date as commit date]:date' \
+ '(--user -u)'{-u+,--user=}'[record the specified user as committer]:user' \
+ '(--similarity -s)'{-s+,--similarity=}'[guess renamed files by similarity (0<=s<=100)]:similarity' \
'*:patch:_files'
}
@@ -689,7 +707,7 @@
_arguments -s -S : $_hg_log_opts $_hg_branch_bmark_opts $_hg_remote_opts \
$_hg_subrepos_opts \
'(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \
- '(--rev -r)'{-r+,--rev=}'[a specific revision up to which you would like to pull]:revision:_hg_labels' \
+ '*'{-r+,--rev=}'[a remote changeset intended to be added]:revision:_hg_labels' \
'(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \
'--bundle[file to store the bundles into]:bundle file:_files' \
':source:_hg_remote'
@@ -704,7 +722,7 @@
_arguments -s -S : $_hg_global_opts $_hg_pat_opts \
'(--rev -r)'{-r+,--rev=}'[search repository as it stood at revision]:revision:_hg_labels' \
'(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \
- '(--fullpath -f)'{-f,--fullpath}'[print complete paths]' \
+ '(--fullpath -f)'{-f,--fullpath}'[print complete paths from the filesystem root]' \
'*:search pattern:_hg_files'
}
@@ -713,14 +731,13 @@
'(--follow --follow-first -f)'{-f,--follow}'[follow changeset or history]' \
'(-f --follow)--follow-first[only follow the first parent of merge changesets]' \
'(--copies -C)'{-C,--copies}'[show copied files]' \
- '(--keyword -k)'{-k+,--keyword}'[search for a keyword]:' \
+ '*'{-k+,--keyword=}'[search for a keyword]:keyword' \
'*'{-r+,--rev=}'[show the specified revision or revset]:revision:_hg_revrange' \
'(--only-merges -m)'{-m,--only-merges}'[show only merges]' \
- '(--prune -P)'{-P+,--prune=}'[do not display revision or any of its ancestors]:revision:_hg_labels' \
- '(--graph -G)'{-G,--graph}'[show the revision DAG]' \
- '(--branch -b)'{-b+,--branch=}'[show changesets within the given named branch]:branch:_hg_branches' \
- '(--user -u)'{-u+,--user=}'[revisions committed by user]:user:' \
- '(--date -d)'{-d+,--date=}'[show revisions matching date spec]:date:' \
+ '*'{-P+,--prune=}'[do not display revision or any of its ancestors]:revision:_hg_labels' \
+ '*'{-b+,--branch=}'[show changesets within the given named branch]:branch:_hg_branches' \
+ '*'{-u+,--user=}'[revisions committed by user]:user' \
+ '(--date -d)'{-d+,--date=}'[show revisions matching date spec]:date' \
'*:files:_hg_files'
}
@@ -742,8 +759,8 @@
_hg_cmd_outgoing() {
_arguments -s -S : $_hg_log_opts $_hg_branch_bmark_opts $_hg_remote_opts \
$_hg_subrepos_opts \
- '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \
- '*'{-r+,--rev=}'[a specific revision you would like to push]:revision:_hg_revrange' \
+ '(--force -f)'{-f,--force}'[run even when the destination is unrelated]' \
+ '*'{-r+,--rev=}'[a changeset intended to be included in the destination]:revision:_hg_revrange' \
'(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \
':destination:_hg_remote'
}
@@ -761,34 +778,34 @@
_hg_cmd_phase() {
_arguments -s -S : $_hg_global_opts \
- '(--public -p)'{-p,--public}'[set changeset phase to public]' \
- '(--draft -d)'{-d,--draft}'[set changeset phase to draft]' \
- '(--secret -s)'{-s,--secret}'[set changeset phase to secret]' \
+ '(--public -p --draft -d --secret -s)'{-p,--public}'[set changeset phase to public]' \
+ '(--public -p --draft -d --secret -s)'{-d,--draft}'[set changeset phase to draft]' \
+ '(--public -p --draft -d --secret -s)'{-s,--secret}'[set changeset phase to secret]' \
'(--force -f)'{-f,--force}'[allow to move boundary backward]' \
- '(--rev -r)'{-r+,--rev=}'[target revision]:revision:_hg_labels' \
- ':revision:_hg_labels'
+ '*'{-r+,--rev=}'[target revision]:revision:_hg_labels' \
+ '*:revision:_hg_labels'
}
_hg_cmd_pull() {
_arguments -s -S : $_hg_global_opts $_hg_branch_bmark_opts $_hg_remote_opts \
'(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \
- '(--update -u)'{-u,--update}'[update to new tip if changesets were pulled]' \
- '(--rev -r)'{-r+,--rev}'[a specific revision up to which you would like to pull]:revision:' \
+ '(--update -u)'{-u,--update}'[update to new branch head if new descendants were pulled]' \
+ '*'{-r+,--rev=}'[a remote changeset intended to be added]:revision:_hg_labels' \
':source:_hg_remote'
}
_hg_cmd_push() {
_arguments -s -S : $_hg_global_opts $_hg_branch_bmark_opts $_hg_remote_opts \
'(--force -f)'{-f,--force}'[force push]' \
- '(--rev -r)'{-r+,--rev=}'[a specific revision you would like to push]:revision:_hg_labels' \
+ '*'{-r+,--rev=}'[a changeset intended to be included in the destination]:revision:_hg_labels' \
'--new-branch[allow pushing a new branch]' \
':destination:_hg_remote'
}
_hg_cmd_remove() {
- _arguments -s -S : $_hg_global_opts $_hg_pat_opts \
- '(--after -A)'{-A,--after}'[record remove that has already occurred]' \
- '(--force -f)'{-f,--force}'[remove file even if modified]' \
+ _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \
+ '(--after -A)'{-A,--after}'[record delete for missing files]' \
+ '(--force -f)'{-f,--force}'[forget added files, delete modified files]' \
'*:file:_hg_files'
}
@@ -808,7 +825,7 @@
'(--no-status -n)'{-n,--no-status}'[hide status prefix]' \
'(--list -l --mark -m --unmark -u)'{-l,--list}'[list state of files needing merge]:*:merged files:->resolve_files' \
'(--mark -m --list -l --unmark -u)'{-m,--mark}'[mark files as resolved]:*:unresolved files:_hg_unresolved' \
- '(--unmark -u --list -l --mark -m)'{-u,--unmark}'[unmark files as resolved]:*:resolved files:_hg_resolved' \
+ '(--unmark -u --list -l --mark -m)'{-u,--unmark}'[mark files as unresolved]:*:resolved files:_hg_resolved' \
'*:file:_hg_unresolved' && ret=0
if [[ $state == 'resolve_files' ]]
@@ -828,7 +845,8 @@
'(--all -a :)'{-a,--all}'[revert all changes when no arguments given]' \
'(--rev -r)'{-r+,--rev=}'[revision to revert to]:revision:_hg_labels' \
'(--no-backup -C)'{-C,--no-backup}'[do not save backup copies of files]' \
- '(--date -d)'{-d+,--date=}'[tipmost revision matching date]:date code:' \
+ '(--date -d)'{-d+,--date=}'[tipmost revision matching date]:date' \
+ '(--interactive -i)'{-i,--interactive}'[interactively select the changes]' \
'*:file:->revert_files' && ret=0
if [[ $state == 'revert_files' ]]
@@ -853,27 +871,31 @@
_hg_cmd_serve() {
_arguments -s -S : $_hg_global_opts \
- '(--accesslog -A)'{-A+,--accesslog=}'[name of access log file]:log file:_files' \
- '(--errorlog -E)'{-E+,--errorlog=}'[name of error log file]: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' \
'(--daemon -d)'{-d,--daemon}'[run server in background]' \
- '(--port -p)'{-p+,--port=}'[listen port]:listen port:' \
- '(--address -a)'{-a+,--address=}'[interface address]:interface address:' \
- '--prefix[prefix path to serve from]:directory:_files' \
- '(--name -n)'{-n+,--name=}'[name to show in web pages]:repository name:' \
- '--web-conf[name of the hgweb config file]:webconf_file:_files' \
- '--pid-file[name of file to write process ID to]:pid_file:_files' \
- '--cmdserver[cmdserver mode]:mode:' \
- '(--templates -t)'{-t,--templates}'[web template directory]:template dir:_files -/' \
- '--style[web template style]:style' \
+ '(--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' \
+ '--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' \
+ '--web-conf=[name of the hgweb config file]:config file:_files' \
+ '--pid-file=[name of file to write process ID to]:pid file:_files' \
+ '--cmdserver[for remote clients]' \
+ '(--templates -t)'{-t+,--templates=}'[web template directory]:template dir:_files -/' \
+ '--style=[template style to use]:style' \
'--stdio[for remote clients]' \
- '--certificate[certificate file]:cert_file:_files' \
- '(--ipv6 -6)'{-6,--ipv6}'[use IPv6 in addition to IPv4]'
+ '(--ipv6 -6)'{-6,--ipv6}'[use IPv6 in addition to IPv4]' \
+ '--certificate=[SSL certificate file]:certificate file:_files' \
+ '--print-url[start and print only the URL]'
}
_hg_cmd_showconfig() {
_arguments -s -S : $_hg_global_opts \
'(--untrusted -u)'{-u,--untrusted}'[show untrusted configuration options]' \
- ':config item:_hg_config'
+ '(--edit -e)'{-e,--edit}'[edit user config]' \
+ '(--local -l --global -g)'{-l,--local}'[edit repository config]' \
+ '(--local -l --global -g)'{-g,--global}'[edit global config]' \
+ '*:config item:_hg_config'
}
_hg_cmd_status() {
@@ -884,13 +906,13 @@
'(--removed -r)'{-r,--removed}'[show only removed files]' \
'(--deleted -d)'{-d,--deleted}'[show only deleted (but tracked) files]' \
'(--clean -c)'{-c,--clean}'[show only files without changes]' \
- '(--unknown -u)'{-u,--unknown}'[show only unknown files]' \
+ '(--unknown -u)'{-u,--unknown}'[show only unknown (not tracked) files]' \
'(--ignored -i)'{-i,--ignored}'[show ignored files]' \
'(--no-status -n)'{-n,--no-status}'[hide status prefix]' \
'(--copies -C)'{-C,--copies}'[show source of copied files]' \
'(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \
- '--rev[show difference from revision]:revision:_hg_labels' \
- '--change[list the changed files of a revision]:revision:_hg_labels' \
+ '*--rev=[show difference from revision]:revision:_hg_labels' \
+ '--change=[list the changed files of a revision]:revision:_hg_labels' \
'*:files:_files'
}
@@ -902,9 +924,9 @@
_hg_cmd_tag() {
_arguments -s -S : $_hg_global_opts \
'(--local -l)'{-l,--local}'[make the tag local]' \
- '(--message -m)'{-m+,--message=}'[message for tag commit log entry]:message:' \
- '(--date -d)'{-d+,--date=}'[record datecode as commit date]:date code:' \
- '(--user -u)'{-u+,--user=}'[record user as commiter]:user:' \
+ '(--message -m)'{-m+,--message=}'[message for tag commit log entry]:message' \
+ '(--date -d)'{-d+,--date=}'[record the specified date as commit date]:date' \
+ '(--user -u)'{-u+,--user=}'[record the specified user as committer]:user' \
'(--rev -r)'{-r+,--rev=}'[revision to tag]:revision:_hg_labels' \
'(--force -f)'{-f,--force}'[force tag]' \
'--remove[remove a tag]' \
@@ -920,15 +942,16 @@
_hg_cmd_unbundle() {
_arguments -s -S : $_hg_global_opts \
'(--update -u)'{-u,--update}'[update to new tip if changesets were unbundled]' \
- ':files:_files'
+ '*:files:_files'
}
_hg_cmd_update() {
- _arguments -s -S : $_hg_global_opts \
- '(--clean -C)'{-C,--clean}'[overwrite locally modified files]' \
- '(--rev -r)'{-r+,--rev=}'[revision]:revision:_hg_labels' \
- '(--check -c)'{-c,--check}'[update across branches if no uncommitted changes]' \
- '(--date -d)'{-d+,--date=}'[tipmost revision matching date]:' \
+ _arguments -s -S : $_hg_global_opts $_hg_mergetool_opts \
+ '(--clean -C)'{-C,--clean}'[discard uncommitted changes (no backup)]' \
+ '(--check -c)'{-c,--check}'[require clean working directory]' \
+ '(--merge -m)'{-m,--merge}'[merge uncommitted changes]' \
+ '(--date -d)'{-d+,--date=}'[tipmost revision matching date]:date' \
+ '(--rev -r 1)'{-r+,--rev=}'[revision]:revision:_hg_labels' \
':revision:_hg_labels'
}
@@ -937,7 +960,7 @@
# HGK
_hg_cmd_view() {
_arguments -s -S : $_hg_global_opts \
- '(--limit -l)'{-l+,--limit=}'[limit number of changes displayed]:' \
+ '(--limit -l)'{-l+,--limit=}'[limit number of changes displayed]:limit' \
':revision range:_hg_labels'
}
@@ -1024,7 +1047,7 @@
_hg_cmd_qfold() {
_arguments -s -S : $_hg_global_opts $_h_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]' \
'--no-backup[do not save backup copies of files]' \
'*:unapplied patch:_hg_qunapplied'
@@ -1053,7 +1076,7 @@
_hg_cmd_qimport() {
_arguments -s -S : $_hg_global_opts $_hg_gitlike_opts \
'(--existing -e)'{-e,--existing}'[import file in patch dir]' \
- '(--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]' \
'*'{-r+,--rev=}'[place existing revisions under mq control]:revision:_hg_revrange' \
'(--push -P)'{-P,--push}'[qpush after importing]' \
@@ -1131,12 +1154,12 @@
_hg_cmd_strip() {
_arguments -s -S : $_hg_global_opts \
- '(--force -f)'{-f,--force}'[force removal, discard uncommitted changes, no backup]' \
- '(--no-backup -n)'{-n,--no-backup}'[no backups]' \
- '(--keep -k)'{-k,--keep}'[do not modify working copy during strip]' \
- '(--bookmark -B)'{-B+,--bookmark=}'[remove revs only reachable from given bookmark]:bookmark:_hg_bookmarks' \
- '(--rev -r)'{-r+,--rev=}'[revision]:revision:_hg_labels' \
- ':revision:_hg_labels'
+ '(--force -f)'{-f,--force}'[force removal of changesets, discard uncommitted changes (no backup)]' \
+ '--no-backup[no backups]' \
+ '(--keep -k)'{-k,--keep}'[do not modify working directory during strip]' \
+ '*'{-B+,--bookmark=}'[remove revs only reachable from given bookmark]:bookmark:_hg_bookmarks' \
+ '*'{-r+,--rev=}'[revision]:revision:_hg_labels' \
+ '*:revision:_hg_labels'
}
# Patchbomb
@@ -1149,23 +1172,23 @@
'--bundlename[name of the bundle attachment file (default: bundle)]:' \
'*'{-r+,--rev=}'[search in given revision range]:revision:_hg_revrange' \
'--force[run even when remote repository is unrelated (with -b/--bundle)]' \
- '*--base[a base changeset to specify instead of a destination (with -b/--bundle)]:revision:_hg_labels' \
+ '*--base=[a base changeset to specify instead of a destination (with -b/--bundle)]:revision:_hg_labels' \
'--intro[send an introduction email for a single patch]' \
'(--inline -i --attach -a)'{-a,--attach}'[send patches as attachments]' \
'(--attach -a --inline -i)'{-i,--inline}'[send patches as inline attachments]' \
- '*--bcc[email addresses of blind carbon copy recipients]:email:' \
- '*'{-c+,--cc}'[email addresses of copy recipients]:email:' \
+ '*--bcc=[email addresses of blind carbon copy recipients]:email' \
+ '*'{-c+,--cc=}'[email addresses of copy recipients]:email' \
'(--diffstat -d)'{-d,--diffstat}'[add diffstat output to messages]' \
- '--date[use the given date as the sending date]:date:' \
- '--desc[use the given file as the series description]:files:_files' \
- '(--from -f)'{-f,--from}'[email address of sender]:email:' \
+ '--date=[use the given date as the sending date]:date' \
+ '--desc=[use the given file as the series description]:files:_files' \
+ '(--from -f)'{-f+,--from=}'[email address of sender]:email' \
'(--test -n)'{-n,--test}'[print messages that would be sent]' \
- '(--mbox -m)'{-m,--mbox}'[write messages to mbox file instead of sending them]:file:' \
- '*--reply-to[email addresses replies should be sent to]:email:' \
- '(--subject -s)'{-s,--subject}'[subject of first message (intro or single patch)]:subject:' \
- '--in-reply-to[message identifier to reply to]:msgid:' \
- '*--flag[flags to add in subject prefixes]:flag:' \
- '*'{-t,--to}'[email addresses of recipients]:email:' \
+ '(--mbox -m)'{-m+,--mbox=}'[write messages to mbox file instead of sending them]:file:_files' \
+ '*--reply-to=[email addresses replies should be sent to]:email' \
+ '(--subject -s)'{-s+,--subject=}'[subject of first message (intro or single patch)]:subject' \
+ '--in-reply-to=[message identifier to reply to]:msgid' \
+ '*--flag=[flags to add in subject prefixes]:flag' \
+ '*'{-t+,--to=}'[email addresses of recipients]:email' \
':revision:_hg_revrange'
}
@@ -1173,14 +1196,14 @@
_hg_cmd_rebase() {
_arguments -s -S : $_hg_global_opts $_hg_commit_opts $_hg_mergetool_opts \
'*'{-r+,--rev=}'[rebase these revisions]:revision:_hg_revrange' \
- '(--source -s)'{-s+,--source=}'[rebase from the specified changeset]:revision:_hg_labels' \
- '(--base -b)'{-b+,--base=}'[rebase from the base of the specified changeset]: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' \
'(--dest -d)'{-d+,--dest=}'[rebase onto the specified changeset]:revision:_hg_labels' \
- '--collapse[collapse the rebased changeset]' \
- '--keep[keep original changeset]' \
- '--keepbranches[keep original branch name]' \
- '(--continue -c)'{-c,--continue}'[continue an interrupted rebase]' \
- '(--abort -a)'{-a,--abort}'[abort an interrupted rebase]' \
+ '--collapse[collapse the rebased changesets]' \
+ '(--keep -k)'{-k,--keep}'[keep original changesets]' \
+ '--keepbranches[keep original branch names]' \
+ '(--continue -c --abort -a)'{-c,--continue}'[continue an interrupted rebase]' \
+ '(--continue -c --abort -a)'{-a,--abort}'[abort an interrupted rebase]' \
}
# Record
@@ -1190,8 +1213,8 @@
'(--addremove -A)'{-A,--addremove}'[mark new/missing files as added/removed before committing]' \
'--close-branch[mark a branch as closed, hiding it from the branch list]' \
'--amend[amend the parent of the working dir]' \
- '(--date -d)'{-d+,--date=}'[record the specified date as commit date]:date:' \
- '(--user -u)'{-u+,--user=}'[record the specified user as committer]:user:'
+ '(--date -d)'{-d+,--date=}'[record the specified date as commit date]:date' \
+ '(--user -u)'{-u+,--user=}'[record the specified user as committer]:user'
}
_hg_cmd_qrecord() {
@@ -1202,16 +1225,18 @@
# Convert
_hg_cmd_convert() {
_arguments -s -S : $_hg_global_opts \
- '(--source-type -s)'{-s,--source-type}'[source repository type]' \
- '(--dest-type -d)'{-d,--dest-type}'[destination repository type]' \
- '(--rev -r)'{-r+,--rev=}'[import up to target revision]:revision:' \
+ '(--source-type -s)'{-s+,--source-type=}'[source repository type]:type:(hg cvs darcs git svn mtn gnuarch bzr p4)' \
+ '(--dest-type -d)'{-d+,--dest-type=}'[destination repository type]:type:(hg svn)' \
+ '*'{-r+,--rev=}'[import up to target revision]:revision' \
'(--authormap -A)'{-A+,--authormap=}'[remap usernames using this file]:file:_files' \
- '--filemap[remap file names using contents of file]:file:_files' \
- '--splicemap[splice synthesized history into place]:file:_files' \
- '--branchmap[change branch names while converting]:file:_files' \
+ '--filemap=[remap file names using contents of file]:file:_files' \
+ '--full[apply filemap changes by converting all files again]' \
+ '--splicemap=[splice synthesized history into place]:file:_files' \
+ '--branchmap=[change branch names while converting]:file:_files' \
'--branchsort[try to sort changesets by branches]' \
'--datesort[try to sort changesets by date]' \
- '--sourcesort[preserve source changesets order]'
+ '--sourcesort[preserve source changesets order]' \
+ '--closesort[try to reorder closed revisions]'
}
# Purge