##// END OF EJS Templates
narrow: when writing treemanifests, skip inspecting directories outside narrow...
narrow: when writing treemanifests, skip inspecting directories outside narrow This provides significant speed benefits when narrow and treemanifests are in use, see the timing numbers below. Note that like previously, differences of <5% are considered noise. The below timing numbers are in the same style as previously (example: ee7ee0c516ca). 'before' is 9db85644, and does not include that example commit's improvements. diff --git: repo | N | T | before (mean +- stdev) | after (mean +- stdev) | % of before ------+---+---+------------------------+-----------------------+------------ m-u | | | 1.327 s +- 0.051 s | 1.296 s +- 0.009 s | 97.7% m-u | | x | 1.310 s +- 0.020 s | 1.295 s +- 0.015 s | 98.9% m-u | x | | 1.295 s +- 0.018 s | 1.296 s +- 0.007 s | 100.1% m-u | x | x | 83.5 ms +- 0.8 ms | 84.1 ms +- 0.8 ms | 100.7% l-d-r | | | 205.1 ms +- 3.5 ms | 205.0 ms +- 3.8 ms | 100.0% l-d-r | | x | 194.2 ms +- 5.6 ms | 192.3 ms +- 4.3 ms | 99.0% l-d-r | x | | 99.1 ms +- 2.2 ms | 97.8 ms +- 0.9 ms | 98.7% l-d-r | x | x | 66.2 ms +- 1.0 ms | 67.2 ms +- 2.7 ms | 101.5% diff -c . --git: repo | N | T | before (mean +- stdev) | after (mean +- stdev) | % of before ------+---+---+------------------------+-----------------------+------------ m-u | | | 233.9 ms +- 1.9 ms | 235.6 ms +- 5.1 ms | 100.7% m-u | | x | 151.4 ms +- 1.2 ms | 152.2 ms +- 2.0 ms | 100.5% m-u | x | | 234.8 ms +- 2.7 ms | 235.0 ms +- 2.7 ms | 100.1% m-u | x | x | 127.8 ms +- 2.1 ms | 126.0 ms +- 1.1 ms | 98.6% l-d-r | | | 82.5 ms +- 1.6 ms | 82.3 ms +- 2.0 ms | 99.8% l-d-r | | x | 3.742 s +- 0.017 s | 3.819 s +- 0.208 s | 102.1% l-d-r | x | | 84.4 ms +- 1.5 ms | 83.2 ms +- 1.0 ms | 98.6% l-d-r | x | x | 751.2 ms +- 5.0 ms | 755.8 ms +- 12.9 ms | 100.6% rebase -r . --keep -d .^^: repo | N | T | before (mean +- stdev) | after (mean +- stdev) | % of before ------+---+---+------------------------+-----------------------+------------ m-u | | | 5.519 s +- 0.038 s | 5.526 s +- 0.057 s | 100.1% m-u | | x | 5.588 s +- 0.048 s | 5.607 s +- 0.061 s | 100.3% m-u | x | | 5.520 s +- 0.044 s | 5.546 s +- 0.059 s | 100.5% m-u | x | x | 586.6 ms +- 12.8 ms | 554.9 ms +- 21.2 ms | 94.6% <-- l-d-r | | | 629.8 ms +- 5.5 ms | 627.4 ms +- 6.6 ms | 99.6% l-d-r | | x | 6.165 s +- 0.058 s | 6.255 s +- 0.303 s | 101.5% l-d-r | x | | 270.2 ms +- 2.3 ms | 271.4 ms +- 2.7 ms | 100.4% l-d-r | x | x | 4.700 s +- 0.025 s | 1.651 s +- 0.016 s | 35.1% <-- status --change . --copies: repo | N | T | before (mean +- stdev) | after (mean +- stdev) | % of before ------+---+---+------------------------+-----------------------+------------ m-u | | | 215.4 ms +- 2.3 ms | 216.5 ms +- 4.2 ms | 100.5% m-u | | x | 132.9 ms +- 1.2 ms | 132.0 ms +- 1.4 ms | 99.3% m-u | x | | 217.0 ms +- 1.9 ms | 215.4 ms +- 1.9 ms | 99.3% m-u | x | x | 108.6 ms +- 1.0 ms | 108.2 ms +- 1.5 ms | 99.6% l-d-r | | | 80.0 ms +- 1.3 ms | 80.5 ms +- 1.1 ms | 100.6% l-d-r | | x | 3.916 s +- 0.187 s | 3.966 s +- 0.236 s | 101.3% l-d-r | x | | 84.4 ms +- 3.1 ms | 83.9 ms +- 1.1 ms | 99.4% l-d-r | x | x | 758.0 ms +- 8.2 ms | 753.5 ms +- 5.0 ms | 99.4% status --copies: repo | N | T | before (mean +- stdev) | after (mean +- stdev) | % of before ------+---+---+------------------------+-----------------------+------------ m-u | | | 1.905 s +- 0.025 s | 1.910 s +- 0.044 s | 100.3% m-u | | x | 1.892 s +- 0.009 s | 1.895 s +- 0.012 s | 100.2% m-u | x | | 1.891 s +- 0.012 s | 1.902 s +- 0.018 s | 100.6% m-u | x | x | 93.3 ms +- 0.9 ms | 93.4 ms +- 0.8 ms | 100.1% l-d-r | | | 570.7 ms +- 7.8 ms | 571.9 ms +- 18.5 ms | 100.2% l-d-r | | x | 561.5 ms +- 5.2 ms | 562.9 ms +- 6.1 ms | 100.2% l-d-r | x | | 171.7 ms +- 2.6 ms | 171.9 ms +- 1.2 ms | 100.1% l-d-r | x | x | 142.7 ms +- 2.0 ms | 140.3 ms +- 1.0 ms | 98.3% update $rev^; ~/src/hg/hg{hg}/hg update $rev: repo | N | T | before (mean +- stdev) | after (mean +- stdev) | % of before ------+---+---+------------------------+-----------------------+------------ m-u | | | 3.126 s +- 0.016 s | 3.128 s +- 0.015 s | 100.1% m-u | | x | 3.014 s +- 0.068 s | 3.008 s +- 0.031 s | 99.8% m-u | x | | 3.143 s +- 0.037 s | 3.184 s +- 0.086 s | 101.3% m-u | x | x | 308.0 ms +- 1.8 ms | 308.1 ms +- 5.7 ms | 100.0% l-d-r | | | 430.8 ms +- 4.5 ms | 436.4 ms +- 8.7 ms | 101.3% l-d-r | | x | 9.676 s +- 0.127 s | 9.945 s +- 0.272 s | 102.8% l-d-r | x | | 254.2 ms +- 3.3 ms | 255.7 ms +- 3.1 ms | 100.6% l-d-r | x | x | 1.571 s +- 0.030 s | 1.555 s +- 0.014 s | 99.0% Differential Revision: https://phab.mercurial-scm.org/D4606

File last commit:

r39610:a2d17b69 default
r39704:24870f1b default
Show More
zsh_completion
1322 lines | 47.3 KiB | text/plain | TextLexer
Martin Geisler
setup: backout 68964567e406...
r10028 #compdef hg
# Zsh completion script for mercurial. Rename this file to _hg and copy
# it into your zsh function path (/usr/share/zsh/site-functions for
# instance)
#
# If you do not want to install it globally, you can copy it somewhere
# else and add that directory to $fpath. This must be done before
# compinit is called. If the file is copied to ~/.zsh.d, your ~/.zshrc
# file could look like this:
#
# fpath=("$HOME/.zsh.d" $fpath)
# autoload -U compinit
# compinit
#
# Copyright (C) 2005, 2006 Steve Borho <steve@borho.org>
Brendan Cully
zsh completion: patchbomb support
r12168 # Copyright (C) 2006-10 Brendan Cully <brendan@kublai.com>
Martin Geisler
setup: backout 68964567e406...
r10028 #
# Permission is hereby granted, without written agreement and without
# licence or royalty fees, to use, copy, modify, and distribute this
# software and to distribute modified versions of this software for any
# purpose, provided that the above copyright notice and the following
# two paragraphs appear in all copies of this software.
#
# In no event shall the authors be liable to any party for direct,
# indirect, special, incidental, or consequential damages arising out of
# the use of this software and its documentation, even if the authors
# have been advised of the possibility of such damage.
#
# The authors specifically disclaim any warranties, including, but not
# limited to, the implied warranties of merchantability and fitness for
# a particular purpose. The software provided hereunder is on an "as
# is" basis, and the authors have no obligation to provide maintenance,
# support, updates, enhancements, or modifications.
emulate -LR zsh
setopt extendedglob
local curcontext="$curcontext" state line
typeset -A _hg_cmd_globals
_hg() {
local cmd _hg_root
integer i=2
_hg_cmd_globals=()
while (( i < $#words ))
do
case "$words[$i]" in
-R|--repository)
eval _hg_root="$words[$i+1]"
_hg_cmd_globals+=("$words[$i]" "$_hg_root")
(( i += 2 ))
continue
;;
-R*)
_hg_cmd_globals+="$words[$i]"
eval _hg_root="${words[$i]#-R}"
(( i++ ))
continue
;;
--cwd|--config)
# pass along arguments to hg completer
_hg_cmd_globals+=("$words[$i]" "$words[$i+1]")
(( i += 2 ))
continue
;;
-*)
# skip option
(( i++ ))
continue
;;
esac
if [[ -z "$cmd" ]]
then
cmd="$words[$i]"
words[$i]=()
(( CURRENT-- ))
fi
(( i++ ))
done
if [[ -z "$cmd" ]]
then
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts \
Martin Geisler
setup: backout 68964567e406...
r10028 ':mercurial command:_hg_commands'
return
fi
# resolve abbreviations and aliases
if ! (( $+functions[_hg_cmd_${cmd}] ))
then
local cmdexp
(( $#_hg_cmd_list )) || _hg_get_commands
cmdexp=$_hg_cmd_list[(r)${cmd}*]
if [[ $cmdexp == $_hg_cmd_list[(R)${cmd}*] ]]
then
# might be nice to rewrite the command line with the expansion
cmd="$cmdexp"
fi
if [[ -n $_hg_alias_list[$cmd] ]]
then
cmd=$_hg_alias_list[$cmd]
fi
fi
curcontext="${curcontext%:*:*}:hg-${cmd}:"
zstyle -s ":completion:$curcontext:" cache-policy update_policy
if [[ -z "$update_policy" ]]
then
zstyle ":completion:$curcontext:" cache-policy _hg_cache_policy
fi
if (( $+functions[_hg_cmd_${cmd}] ))
then
_hg_cmd_${cmd}
else
# complete unknown commands normally
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts \
Martin Geisler
setup: backout 68964567e406...
r10028 '*:files:_hg_files'
fi
}
_hg_cache_policy() {
typeset -a old
# cache for a minute
old=( "$1"(mm+10) )
(( $#old )) && return 0
return 1
}
_hg_get_commands() {
typeset -ga _hg_cmd_list
typeset -gA _hg_alias_list
local hline cmd cmdalias
av6
zsh_completion: run hg with HGPLAINEXCEPT=alias to list commands...
r39240 _call_program hg HGPLAINEXCEPT=alias hg debugcomplete -v | while read -A hline
Martin Geisler
setup: backout 68964567e406...
r10028 do
cmd=$hline[1]
_hg_cmd_list+=($cmd)
for cmdalias in $hline[2,-1]
do
_hg_cmd_list+=($cmdalias)
_hg_alias_list+=($cmdalias $cmd)
done
done
}
_hg_commands() {
(( $#_hg_cmd_list )) || _hg_get_commands
_describe -t commands 'mercurial command' _hg_cmd_list
}
_hg_revrange() {
compset -P 1 '*:'
Augie Fackler
zsh completion: complete bookmarks where they are accepted...
r13511 _hg_labels "$@"
}
_hg_labels() {
Sean Farley
debugnamecomplete: rename from debuglabelcomplete...
r23762 labels=("${(f)$(_hg_cmd debugnamecomplete)}")
Nikolaj Sjujskij
zsh_completion: make use of `debuglabelcomplete` command...
r18903 (( $#labels )) && _describe -t labels 'labels' labels
Martin Geisler
setup: backout 68964567e406...
r10028 }
Augie Fackler
zsh completion: complete bookmarks where they are accepted...
r13511 _hg_bookmarks() {
typeset -a bookmark bookmarks
_hg_cmd bookmarks | while read -A bookmark
do
if test -z ${bookmark[-1]:#[0-9]*}
then
bookmarks+=($bookmark[-2])
fi
done
(( $#bookmarks )) && _describe -t bookmarks 'bookmarks' bookmarks
}
Ben Hockey
contrib: some support for named branches in zsh_completion (issue2988)...
r15100 _hg_branches() {
typeset -a branches
local branch
_hg_cmd branches | while read branch
do
Johannes Schlatow
zsh_completion: fix issue with overlong branch/tag names
r18419 branches+=(${branch/ #[0-9]#:*})
Ben Hockey
contrib: some support for named branches in zsh_completion (issue2988)...
r15100 done
(( $#branches )) && _describe -t branches 'branches' branches
}
Martin Geisler
setup: backout 68964567e406...
r10028 # likely merge candidates
_hg_mergerevs() {
av6
zsh_completion: use revsets to exclude this rev from suggestions to hg merge...
r39474 typeset -a heads branches
local revset='sort(head() and not ., -rev)'
Martin Geisler
setup: backout 68964567e406...
r10028
av6
zsh_completion: use revsets to exclude this rev from suggestions to hg merge...
r39474 heads=(${(f)"$(_hg_cmd log -r '$revset' --template '{rev}:{branch}\\n')"})
Martin Geisler
setup: backout 68964567e406...
r10028 (( $#heads )) && _describe -t heads 'heads' heads
Johannes Schlatow
zsh_completion: add completion of branch names
r18420
av6
zsh_completion: use revsets to exclude this rev from suggestions to hg merge...
r39474 branches=(${(S)heads/#*:/})
Johannes Schlatow
zsh_completion: add completion of branch names
r18420 (( $#branches )) && _describe -t branches 'branches' branches
Martin Geisler
setup: backout 68964567e406...
r10028 }
_hg_files() {
if [[ -n "$_hg_root" ]]
then
[[ -d "$_hg_root/.hg" ]] || return
case "$_hg_root" in
/*)
_files -W $_hg_root
;;
*)
_files -W $PWD/$_hg_root
;;
esac
else
_files
fi
}
_hg_status() {
[[ -d $PREFIX ]] || PREFIX=$PREFIX:h
status_files=(${(ps:\0:)"$(_hg_cmd status -0n$1 ./$PREFIX)"})
}
_hg_unknown() {
typeset -a status_files
_hg_status u
_wanted files expl 'unknown files' _multi_parts / status_files
}
_hg_missing() {
typeset -a status_files
_hg_status d
_wanted files expl 'missing files' _multi_parts / status_files
}
av6
zsh_completion: complete files from `hg st -mar` for commit and diff...
r39237 _hg_committable() {
Martin Geisler
setup: backout 68964567e406...
r10028 typeset -a status_files
av6
zsh_completion: complete files from `hg st -mar` for commit and diff...
r39237 _hg_status mar
_wanted files expl 'modified, added or removed files' _multi_parts / status_files
Martin Geisler
setup: backout 68964567e406...
r10028 }
_hg_resolve() {
local rstate rpath
[[ -d $PREFIX ]] || PREFIX=$PREFIX:h
_hg_cmd resolve -l ./$PREFIX | while read rstate rpath
do
[[ $rstate == 'R' ]] && resolved_files+=($rpath)
[[ $rstate == 'U' ]] && unresolved_files+=($rpath)
done
}
_hg_resolved() {
typeset -a resolved_files unresolved_files
_hg_resolve
_wanted files expl 'resolved files' _multi_parts / resolved_files
}
_hg_unresolved() {
typeset -a resolved_files unresolved_files
_hg_resolve
_wanted files expl 'unresolved files' _multi_parts / unresolved_files
}
_hg_config() {
typeset -a items
items=(${${(%f)"$(_call_program hg hg showconfig)"}%%\=*})
(( $#items )) && _describe -t config 'config item' items
}
av6
zsh_completion: complete merge tools for -t/--tool...
r39413 _hg_internal_merge_tools=(
\\:dump \\:fail \\:forcedump \\:local \\:merge \\:merge-local \\:merge-other
\\:merge3 \\:other \\:prompt \\:tagmerge \\:union
)
_hg_merge_tools() {
typeset -a external_tools
_describe -t internal_tools 'internal merge tools' _hg_internal_merge_tools
external_tools=(${(f)"$(_hg_cmd showconfig merge-tools | cut -d . -f 2)"})
(( $#external_tools )) && _describe -t external_tools 'external merge tools' external_tools
}
av6
zsh_completion: complete shelve and unshelve...
r39475 _hg_shelves() {
shelves=("${(f)$(_hg_cmd shelve -ql)}")
(( $#shelves )) && _describe -t shelves 'shelves' shelves
}
Martin Geisler
setup: backout 68964567e406...
r10028 _hg_addremove() {
_alternative 'files:unknown files:_hg_unknown' \
'files:missing files:_hg_missing'
}
_hg_ssh_urls() {
if [[ -prefix */ ]]
then
if zstyle -T ":completion:${curcontext}:files" remote-access
then
local host=${PREFIX%%/*}
typeset -a remdirs
compset -p $(( $#host + 1 ))
local rempath=${(M)PREFIX##*/}
local cacheid="hg:${host}-${rempath//\//_}"
cacheid=${cacheid%[-_]}
compset -P '*/'
if _cache_invalid "$cacheid" || ! _retrieve_cache "$cacheid"
then
remdirs=(${${(M)${(f)"$(_call_program files ssh -a -x $host ls -1FL "${(q)rempath}")"}##*/}%/})
_store_cache "$cacheid" remdirs
fi
_describe -t directories 'remote directory' remdirs -S/
else
_message 'remote directory'
fi
else
if compset -P '*@'
then
_hosts -S/
else
_alternative 'hosts:remote host name:_hosts -S/' \
'users:user:_users -S@'
fi
fi
}
_hg_urls() {
if compset -P bundle://
then
_files
elif compset -P ssh://
then
_hg_ssh_urls
elif [[ -prefix *: ]]
then
_urls
else
local expl
compset -S '[^:]*'
_wanted url-schemas expl 'URL schema' compadd -S '' - \
http:// https:// ssh:// bundle://
fi
}
_hg_paths() {
typeset -a paths pnames
_hg_cmd paths | while read -A pnames
do
paths+=($pnames[1])
done
(( $#paths )) && _describe -t path-aliases 'repository alias' paths
}
_hg_remote() {
_alternative 'path-aliases:repository alias:_hg_paths' \
'directories:directory:_files -/' \
'urls:URL:_hg_urls'
}
_hg_clone_dest() {
_alternative 'directories:directory:_files -/' \
'urls:URL:_hg_urls'
}
Nikolaj Sjujskij
zsh completion: complete additional topics for `help`, not commands only
r17396 _hg_add_help_topics=(
config dates diffs environment extensions filesets glossary hgignore hgweb
merge-tools multirevs obsolescence patterns phases revisions revsets
subrepos templating urls
)
_hg_help_topics() {
local topics
(( $#_hg_cmd_list )) || _hg_get_commands
topics=($_hg_cmd_list $_hg_add_help_topics)
_describe -t help_topics 'help topics' topics
}
Martin Geisler
setup: backout 68964567e406...
r10028 # Common options
_hg_global_opts=(
av6
zsh_completion: update all options...
r39241 '(--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]'
Martin Geisler
setup: backout 68964567e406...
r10028 '(--verbose -v)'{-v,--verbose}'[enable additional output]'
av6
zsh_completion: update various arguments, descriptions, metavariables...
r39609 '*--config=[set/override config option]:defined config items:_hg_config'
Martin Geisler
setup: backout 68964567e406...
r10028 '(--quiet -q)'{-q,--quiet}'[suppress output]'
'(--help -h)'{-h,--help}'[display help and exit]'
av6
zsh_completion: update all options...
r39241 '--debug[enable debugging output]'
Martin Geisler
setup: backout 68964567e406...
r10028 '--debugger[start debugger]'
av6
zsh_completion: update all options...
r39241 '--encoding=[set the charset encoding]:encoding'
'--encodingmode=[set the charset encoding mode]:encoding mode'
'--traceback[always print a traceback on exception]'
Martin Geisler
setup: backout 68964567e406...
r10028 '--time[time how long the command takes]'
av6
zsh_completion: update all options...
r39241 '--profile[print command execution profile]'
Martin Geisler
setup: backout 68964567e406...
r10028 '--version[output version information and exit]'
av6
zsh_completion: update all options...
r39241 '--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)'
Martin Geisler
setup: backout 68964567e406...
r10028 )
_hg_pat_opts=(
av6
zsh_completion: update various arguments, descriptions, metavariables...
r39609 '*'{-I+,--include=}'[include names matching the given patterns]:pattern:_files -W $(_hg_cmd root) -/'
'*'{-X+,--exclude=}'[exclude names matching the given patterns]:pattern:_files -W $(_hg_cmd root) -/')
Martin Geisler
setup: backout 68964567e406...
r10028
Nikolaj Sjujskij
zsh completion: add new option groups for options...
r17398 _hg_clone_opts=(
$_hg_remote_opts
'(--noupdate -U)'{-U,--noupdate}'[do not update the new working directory]'
'--pull[use pull protocol to copy metadata]'
'--uncompressed[use uncompressed transfer (fast over LAN)]')
_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]'
av6
zsh_completion: update all options...
r39241 '(--date -d)'{-d+,--date=}'[record the specified date as commit date]:date'
'(--user -u)'{-u+,--user=}'[record the specified user as committer]:user')
Nikolaj Sjujskij
zsh completion: add new option groups for options...
r17398
_hg_gitlike_opts=(
'(--git -g)'{-g,--git}'[use git extended diff format]')
Martin Geisler
setup: backout 68964567e406...
r10028 _hg_diff_opts=(
Nikolaj Sjujskij
zsh completion: add new option groups for options...
r17398 $_hg_gitlike_opts
Martin Geisler
setup: backout 68964567e406...
r10028 '(--text -a)'{-a,--text}'[treat all files as text]'
av6
zsh_completion: add new and remove deprecated flags...
r39610 '--binary[generate binary diffs in git mode (default)]'
'--nodates[omit dates from diff headers]'
)
Nikolaj Sjujskij
zsh completion: add new option groups for options...
r17398
_hg_mergetool_opts=(
av6
zsh_completion: complete merge tools for -t/--tool...
r39413 '(--tool -t)'{-t+,--tool=}'[specify merge tool]:merge tool:_hg_merge_tools'
av6
zsh_completion: update all options...
r39241 )
Martin Geisler
setup: backout 68964567e406...
r10028
_hg_dryrun_opts=(
'(--dry-run -n)'{-n,--dry-run}'[do not perform actions, just print output]')
Nikolaj Sjujskij
zsh completion: add new option groups for options...
r17398 _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]'
av6
zsh_completion: update all options...
r39241 '(--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]'
)
Nikolaj Sjujskij
zsh completion: add new option groups for options...
r17398
av6
zsh_completion: rename _hg_style_opts to _hg_template_opts...
r39235 _hg_template_opts=(
av6
zsh_completion: update various arguments, descriptions, metavariables...
r39609 '(--template -T)'{-T+,--template=}'[display with template]:template'
av6
zsh_completion: rename _hg_style_opts to _hg_template_opts...
r39235 )
Martin Geisler
setup: backout 68964567e406...
r10028
Nikolaj Sjujskij
zsh completion: add new option groups for options...
r17398 _hg_log_opts=(
av6
zsh_completion: rename _hg_style_opts to _hg_template_opts...
r39235 $_hg_global_opts $_hg_template_opts $_hg_gitlike_opts
av6
zsh_completion: update all options...
r39241 '(--limit -l)'{-l+,--limit=}'[limit number of changes displayed]:limit'
Nikolaj Sjujskij
zsh completion: add new option groups for options...
r17398 '(--no-merges -M)'{-M,--no-merges}'[do not show merges]'
'(--patch -p)'{-p,--patch}'[show patch]'
'--stat[output diffstat-style summary of changes]'
av6
zsh_completion: update all options...
r39241 '(--graph -G)'{-G,--graph}'[show the revision DAG]'
Nikolaj Sjujskij
zsh completion: add new option groups for options...
r17398 )
Martin Geisler
setup: backout 68964567e406...
r10028 _hg_commit_opts=(
'(-m --message -l --logfile --edit -e)'{-e,--edit}'[edit commit message]'
av6
zsh_completion: update all options...
r39241 '(-e --edit -l --logfile --message -m)'{-m+,--message=}'[use <text> as commit message]:message'
av6
zsh_completion: update some option usage flags ('+', '=' and ':')...
r30080 '(-e --edit -m --message --logfile -l)'{-l+,--logfile=}'[read the commit message from <file>]:log file:_files')
Martin Geisler
setup: backout 68964567e406...
r10028
_hg_remote_opts=(
av6
zsh_completion: update all options...
r39241 '(--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)]'
)
Martin Geisler
setup: backout 68964567e406...
r10028
Nikolaj Sjujskij
zsh completion: add new option groups for options...
r17398 _hg_branch_bmark_opts=(
av6
zsh_completion: update some option usage flags ('+', '=' and ':')...
r30080 '(--bookmark -B)'{-B+,--bookmark=}'[specify bookmark(s)]:bookmark:_hg_bookmarks'
'(--branch -b)'{-b+,--branch=}'[specify branch(es)]:branch:_hg_branches'
Nikolaj Sjujskij
zsh completion: add new option groups for options...
r17398 )
Nikolaj Sjujskij
zsh completion: add subrepos options for all supporting commands
r17399 _hg_subrepos_opts=(
'(--subrepos -S)'{-S,--subrepos}'[recurse into subrepositories]')
Martin Geisler
setup: backout 68964567e406...
r10028 _hg_cmd() {
Brodie Rao
bash/zsh completion: use HGPLAIN when invoking hg (issue2297)
r11646 _call_program hg HGPLAIN=1 hg "$_hg_cmd_globals[@]" "$@" 2> /dev/null
Martin Geisler
setup: backout 68964567e406...
r10028 }
_hg_cmd_add() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts $_hg_subrepos_opts \
Martin Geisler
setup: backout 68964567e406...
r10028 '*:unknown files:_hg_unknown'
}
_hg_cmd_addremove() {
av6
zsh_completion: adjust usage of common options...
r39382 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts $_hg_subrepos_opts \
av6
zsh_completion: update all options...
r39241 '(--similarity -s)'{-s+,--similarity=}'[guess renamed files by similarity (0<=s<=100)]:similarity' \
Martin Geisler
setup: backout 68964567e406...
r10028 '*:unknown or missing files:_hg_addremove'
}
_hg_cmd_annotate() {
av6
zsh_completion: update all options...
r39241 _arguments -s -S : $_hg_global_opts $_hg_ignore_space_opts $_hg_pat_opts \
av6
zsh_completion: update some option usage flags ('+', '=' and ':')...
r30080 '(--rev -r)'{-r+,--rev=}'[annotate the specified revision]:revision:_hg_labels' \
av6
zsh_completion: update all options...
r39241 "--no-follow[don't follow copies and renames]" \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--text -a)'{-a,--text}'[treat all files as text]' \
av6
zsh_completion: update all options...
r39241 '(--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)]' \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--number -n)'{-n,--number}'[list the revision number (default)]' \
'(--changeset -c)'{-c,--changeset}'[list the changeset]' \
av6
zsh_completion: update all options...
r39241 '(--line-number -l)'{-l,--line-number}'[show line number at the first appearance]' \
Martin Geisler
setup: backout 68964567e406...
r10028 '*:files:_hg_files'
}
_hg_cmd_archive() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \
Martin Geisler
setup: backout 68964567e406...
r10028 '--no-decode[do not pass files through decoders]' \
av6
zsh_completion: update all options...
r39241 '(--prefix -p)'{-p+,--prefix=}'[directory prefix for files in archive]:prefix' \
av6
zsh_completion: update some option usage flags ('+', '=' and ':')...
r30080 '(--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)' \
Martin Geisler
setup: backout 68964567e406...
r10028 '*:destination:_files'
}
_hg_cmd_backout() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_mergetool_opts $_hg_pat_opts \
Martin Geisler
setup: backout 68964567e406...
r10028 '--merge[merge with old dirstate parent after backout]' \
av6
zsh_completion: add new and remove deprecated flags...
r39610 '--no-commit[do not commit]' \
av6
zsh_completion: update all options...
r39241 '(--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 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'
Martin Geisler
setup: backout 68964567e406...
r10028 }
_hg_cmd_bisect() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts \
Martin Geisler
setup: backout 68964567e406...
r10028 '(-)'{-r,--reset}'[reset bisect state]' \
Nikolaj Sjujskij
zsh completion: add new options for existing commands...
r17401 '(--extend -e)'{-e,--extend}'[extend the bisect range]' \
Augie Fackler
zsh completion: complete bookmarks where they are accepted...
r13511 '(--good -g --bad -b --skip -s --reset -r)'{-g,--good}'[mark changeset good]'::revision:_hg_labels \
'(--good -g --bad -b --skip -s --reset -r)'{-b,--bad}'[mark changeset bad]'::revision:_hg_labels \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--good -g --bad -b --skip -s --reset -r)'{-s,--skip}'[skip testing changeset]' \
av6
zsh_completion: update some option usage flags ('+', '=' and ':')...
r30080 '(--command -c --noupdate -U)'{-c+,--command=}'[use command to check changeset state]':commands:_command_names \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--command -c --noupdate -U)'{-U,--noupdate}'[do not update to target]'
}
Augie Fackler
zsh completion: complete bookmarks where they are accepted...
r13511 _hg_cmd_bookmarks() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts \
Augie Fackler
zsh completion: complete bookmarks where they are accepted...
r13511 '(--force -f)'{-f,--force}'[force]' \
Nikolaj Sjujskij
zsh completion: add new options for existing commands...
r17401 '(--inactive -i)'{-i,--inactive}'[mark a bookmark inactive]' \
av6
zsh_completion: update some option usage flags ('+', '=' and ':')...
r30080 '(--rev -r --delete -d --rename -m)'{-r+,--rev=}'[revision]:revision:_hg_labels' \
Augie Fackler
zsh completion: complete bookmarks where they are accepted...
r13511 '(--rev -r --delete -d --rename -m)'{-d,--delete}'[delete a given bookmark]' \
av6
zsh_completion: update some option usage flags ('+', '=' and ':')...
r30080 '(--rev -r --delete -d --rename -m)'{-m+,--rename=}'[rename a given bookmark]:bookmark:_hg_bookmarks' \
Augie Fackler
zsh completion: complete bookmarks where they are accepted...
r13511 ':bookmark:_hg_bookmarks'
}
Martin Geisler
setup: backout 68964567e406...
r10028 _hg_cmd_branch() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--force -f)'{-f,--force}'[set branch name even if it shadows an existing branch]' \
'(--clean -C)'{-C,--clean}'[reset branch name to parent branch name]'
}
_hg_cmd_branches() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts \
Nikolaj Sjujskij
zsh completion: add new options for existing commands...
r17401 '(--closed -c)'{-c,--closed}'[show normal and closed branches]'
Martin Geisler
setup: backout 68964567e406...
r10028 }
_hg_cmd_bundle() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_remote_opts \
av6
zsh_completion: update all options...
r39241 '(--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' \
av6
zsh_completion: update various arguments, descriptions, metavariables...
r39609 '(--all -a)'{-a,--all}'[bundle all changesets in the repository]' \
av6
zsh_completion: update all options...
r39241 '--type[bundle compression type to use (default: bzip2)]:bundle type' \
Martin Geisler
setup: backout 68964567e406...
r10028 ':output file:_files' \
':destination repository:_files -/'
}
_hg_cmd_cat() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_pat_opts \
av6
zsh_completion: update all options...
r39241 '(--output -o)'{-o+,--output=}'[print output to file with formatted name]:format string' \
av6
zsh_completion: update various arguments, descriptions, metavariables...
r39609 '(--rev -r)'{-r+,--rev=}'[print the given revision]:revision:_hg_labels' \
Nikolaj Sjujskij
zsh completion: add new options for existing commands...
r17401 '--decode[apply any matching decode filter]' \
Martin Geisler
setup: backout 68964567e406...
r10028 '*:file:_hg_files'
}
_hg_cmd_clone() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_clone_opts \
av6
zsh_completion: update all options...
r39241 '*'{-r+,--rev=}'[do not clone everything, but include this changeset and its ancestors]:revision' \
av6
zsh_completion: update various arguments, descriptions, metavariables...
r39609 '(--updaterev -u)'{-u+,--updaterev=}'[revision, tag, or branch to check out]:revision' \
av6
zsh_completion: update all options...
r39241 '*'{-b+,--branch=}"[do not clone everything, but include this branch's changesets and their ancestors]:branch" \
Martin Geisler
setup: backout 68964567e406...
r10028 ':source repository:_hg_remote' \
':destination:_hg_clone_dest'
}
_hg_cmd_commit() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--addremove -A)'{-A,--addremove}'[mark new/missing files as added/removed before committing]' \
av6
zsh_completion: update all options...
r39241 '(--message -m)'{-m+,--message=}'[use <text> as commit message]:text' \
av6
zsh_completion: update some option usage flags ('+', '=' and ':')...
r30080 '(--logfile -l)'{-l+,--logfile=}'[read commit message from <file>]:log file:_files' \
av6
zsh_completion: update all options...
r39241 '(--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]' \
av6
zsh_completion: complete files from `hg st -mar` for commit and diff...
r39237 '*:file:_hg_committable'
Martin Geisler
setup: backout 68964567e406...
r10028 }
_hg_cmd_copy() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--after -A)'{-A,--after}'[record a copy that has already occurred]' \
'(--force -f)'{-f,--force}'[forcibly copy over an existing managed file]' \
'*:file:_hg_files'
}
_hg_cmd_diff() {
av6
zsh_completion: declare appropriate local parameters for ->string form...
r39238 local context state state_descr line ret=1
Martin Geisler
setup: backout 68964567e406...
r10028 typeset -A opt_args
av6
zsh_completion: declare appropriate local parameters for ->string form...
r39238
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_diff_opts $_hg_ignore_space_opts \
Nikolaj Sjujskij
zsh completion: add subrepos options for all supporting commands
r17399 $_hg_pat_opts $_hg_subrepos_opts \
av6
zsh_completion: update some option usage flags ('+', '=' and ':')...
r30080 '*'{-r+,--rev=}'[revision]:revision:_hg_revrange' \
av6
zsh_completion: update all options...
r39241 '--noprefix[omit a/ and b/ prefixes from filenames]' \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--show-function -p)'{-p,--show-function}'[show which function each change is in]' \
av6
zsh_completion: update all options...
r39241 '(--change -c)'{-c+,--change=}'[change made by revision]:revision:_hg_labels' \
Nikolaj Sjujskij
zsh completion: add new options for existing commands...
r17401 '--reverse[produce a diff that undoes the changes]' \
av6
zsh_completion: update all options...
r39241 '(--unified -U)'{-U+,--unified=}'[number of lines of context to show]:count' \
Nikolaj Sjujskij
zsh completion: add new options for existing commands...
r17401 '--stat[output diffstat-style summary of changes]' \
av6
zsh_completion: update all options...
r39241 '--root=[produce diffs relative to subdirectory]:directory:_files -/' \
av6
zsh_completion: declare appropriate local parameters for ->string form...
r39238 '*:file:->diff_files' && ret=0
Martin Geisler
setup: backout 68964567e406...
r10028
if [[ $state == 'diff_files' ]]
then
av6
zsh_completion: handle --rev as well as -r for diff and revert...
r39431 if [[ -n ${opt_args[(I)-r|--rev]} ]]
Martin Geisler
setup: backout 68964567e406...
r10028 then
av6
zsh_completion: declare appropriate local parameters for ->string form...
r39238 _hg_files && ret=0
Martin Geisler
setup: backout 68964567e406...
r10028 else
av6
zsh_completion: declare appropriate local parameters for ->string form...
r39238 _hg_committable && ret=0
Martin Geisler
setup: backout 68964567e406...
r10028 fi
fi
av6
zsh_completion: declare appropriate local parameters for ->string form...
r39238
return ret
Martin Geisler
setup: backout 68964567e406...
r10028 }
_hg_cmd_export() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_diff_opts \
av6
zsh_completion: add new and remove deprecated flags...
r39610 '(--bookmark -B)'{-B+,--bookmark=}'[export changes only reachable by given bookmark]:bookmark:_hg_bookmarks' \
av6
zsh_completion: update all options...
r39241 '(--output -o)'{-o+,--output=}'[print output to file with formatted name]:format string' \
Martin Geisler
setup: backout 68964567e406...
r10028 '--switch-parent[diff against the second parent]' \
av6
zsh_completion: update all options...
r39241 '*'{-r+,--rev=}'[revisions to export]:revision:_hg_labels' \
Augie Fackler
zsh completion: complete bookmarks where they are accepted...
r13511 '*:revision:_hg_labels'
Martin Geisler
setup: backout 68964567e406...
r10028 }
av6
zsh_completion: complete hg files...
r39383 _hg_cmd_files() {
_arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \
av6
zsh_completion: update various arguments, descriptions, metavariables...
r39609 '(--rev -r)'{-r+,--rev=}'[search the repository as it is in revision]:revision:_hg_labels' \
av6
zsh_completion: complete hg files...
r39383 '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \
'*:file:_hg_files'
}
Nikolaj Sjujskij
zsh completion: add `forget` and `rollback` commands
r17397 _hg_cmd_forget() {
av6
zsh_completion: update all options...
r39241 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \
'(--interactive -i)'{-i,--interactive}'[use interactive mode]' \
Nikolaj Sjujskij
zsh completion: add `forget` and `rollback` commands
r17397 '*:file:_hg_files'
}
Nikolaj Sjujskij
zsh completion: catch up with 2.2 commands and options...
r17004 _hg_cmd_graft() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_dryrun_opts \
Nikolaj Sjujskij
zsh completion: add new option groups for options...
r17398 $_hg_date_user_opts $_hg_mergetool_opts \
av6
zsh_completion: update all options...
r39241 '*'{-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]' \
Nikolaj Sjujskij
zsh completion: catch up with 2.2 commands and options...
r17004 '(--edit -e)'{-e,--edit}'[invoke editor on commit messages]' \
'--log[append graft info to log message]' \
av6
zsh_completion: add new and remove deprecated flags...
r39610 "--no-commit[don't commit, just apply the changes in working directory]" \
'(--force -f)'{-f,--force}'[force graft]' \
Nikolaj Sjujskij
zsh completion: catch up with 2.2 commands and options...
r17004 '*:revision:_hg_labels'
}
Martin Geisler
setup: backout 68964567e406...
r10028 _hg_cmd_grep() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_pat_opts \
av6
zsh_completion: update various arguments, descriptions, metavariables...
r39609 '(--print0 -0)'{-0,--print0}'[end fields with NUL]' \
av6
zsh_completion: add new and remove deprecated flags...
r39610 '--diff[print all revisions when the term was introduced or removed]' \
'(--text -a)'{-a,--text}'[treat all files as text]' \
av6
zsh_completion: update various arguments, descriptions, metavariables...
r39609 '(--follow -f)'{-f,--follow}'[follow changeset history, or file history across copies and renames]' \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--ignore-case -i)'{-i,--ignore-case}'[ignore case when matching]' \
av6
zsh_completion: update various arguments, descriptions, metavariables...
r39609 '(--files-with-matches -l)'{-l,--files-with-matches}'[print only filenames and revisions that match]' \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--line-number -n)'{-n,--line-number}'[print matching line numbers]' \
av6
zsh_completion: update various arguments, descriptions, metavariables...
r39609 '*'{-r+,--rev=}'[only search files changed within revision range]:revision:_hg_revrange' \
'(--user -u)'{-u,--user}'[list the author (long with -v)]' \
'(--date -d)'{-d,--date}'[list the date (short with -q)]' \
Martin Geisler
setup: backout 68964567e406...
r10028 '1:search pattern:' \
'*:files:_hg_files'
}
_hg_cmd_heads() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_template_opts \
Nikolaj Sjujskij
zsh completion: add new options for existing commands...
r17401 '(--topo -t)'{-t,--topo}'[show topological heads only]' \
'(--closed -c)'{-c,--closed}'[show normal and closed branch heads]' \
av6
zsh_completion: update various arguments, descriptions, metavariables...
r39609 '(--rev -r)'{-r+,--rev=}'[show only heads which are descendants of revision]:revision:_hg_labels'
Martin Geisler
setup: backout 68964567e406...
r10028 }
_hg_cmd_help() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts \
Nikolaj Sjujskij
zsh completion: add new options for existing commands...
r17401 '(--extension -e)'{-e,--extension}'[show only help for extensions]' \
'(--command -c)'{-c,--command}'[show only help for commands]' \
av6
zsh_completion: update all options...
r39241 '(--keyword -k)'{-k,--keyword}'[show topics matching keyword]' \
av6
zsh_completion: add new and remove deprecated flags...
r39610 '*'{-s+,--system=}'[show help for specific platform(s)]:platform:(windows vms plan9 unix)' \
Nikolaj Sjujskij
zsh completion: complete additional topics for `help`, not commands only
r17396 '*:mercurial help topic:_hg_help_topics'
Martin Geisler
setup: backout 68964567e406...
r10028 }
_hg_cmd_identify() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_remote_opts \
av6
zsh_completion: update various arguments, descriptions, metavariables...
r39609 '(--rev -r)'{-r+,--rev=}'[identify the specified revision]:revision:_hg_labels' \
av6
zsh_completion: update some option usage flags ('+', '=' and ':')...
r30080 '(--num -n)'{-n,--num}'[show local revision number]' \
'(--id -i)'{-i,--id}'[show global revision id]' \
'(--branch -b)'{-b,--branch}'[show branch]' \
av6
zsh_completion: update all options...
r39241 '(--bookmarks -B)'{-B,--bookmarks}'[show bookmarks]' \
av6
zsh_completion: update some option usage flags ('+', '=' and ':')...
r30080 '(--tags -t)'{-t,--tags}'[show tags]'
Martin Geisler
setup: backout 68964567e406...
r10028 }
_hg_cmd_import() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_commit_opts \
av6
zsh_completion: update all options...
r39241 '(--strip -p)'{-p+,--strip=}'[directory strip option for patch (default: 1)]:count' \
Nikolaj Sjujskij
zsh completion: catch up with 2.2 commands and options...
r17004 '--bypass[apply patch without touching the working directory]' \
Nikolaj Sjujskij
zsh completion: add new options for existing commands...
r17401 '--no-commit[do not commit, just update the working directory]' \
Martin Tietze
zsh_completion: add '--partial' flag to completions for 'import' (issue5618)...
r33434 '--partial[commit even if some hunks fail]' \
av6
zsh_completion: update all options...
r39241 '--exact[abort if patch would apply lossily]' \
av6
zsh_completion: add new and remove deprecated flags...
r39610 '--prefix=[apply patch to subdirectory]:directory:_files -/' \
Nikolaj Sjujskij
zsh completion: add new options for existing commands...
r17401 '--import-branch[use any branch information in patch (implied by --exact)]' \
av6
zsh_completion: update all options...
r39241 '(--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' \
Martin Geisler
setup: backout 68964567e406...
r10028 '*:patch:_files'
}
_hg_cmd_incoming() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_log_opts $_hg_branch_bmark_opts $_hg_remote_opts \
Nikolaj Sjujskij
zsh completion: add subrepos options for all supporting commands
r17399 $_hg_subrepos_opts \
av6
zsh_completion: update various arguments, descriptions, metavariables...
r39609 '(--force -f)'{-f,--force}'[run even if remote repository is unrelated]' \
av6
zsh_completion: update all options...
r39241 '*'{-r+,--rev=}'[a remote changeset intended to be added]:revision:_hg_labels' \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \
av6
zsh_completion: update various arguments, descriptions, metavariables...
r39609 '--bundle=[file to store the bundles into]:bundle file:_files' \
Martin Geisler
setup: backout 68964567e406...
r10028 ':source:_hg_remote'
}
_hg_cmd_init() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_remote_opts \
av6
zsh_completion: update various arguments, descriptions, metavariables...
r39609 ':directory:_files -/'
Martin Geisler
setup: backout 68964567e406...
r10028 }
_hg_cmd_locate() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_pat_opts \
av6
zsh_completion: update various arguments, descriptions, metavariables...
r39609 '(--rev -r)'{-r+,--rev=}'[search the repository as it is in revision]:revision:_hg_labels' \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \
av6
zsh_completion: update all options...
r39241 '(--fullpath -f)'{-f,--fullpath}'[print complete paths from the filesystem root]' \
Martin Geisler
setup: backout 68964567e406...
r10028 '*:search pattern:_hg_files'
}
_hg_cmd_log() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_log_opts $_hg_pat_opts \
av6
zsh_completion: add new and remove deprecated flags...
r39610 '(--follow -f)'{-f,--follow}'[follow changeset history, or file history across copies and renames]' \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--copies -C)'{-C,--copies}'[show copied files]' \
av6
zsh_completion: update all options...
r39241 '*'{-k+,--keyword=}'[search for a keyword]:keyword' \
av6
zsh_completion: update some option usage flags ('+', '=' and ':')...
r30080 '*'{-r+,--rev=}'[show the specified revision or revset]:revision:_hg_revrange' \
av6
zsh_completion: add new and remove deprecated flags...
r39610 '--removed[include revisions where files were removed]' \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--only-merges -m)'{-m,--only-merges}'[show only merges]' \
av6
zsh_completion: update all options...
r39241 '*'{-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' \
Martin Geisler
setup: backout 68964567e406...
r10028 '*:files:_hg_files'
}
_hg_cmd_manifest() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts \
Nikolaj Sjujskij
zsh completion: catch up with 2.2 commands and options...
r17004 '--all[list files from all revisions]' \
av6
zsh_completion: update some option usage flags ('+', '=' and ':')...
r30080 '(--rev -r)'{-r+,--rev=}'[revision to display]:revision:_hg_labels' \
Augie Fackler
zsh completion: complete bookmarks where they are accepted...
r13511 ':revision:_hg_labels'
Martin Geisler
setup: backout 68964567e406...
r10028 }
_hg_cmd_merge() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_mergetool_opts \
av6
zsh_completion: update some option usage flags ('+', '=' and ':')...
r30080 '(--rev -r 1)'{-r+,--rev=}'[revision to merge]:revision:_hg_mergerevs' \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--preview -P)'{-P,--preview}'[review revisions to merge (no merge is performed)]' \
av6
zsh_completion: add new and remove deprecated flags...
r39610 '(- :)--abort[abort the ongoing merge]' \
Martin Geisler
setup: backout 68964567e406...
r10028 ':revision:_hg_mergerevs'
}
_hg_cmd_outgoing() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_log_opts $_hg_branch_bmark_opts $_hg_remote_opts \
Nikolaj Sjujskij
zsh completion: add subrepos options for all supporting commands
r17399 $_hg_subrepos_opts \
av6
zsh_completion: update all options...
r39241 '(--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' \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \
':destination:_hg_remote'
}
_hg_cmd_parents() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_template_opts \
av6
zsh_completion: update various arguments, descriptions, metavariables...
r39609 '(--rev -r)'{-r+,--rev=}'[show parents of the specified revision]:revision:_hg_labels' \
Martin Geisler
setup: backout 68964567e406...
r10028 ':last modified file:_hg_files'
}
_hg_cmd_paths() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts \
Martin Geisler
setup: backout 68964567e406...
r10028 ':path:_hg_paths'
}
Nikolaj Sjujskij
zsh completion: catch up with 2.2 commands and options...
r17004 _hg_cmd_phase() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts \
av6
zsh_completion: update all options...
r39241 '(--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]' \
Nikolaj Sjujskij
zsh completion: catch up with 2.2 commands and options...
r17004 '(--force -f)'{-f,--force}'[allow to move boundary backward]' \
av6
zsh_completion: update all options...
r39241 '*'{-r+,--rev=}'[target revision]:revision:_hg_labels' \
'*:revision:_hg_labels'
Nikolaj Sjujskij
zsh completion: catch up with 2.2 commands and options...
r17004 }
Martin Geisler
setup: backout 68964567e406...
r10028 _hg_cmd_pull() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_branch_bmark_opts $_hg_remote_opts \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \
av6
zsh_completion: update all options...
r39241 '(--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' \
Martin Geisler
setup: backout 68964567e406...
r10028 ':source:_hg_remote'
}
_hg_cmd_push() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_branch_bmark_opts $_hg_remote_opts \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--force -f)'{-f,--force}'[force push]' \
av6
zsh_completion: update all options...
r39241 '*'{-r+,--rev=}'[a changeset intended to be included in the destination]:revision:_hg_labels' \
Nikolaj Sjujskij
zsh completion: add new options for existing commands...
r17401 '--new-branch[allow pushing a new branch]' \
Martin Geisler
setup: backout 68964567e406...
r10028 ':destination:_hg_remote'
}
_hg_cmd_remove() {
av6
zsh_completion: adjust usage of common options...
r39382 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts $_hg_subrepos_opts \
av6
zsh_completion: update all options...
r39241 '(--after -A)'{-A,--after}'[record delete for missing files]' \
'(--force -f)'{-f,--force}'[forget added files, delete modified files]' \
Martin Geisler
setup: backout 68964567e406...
r10028 '*:file:_hg_files'
}
_hg_cmd_rename() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--after -A)'{-A,--after}'[record a rename that has already occurred]' \
'(--force -f)'{-f,--force}'[forcibly copy over an existing managed file]' \
'*:file:_hg_files'
}
_hg_cmd_resolve() {
av6
zsh_completion: declare appropriate local parameters for ->string form...
r39238 local context state state_descr line ret=1
Martin Geisler
setup: backout 68964567e406...
r10028 typeset -A opt_args
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_mergetool_opts $_hg_pat_opts \
Nikolaj Sjujskij
zsh completion: add new options for existing commands...
r17401 '(--all -a)'{-a,--all}'[select all unresolved files]' \
'(--no-status -n)'{-n,--no-status}'[hide status prefix]' \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--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' \
av6
zsh_completion: update all options...
r39241 '(--unmark -u --list -l --mark -m)'{-u,--unmark}'[mark files as unresolved]:*:resolved files:_hg_resolved' \
av6
zsh_completion: declare appropriate local parameters for ->string form...
r39238 '*:file:_hg_unresolved' && ret=0
Martin Geisler
setup: backout 68964567e406...
r10028
if [[ $state == 'resolve_files' ]]
then
_alternative 'files:resolved files:_hg_resolved' \
av6
zsh_completion: declare appropriate local parameters for ->string form...
r39238 'files:unresolved files:_hg_unresolved' && ret=0
Martin Geisler
setup: backout 68964567e406...
r10028 fi
av6
zsh_completion: declare appropriate local parameters for ->string form...
r39238
return ret
Martin Geisler
setup: backout 68964567e406...
r10028 }
_hg_cmd_revert() {
av6
zsh_completion: declare appropriate local parameters for ->string form...
r39238 local context state state_descr line ret=1
Martin Geisler
setup: backout 68964567e406...
r10028 typeset -A opt_args
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--all -a :)'{-a,--all}'[revert all changes when no arguments given]' \
av6
zsh_completion: update various arguments, descriptions, metavariables...
r39609 '(--rev -r)'{-r+,--rev=}'[revert to the specified revision]:revision:_hg_labels' \
Nikolaj Sjujskij
zsh completion: catch up with 2.2 commands and options...
r17004 '(--no-backup -C)'{-C,--no-backup}'[do not save backup copies of files]' \
av6
zsh_completion: update all options...
r39241 '(--date -d)'{-d+,--date=}'[tipmost revision matching date]:date' \
'(--interactive -i)'{-i,--interactive}'[interactively select the changes]' \
av6
zsh_completion: declare appropriate local parameters for ->string form...
r39238 '*:file:->revert_files' && ret=0
Martin Geisler
setup: backout 68964567e406...
r10028
av6
zsh_completion: declare appropriate local parameters for ->string form...
r39238 if [[ $state == 'revert_files' ]]
Martin Geisler
setup: backout 68964567e406...
r10028 then
av6
zsh_completion: handle --rev as well as -r for diff and revert...
r39431 if [[ -n ${opt_args[(I)-r|--rev]} ]]
Martin Geisler
setup: backout 68964567e406...
r10028 then
av6
zsh_completion: declare appropriate local parameters for ->string form...
r39238 _hg_files && ret=0
Martin Geisler
setup: backout 68964567e406...
r10028 else
typeset -a status_files
_hg_status mard
av6
zsh_completion: declare appropriate local parameters for ->string form...
r39238 _wanted files expl 'modified, added, removed or deleted file' _multi_parts / status_files && ret=0
Martin Geisler
setup: backout 68964567e406...
r10028 fi
fi
av6
zsh_completion: declare appropriate local parameters for ->string form...
r39238
return ret
Martin Geisler
setup: backout 68964567e406...
r10028 }
Nikolaj Sjujskij
zsh completion: add `forget` and `rollback` commands
r17397 _hg_cmd_rollback() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_dryrun_opts \
Nikolaj Sjujskij
zsh completion: add `forget` and `rollback` commands
r17397 '(--force -f)'{-f,--force}'[ignore safety measures]' \
}
Martin Geisler
setup: backout 68964567e406...
r10028 _hg_cmd_serve() {
av6
zsh_completion: adjust usage of common options...
r39382 _arguments -s -S : $_hg_global_opts $_hg_subrepos_opts \
av6
zsh_completion: update all options...
r39241 '(--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' \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--daemon -d)'{-d,--daemon}'[run server in background]' \
av6
zsh_completion: update all options...
r39241 '(--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' \
Martin Geisler
setup: backout 68964567e406...
r10028 '--stdio[for remote clients]' \
av6
zsh_completion: update all options...
r39241 '(--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]'
Martin Geisler
setup: backout 68964567e406...
r10028 }
_hg_cmd_showconfig() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts \
av6
zsh_completion: update some option usage flags ('+', '=' and ':')...
r30080 '(--untrusted -u)'{-u,--untrusted}'[show untrusted configuration options]' \
av6
zsh_completion: update all options...
r39241 '(--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'
Martin Geisler
setup: backout 68964567e406...
r10028 }
_hg_cmd_status() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--all -A)'{-A,--all}'[show status of all files]' \
'(--modified -m)'{-m,--modified}'[show only modified files]' \
'(--added -a)'{-a,--added}'[show only added files]' \
'(--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]' \
av6
zsh_completion: update all options...
r39241 '(--unknown -u)'{-u,--unknown}'[show only unknown (not tracked) files]' \
av6
zsh_completion: update various arguments, descriptions, metavariables...
r39609 '(--ignored -i)'{-i,--ignored}'[show only ignored files]' \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--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]' \
av6
zsh_completion: update all options...
r39241 '*--rev=[show difference from revision]:revision:_hg_labels' \
'--change=[list the changed files of a revision]:revision:_hg_labels' \
Martin Geisler
setup: backout 68964567e406...
r10028 '*:files:_files'
}
_hg_cmd_summary() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts \
Martin Geisler
setup: backout 68964567e406...
r10028 '--remote[check for push and pull]'
}
_hg_cmd_tag() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--local -l)'{-l,--local}'[make the tag local]' \
av6
zsh_completion: update all options...
r39241 '(--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' \
av6
zsh_completion: update some option usage flags ('+', '=' and ':')...
r30080 '(--rev -r)'{-r+,--rev=}'[revision to tag]:revision:_hg_labels' \
Nikolaj Sjujskij
zsh completion: add new options for existing commands...
r17401 '(--force -f)'{-f,--force}'[force tag]' \
'--remove[remove a tag]' \
'(--edit -e)'{-e,--edit}'[edit commit message]' \
Martin Geisler
setup: backout 68964567e406...
r10028 ':tag name:'
}
_hg_cmd_tip() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_gitlike_opts $_hg_template_opts \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--patch -p)'{-p,--patch}'[show patch]'
}
_hg_cmd_unbundle() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts \
av6
zsh_completion: update various arguments, descriptions, metavariables...
r39609 '(--update -u)'{-u,--update}'[update to new branch head if changesets were unbundled]' \
av6
zsh_completion: update all options...
r39241 '*:files:_files'
Martin Geisler
setup: backout 68964567e406...
r10028 }
_hg_cmd_update() {
av6
zsh_completion: update all options...
r39241 _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' \
Augie Fackler
zsh completion: complete bookmarks where they are accepted...
r13511 ':revision:_hg_labels'
Martin Geisler
setup: backout 68964567e406...
r10028 }
Brendan Cully
zsh completion: bookmarks support
r12169 ## extensions ##
Martin Geisler
setup: backout 68964567e406...
r10028 # HGK
_hg_cmd_view() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts \
av6
zsh_completion: update all options...
r39241 '(--limit -l)'{-l+,--limit=}'[limit number of changes displayed]:limit' \
Nikolaj Sjujskij
zsh_completion: make use of `debuglabelcomplete` command...
r18903 ':revision range:_hg_labels'
Martin Geisler
setup: backout 68964567e406...
r10028 }
# MQ
_hg_qseries() {
typeset -a patches
patches=(${(f)"$(_hg_cmd qseries)"})
(( $#patches )) && _describe -t hg-patches 'patches' patches
}
_hg_qapplied() {
typeset -a patches
patches=(${(f)"$(_hg_cmd qapplied)"})
if (( $#patches ))
then
patches+=(qbase qtip)
_describe -t hg-applied-patches 'applied patches' patches
fi
}
_hg_qunapplied() {
typeset -a patches
patches=(${(f)"$(_hg_cmd qunapplied)"})
(( $#patches )) && _describe -t hg-unapplied-patches 'unapplied patches' patches
}
# unapplied, including guarded patches
_hg_qdeletable() {
typeset -a unapplied
unapplied=(${(f)"$(_hg_cmd qseries)"})
for p in $(_hg_cmd qapplied)
do
unapplied=(${unapplied:#$p})
done
(( $#unapplied )) && _describe -t hg-allunapplied-patches 'all unapplied patches' unapplied
}
_hg_qguards() {
typeset -a guards
local guard
compset -P "+|-"
_hg_cmd qselect -s | while read guard
do
guards+=(${guard#(+|-)})
done
(( $#guards )) && _describe -t hg-guards 'guards' guards
}
_hg_qseries_opts=(
'(--summary -s)'{-s,--summary}'[print first line of patch header]')
_hg_cmd_qapplied() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_qseries_opts \
Nikolaj Sjujskij
zsh completion: update mq commands completion...
r17402 '(--last -1)'{-1,--last}'[show only the preceding applied patch]' \
'*:patch:_hg_qapplied'
}
_hg_cmd_qclone() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_remote_opts $_hg_clone_opts \
av6
zsh_completion: update some option usage flags ('+', '=' and ':')...
r30080 '(--patches -p)'{-p+,--patches=}'[location of source patch repository]:' \
Nikolaj Sjujskij
zsh completion: update mq commands completion...
r17402 ':source repository:_hg_remote' \
':destination:_hg_clone_dest'
Martin Geisler
setup: backout 68964567e406...
r10028 }
_hg_cmd_qdelete() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--keep -k)'{-k,--keep}'[keep patch file]' \
av6
zsh_completion: update some option usage flags ('+', '=' and ':')...
r30080 '*'{-r+,--rev=}'[stop managing a revision]:applied patch:_hg_revrange' \
Martin Geisler
setup: backout 68964567e406...
r10028 '*:unapplied patch:_hg_qdeletable'
}
_hg_cmd_qdiff() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_diff_opts \
Nikolaj Sjujskij
zsh completion: add new option groups for options...
r17398 $_hg_ignore_space_opts \
Martin Geisler
setup: backout 68964567e406...
r10028 '*:pattern:_hg_files'
}
Augie Fackler
zsh completion: add support for qfinish
r15645 _hg_cmd_qfinish() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts \
Augie Fackler
zsh completion: fix error in qfinish completions from 88a82069be4a...
r16330 '(--applied -a)'{-a,--applied}'[finish all applied patches]' \
Augie Fackler
zsh completion: add support for qfinish
r15645 '*:patch:_hg_qapplied'
}
Martin Geisler
setup: backout 68964567e406...
r10028 _hg_cmd_qfold() {
av6
zsh_completion: adjust usage of common options...
r39382 _arguments -s -S : $_hg_global_opts $_hg_commit_opts \
av6
zsh_completion: update all options...
r39241 '(--keep -k)'{-k,--keep}'[keep folded patch files]' \
Nikolaj Sjujskij
zsh completion: update mq commands completion...
r17402 '(--force -f)'{-f,--force}'[overwrite any local changes]' \
'--no-backup[do not save backup copies of files]' \
Martin Geisler
setup: backout 68964567e406...
r10028 '*:unapplied patch:_hg_qunapplied'
}
_hg_cmd_qgoto() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--force -f)'{-f,--force}'[overwrite any local changes]' \
Nikolaj Sjujskij
zsh completion: update mq commands completion...
r17402 '--keep-changes[tolerate non-conflicting local changes]' \
av6
zsh_completion: add new and remove deprecated flags...
r39610 '--no-backup[do not save backup copies of files]' \
Martin Geisler
setup: backout 68964567e406...
r10028 ':patch:_hg_qseries'
}
_hg_cmd_qguard() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--list -l)'{-l,--list}'[list all patches and guards]' \
'(--none -n)'{-n,--none}'[drop all guards]' \
':patch:_hg_qseries' \
'*:guards:_hg_qguards'
}
_hg_cmd_qheader() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts \
Martin Geisler
setup: backout 68964567e406...
r10028 ':patch:_hg_qseries'
}
_hg_cmd_qimport() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_gitlike_opts \
av6
zsh_completion: update various arguments, descriptions, metavariables...
r39609 '(--existing -e)'{-e,--existing}'[import file in patch directory]' \
'(--name -n 2)'{-n+,--name=}'[name of patch file]:name' \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--force -f)'{-f,--force}'[overwrite existing files]' \
av6
zsh_completion: update some option usage flags ('+', '=' and ':')...
r30080 '*'{-r+,--rev=}'[place existing revisions under mq control]:revision:_hg_revrange' \
Nikolaj Sjujskij
zsh completion: update mq commands completion...
r17402 '(--push -P)'{-P,--push}'[qpush after importing]' \
Martin Geisler
setup: backout 68964567e406...
r10028 '*:patch:_files'
}
_hg_cmd_qnew() {
av6
zsh_completion: adjust usage of common options...
r39382 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_commit_opts $_hg_date_user_opts $_hg_gitlike_opts \
Martin Geisler
setup: backout 68964567e406...
r10028 ':patch:'
}
_hg_cmd_qnext() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_qseries_opts
Martin Geisler
setup: backout 68964567e406...
r10028 }
_hg_cmd_qpop() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--all -a :)'{-a,--all}'[pop all patches]' \
av6
zsh_completion: update various arguments, descriptions, metavariables...
r39609 '(--force -f)'{-f,--force}'[forget any local changes to patched files]' \
Nikolaj Sjujskij
zsh completion: update mq commands completion...
r17402 '--keep-changes[tolerate non-conflicting local changes]' \
'--no-backup[do not save backup copies of files]' \
Martin Geisler
setup: backout 68964567e406...
r10028 ':patch:_hg_qapplied'
}
_hg_cmd_qprev() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_qseries_opts
Martin Geisler
setup: backout 68964567e406...
r10028 }
_hg_cmd_qpush() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--all -a :)'{-a,--all}'[apply all patches]' \
'(--list -l)'{-l,--list}'[list patch name in commit text]' \
av6
zsh_completion: update various arguments, descriptions, metavariables...
r39609 '(--force -f)'{-f,--force}'[apply on top of local changes]' \
Nikolaj Sjujskij
zsh completion: catch up with 2.2 commands and options...
r17004 '(--exact -e)'{-e,--exact}'[apply the target patch to its recorded parent]' \
Yuya Nishihara
zsh completions: add qpush --move option
r11760 '--move[reorder patch series and apply only the patch]' \
Nikolaj Sjujskij
zsh completion: update mq commands completion...
r17402 '--keep-changes[tolerate non-conflicting local changes]' \
'--no-backup[do not save backup copies of files]' \
Martin Geisler
setup: backout 68964567e406...
r10028 ':patch:_hg_qunapplied'
}
_hg_cmd_qrefresh() {
av6
zsh_completion: adjust usage of common options...
r39382 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_commit_opts $_hg_date_user_opts $_hg_gitlike_opts \
av6
zsh_completion: update various arguments, descriptions, metavariables...
r39609 '(--short -s)'{-s,--short}'[refresh only files already in the patch and specified files]' \
Martin Geisler
setup: backout 68964567e406...
r10028 '*:files:_hg_files'
}
_hg_cmd_qrename() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts \
Nikolaj Sjujskij
zsh completion: update mq commands completion...
r17402 ':patch:_hg_qunapplied' \
Martin Geisler
setup: backout 68964567e406...
r10028 ':destination:'
}
_hg_cmd_qselect() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--none -n :)'{-n,--none}'[disable all guards]' \
'(--series -s :)'{-s,--series}'[list all guards in series file]' \
'--pop[pop to before first guarded applied patch]' \
av6
zsh_completion: update various arguments, descriptions, metavariables...
r39609 '--reapply[pop, then reapply patches]' \
Martin Geisler
setup: backout 68964567e406...
r10028 '*:guards:_hg_qguards'
}
_hg_cmd_qseries() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_qseries_opts \
Martin Geisler
setup: backout 68964567e406...
r10028 '(--missing -m)'{-m,--missing}'[print patches not in series]'
}
_hg_cmd_qunapplied() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_qseries_opts \
Nikolaj Sjujskij
zsh completion: update mq commands completion...
r17402 '(--first -1)'{-1,--first}'[show only the first patch]'
Martin Geisler
setup: backout 68964567e406...
r10028 }
_hg_cmd_qtop() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_qseries_opts
Martin Geisler
setup: backout 68964567e406...
r10028 }
_hg_cmd_strip() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts \
av6
zsh_completion: update all options...
r39241 '(--force -f)'{-f,--force}'[force removal of changesets, discard uncommitted changes (no backup)]' \
av6
zsh_completion: update various arguments, descriptions, metavariables...
r39609 '--no-backup[do not save backup bundle]' \
av6
zsh_completion: update all options...
r39241 '(--keep -k)'{-k,--keep}'[do not modify working directory during strip]' \
av6
zsh_completion: update various arguments, descriptions, metavariables...
r39609 '*'{-B+,--bookmark=}'[remove revisions only reachable from given bookmark]:bookmark:_hg_bookmarks' \
'*'{-r+,--rev=}'[strip specified revision]:revision:_hg_labels' \
av6
zsh_completion: update all options...
r39241 '*:revision:_hg_labels'
Martin Geisler
setup: backout 68964567e406...
r10028 }
Brendan Cully
zsh completion: patchbomb support
r12168 # Patchbomb
_hg_cmd_email() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_remote_opts $_hg_gitlike_opts \
Brendan Cully
zsh completion: patchbomb support
r12168 '--plain[omit hg patch header]' \
Nikolaj Sjujskij
zsh completion: catch up with 2.2 commands and options...
r17004 '--body[send patches as inline message text (default)]' \
Brendan Cully
zsh completion: patchbomb support
r12168 '(--outgoing -o)'{-o,--outgoing}'[send changes not found in the target repository]' \
'(--bundle -b)'{-b,--bundle}'[send changes not in target as a binary bundle]' \
av6
zsh_completion: add new and remove deprecated flags...
r39610 '(--bookmark -B)'{-B+,--bookmark=}'[send changes only reachable by given bookmark]:bookmark:_hg_bookmarks' \
av6
zsh_completion: update various arguments, descriptions, metavariables...
r39609 '--bundlename=[name of the bundle attachment file (default: bundle)]:name' \
'*'{-r+,--rev=}'[a revision to send]:revision:_hg_revrange' \
Brendan Cully
zsh completion: patchbomb support
r12168 '--force[run even when remote repository is unrelated (with -b/--bundle)]' \
av6
zsh_completion: update all options...
r39241 '*--base=[a base changeset to specify instead of a destination (with -b/--bundle)]:revision:_hg_labels' \
Brendan Cully
zsh completion: patchbomb support
r12168 '--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]' \
av6
zsh_completion: update all options...
r39241 '*--bcc=[email addresses of blind carbon copy recipients]:email' \
'*'{-c+,--cc=}'[email addresses of copy recipients]:email' \
av6
zsh_completion: add new and remove deprecated flags...
r39610 '--confirm[ask for confirmation before sending]' \
Brendan Cully
zsh completion: patchbomb support
r12168 '(--diffstat -d)'{-d,--diffstat}'[add diffstat output to messages]' \
av6
zsh_completion: update all options...
r39241 '--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' \
Brendan Cully
zsh completion: patchbomb support
r12168 '(--test -n)'{-n,--test}'[print messages that would be sent]' \
av6
zsh_completion: update all options...
r39241 '(--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' \
Brendan Cully
zsh completion: patchbomb support
r12168 ':revision:_hg_revrange'
}
Nikolaj Sjujskij
zsh completion: catch up with 2.2 commands and options...
r17004 # Rebase
_hg_cmd_rebase() {
av6
zsh_completion: adjust usage of common options...
r39382 _arguments -s -S : $_hg_global_opts $_hg_commit_opts $_hg_mergetool_opts $_hg_dryrun_opts \
av6
zsh_completion: update some option usage flags ('+', '=' and ':')...
r30080 '*'{-r+,--rev=}'[rebase these revisions]:revision:_hg_revrange' \
av6
zsh_completion: update all options...
r39241 '(--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' \
av6
zsh_completion: update some option usage flags ('+', '=' and ':')...
r30080 '(--dest -d)'{-d+,--dest=}'[rebase onto the specified changeset]:revision:_hg_labels' \
av6
zsh_completion: update all options...
r39241 '--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]' \
Nikolaj Sjujskij
zsh completion: catch up with 2.2 commands and options...
r17004 }
Nikolaj Sjujskij
zsh completion: add support for convert, graphlog, purge, record extensions
r17400 # Record
_hg_cmd_record() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_commit_opts $_hg_pat_opts \
Nikolaj Sjujskij
zsh completion: add support for convert, graphlog, purge, record extensions
r17400 $_hg_ignore_space_opts $_hg_subrepos_opts \
'(--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]' \
av6
zsh_completion: update all options...
r39241 '(--date -d)'{-d+,--date=}'[record the specified date as commit date]:date' \
'(--user -u)'{-u+,--user=}'[record the specified user as committer]:user'
Nikolaj Sjujskij
zsh completion: add support for convert, graphlog, purge, record extensions
r17400 }
_hg_cmd_qrecord() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts $_hg_commit_opts $_hg_date_user_opts $_hg_gitlike_opts \
Nikolaj Sjujskij
zsh completion: add support for convert, graphlog, purge, record extensions
r17400 $_hg_pat_opts $_hg_ignore_space_opts $_hg_subrepos_opts
}
# Convert
_hg_cmd_convert() {
av6
zsh_completion: drop -w, add -S to _arguments...
r39236 _arguments -s -S : $_hg_global_opts \
av6
zsh_completion: update all options...
r39241 '(--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)' \
av6
zsh_completion: update various arguments, descriptions, metavariables...
r39609 '*'{-r+,--rev=}'[import up to source revision]:revision' \
av6
zsh_completion: update some option usage flags ('+', '=' and ':')...
r30080 '(--authormap -A)'{-A+,--authormap=}'[remap usernames using this file]:file:_files' \
av6
zsh_completion: update all options...
r39241 '--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' \
Nikolaj Sjujskij
zsh completion: add support for convert, graphlog, purge, record extensions
r17400 '--branchsort[try to sort changesets by branches]' \
'--datesort[try to sort changesets by date]' \
av6
zsh_completion: update all options...
r39241 '--sourcesort[preserve source changesets order]' \
'--closesort[try to reorder closed revisions]'
Nikolaj Sjujskij
zsh completion: add support for convert, graphlog, purge, record extensions
r17400 }
# Purge
_hg_cmd_purge() {
av6
zsh_completion: adjust usage of common options...
r39382 _arguments -s -S : $_hg_global_opts $_hg_pat_opts \
Nikolaj Sjujskij
zsh completion: add support for convert, graphlog, purge, record extensions
r17400 '(--abort-on-err -a)'{-a,--abort-on-err}'[abort if an error occurs]' \
'--all[purge ignored files too]' \
av6
zsh_completion: add new and remove deprecated flags...
r39610 '--dirs[purge empty directories]' \
'--files[purge files]' \
Nikolaj Sjujskij
zsh completion: add support for convert, graphlog, purge, record extensions
r17400 '(--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)]'
}
av6
zsh_completion: complete shelve and unshelve...
r39475 # Shelve
_hg_cmd_shelve() {
local context state state_descr line ret=1
typeset -A opt_args
_arguments -s -S : $_hg_global_opts $_hg_pat_opts \
'(--addremove -A)'{-A,--addremove}'[mark new/missing files as added/removed before shelving]' \
'(--unknown -u)'{-u,--unknown}'[store unknown files in the shelve]' \
'(--name -n :)--cleanup[delete all shelved changes]' \
'--date=[shelve with the specified commit date]:date' \
'(--delete -d)'{-d,--delete}'[delete the named shelved change(s)]' \
'(--edit -e)'{-e,--edit}'[invoke editor on commit messages]' \
'(--list -l)'{-l,--list}'[list current shelves]' \
'(--message -m)'{-m+,--message=}'[use text as shelve message]:text' \
'(--name -n)'{-n+,--name=}'[use the given name for the shelved commit]:name' \
'(--patch -p)'{-p,--patch}'[output patches for changes]' \
'(--interactive -i)'{-i,--interactive}'[interactive mode, only works while creating a shelve]' \
'--stat[output diffstat-style summary of changes]' \
'*:file:->shelve_files' && ret=0
if [[ $state == 'shelve_files' ]]
then
if [[ -n ${opt_args[(I)-d|--delete|-l|--list|-p|--patch|--stat]} ]]
then
_hg_shelves && ret=0
else
typeset -a status_files
_hg_status mard
_wanted files expl 'modified, added, removed or deleted file' _multi_parts / status_files && ret=0
fi
fi
return ret
}
_hg_cmd_unshelve() {
_arguments -s -S : $_hg_global_opts $_hg_mergetool_opts \
'(--abort -a --continue -c --name -n :)'{-a,--abort}'[abort an incomplete unshelve operation]' \
'(--abort -a --continue -c --name -n :)'{-c,--continue}'[continue an incomplete unshelve operation]' \
'(--keep -k)'{-k,--keep}'[keep shelve after unshelving]' \
'(--name -n :)'{-n+,--name=}'[restore shelved change with given name]:shelve:_hg_shelves' \
':shelve:_hg_shelves'
}
Martin Geisler
setup: backout 68964567e406...
r10028 _hg "$@"