##// END OF EJS Templates
zsh completion: include guarded patches in qdelete
Brendan Cully -
r8980:6d5dca87 default
parent child Browse files
Show More
@@ -1,896 +1,908 b''
1 #compdef hg
1 #compdef hg
2
2
3 # Zsh completion script for mercurial. Rename this file to _hg and copy
3 # Zsh completion script for mercurial. Rename this file to _hg and copy
4 # it into your zsh function path (/usr/share/zsh/site-functions for
4 # it into your zsh function path (/usr/share/zsh/site-functions for
5 # instance)
5 # instance)
6 #
6 #
7 # If you do not want to install it globally, you can copy it somewhere
7 # If you do not want to install it globally, you can copy it somewhere
8 # else and add that directory to $fpath. This must be done before
8 # else and add that directory to $fpath. This must be done before
9 # compinit is called. If the file is copied to ~/.zsh.d, your ~/.zshrc
9 # compinit is called. If the file is copied to ~/.zsh.d, your ~/.zshrc
10 # file could look like this:
10 # file could look like this:
11 #
11 #
12 # fpath=("$HOME/.zsh.d" $fpath)
12 # fpath=("$HOME/.zsh.d" $fpath)
13 # autoload -U compinit
13 # autoload -U compinit
14 # compinit
14 # compinit
15 #
15 #
16 # Copyright (C) 2005, 2006 Steve Borho <steve@borho.org>
16 # Copyright (C) 2005, 2006 Steve Borho <steve@borho.org>
17 # Copyright (C) 2006, 2007, 2008 Brendan Cully <brendan@kublai.com>
17 # Copyright (C) 2006-9 Brendan Cully <brendan@kublai.com>
18 #
18 #
19 # Permission is hereby granted, without written agreement and without
19 # Permission is hereby granted, without written agreement and without
20 # licence or royalty fees, to use, copy, modify, and distribute this
20 # licence or royalty fees, to use, copy, modify, and distribute this
21 # software and to distribute modified versions of this software for any
21 # software and to distribute modified versions of this software for any
22 # purpose, provided that the above copyright notice and the following
22 # purpose, provided that the above copyright notice and the following
23 # two paragraphs appear in all copies of this software.
23 # two paragraphs appear in all copies of this software.
24 #
24 #
25 # In no event shall the authors be liable to any party for direct,
25 # In no event shall the authors be liable to any party for direct,
26 # indirect, special, incidental, or consequential damages arising out of
26 # indirect, special, incidental, or consequential damages arising out of
27 # the use of this software and its documentation, even if the authors
27 # the use of this software and its documentation, even if the authors
28 # have been advised of the possibility of such damage.
28 # have been advised of the possibility of such damage.
29 #
29 #
30 # The authors specifically disclaim any warranties, including, but not
30 # The authors specifically disclaim any warranties, including, but not
31 # limited to, the implied warranties of merchantability and fitness for
31 # limited to, the implied warranties of merchantability and fitness for
32 # a particular purpose. The software provided hereunder is on an "as
32 # a particular purpose. The software provided hereunder is on an "as
33 # is" basis, and the authors have no obligation to provide maintenance,
33 # is" basis, and the authors have no obligation to provide maintenance,
34 # support, updates, enhancements, or modifications.
34 # support, updates, enhancements, or modifications.
35
35
36 emulate -LR zsh
36 emulate -LR zsh
37 setopt extendedglob
37 setopt extendedglob
38
38
39 local curcontext="$curcontext" state line
39 local curcontext="$curcontext" state line
40 typeset -A _hg_cmd_globals
40 typeset -A _hg_cmd_globals
41
41
42 _hg() {
42 _hg() {
43 local cmd _hg_root
43 local cmd _hg_root
44 integer i=2
44 integer i=2
45 _hg_cmd_globals=()
45 _hg_cmd_globals=()
46
46
47 while (( i < $#words ))
47 while (( i < $#words ))
48 do
48 do
49 case "$words[$i]" in
49 case "$words[$i]" in
50 -R|--repository)
50 -R|--repository)
51 eval _hg_root="$words[$i+1]"
51 eval _hg_root="$words[$i+1]"
52 _hg_cmd_globals+=("$words[$i]" "$_hg_root")
52 _hg_cmd_globals+=("$words[$i]" "$_hg_root")
53 (( i += 2 ))
53 (( i += 2 ))
54 continue
54 continue
55 ;;
55 ;;
56 -R*)
56 -R*)
57 _hg_cmd_globals+="$words[$i]"
57 _hg_cmd_globals+="$words[$i]"
58 eval _hg_root="${words[$i]#-R}"
58 eval _hg_root="${words[$i]#-R}"
59 (( i++ ))
59 (( i++ ))
60 continue
60 continue
61 ;;
61 ;;
62 --cwd|--config)
62 --cwd|--config)
63 # pass along arguments to hg completer
63 # pass along arguments to hg completer
64 _hg_cmd_globals+=("$words[$i]" "$words[$i+1]")
64 _hg_cmd_globals+=("$words[$i]" "$words[$i+1]")
65 (( i += 2 ))
65 (( i += 2 ))
66 continue
66 continue
67 ;;
67 ;;
68 -*)
68 -*)
69 # skip option
69 # skip option
70 (( i++ ))
70 (( i++ ))
71 continue
71 continue
72 ;;
72 ;;
73 esac
73 esac
74 if [[ -z "$cmd" ]]
74 if [[ -z "$cmd" ]]
75 then
75 then
76 cmd="$words[$i]"
76 cmd="$words[$i]"
77 words[$i]=()
77 words[$i]=()
78 (( CURRENT-- ))
78 (( CURRENT-- ))
79 fi
79 fi
80 (( i++ ))
80 (( i++ ))
81 done
81 done
82
82
83 if [[ -z "$cmd" ]]
83 if [[ -z "$cmd" ]]
84 then
84 then
85 _arguments -s -w : $_hg_global_opts \
85 _arguments -s -w : $_hg_global_opts \
86 ':mercurial command:_hg_commands'
86 ':mercurial command:_hg_commands'
87 return
87 return
88 fi
88 fi
89
89
90 # resolve abbreviations and aliases
90 # resolve abbreviations and aliases
91 if ! (( $+functions[_hg_cmd_${cmd}] ))
91 if ! (( $+functions[_hg_cmd_${cmd}] ))
92 then
92 then
93 local cmdexp
93 local cmdexp
94 (( $#_hg_cmd_list )) || _hg_get_commands
94 (( $#_hg_cmd_list )) || _hg_get_commands
95
95
96 cmdexp=$_hg_cmd_list[(r)${cmd}*]
96 cmdexp=$_hg_cmd_list[(r)${cmd}*]
97 if [[ $cmdexp == $_hg_cmd_list[(R)${cmd}*] ]]
97 if [[ $cmdexp == $_hg_cmd_list[(R)${cmd}*] ]]
98 then
98 then
99 # might be nice to rewrite the command line with the expansion
99 # might be nice to rewrite the command line with the expansion
100 cmd="$cmdexp"
100 cmd="$cmdexp"
101 fi
101 fi
102 if [[ -n $_hg_alias_list[$cmd] ]]
102 if [[ -n $_hg_alias_list[$cmd] ]]
103 then
103 then
104 cmd=$_hg_alias_list[$cmd]
104 cmd=$_hg_alias_list[$cmd]
105 fi
105 fi
106 fi
106 fi
107
107
108 curcontext="${curcontext%:*:*}:hg-${cmd}:"
108 curcontext="${curcontext%:*:*}:hg-${cmd}:"
109
109
110 zstyle -s ":completion:$curcontext:" cache-policy update_policy
110 zstyle -s ":completion:$curcontext:" cache-policy update_policy
111
111
112 if [[ -z "$update_policy" ]]
112 if [[ -z "$update_policy" ]]
113 then
113 then
114 zstyle ":completion:$curcontext:" cache-policy _hg_cache_policy
114 zstyle ":completion:$curcontext:" cache-policy _hg_cache_policy
115 fi
115 fi
116
116
117 if (( $+functions[_hg_cmd_${cmd}] ))
117 if (( $+functions[_hg_cmd_${cmd}] ))
118 then
118 then
119 _hg_cmd_${cmd}
119 _hg_cmd_${cmd}
120 else
120 else
121 # complete unknown commands normally
121 # complete unknown commands normally
122 _arguments -s -w : $_hg_global_opts \
122 _arguments -s -w : $_hg_global_opts \
123 '*:files:_hg_files'
123 '*:files:_hg_files'
124 fi
124 fi
125 }
125 }
126
126
127 _hg_cache_policy() {
127 _hg_cache_policy() {
128 typeset -a old
128 typeset -a old
129
129
130 # cache for a minute
130 # cache for a minute
131 old=( "$1"(mm+10) )
131 old=( "$1"(mm+10) )
132 (( $#old )) && return 0
132 (( $#old )) && return 0
133
133
134 return 1
134 return 1
135 }
135 }
136
136
137 _hg_get_commands() {
137 _hg_get_commands() {
138 typeset -ga _hg_cmd_list
138 typeset -ga _hg_cmd_list
139 typeset -gA _hg_alias_list
139 typeset -gA _hg_alias_list
140 local hline cmd cmdalias
140 local hline cmd cmdalias
141
141
142 _call_program hg hg debugcomplete -v 2>/dev/null | while read -A hline
142 _call_program hg hg debugcomplete -v 2>/dev/null | while read -A hline
143 do
143 do
144 cmd=$hline[1]
144 cmd=$hline[1]
145 _hg_cmd_list+=($cmd)
145 _hg_cmd_list+=($cmd)
146
146
147 for cmdalias in $hline[2,-1]
147 for cmdalias in $hline[2,-1]
148 do
148 do
149 _hg_cmd_list+=($cmdalias)
149 _hg_cmd_list+=($cmdalias)
150 _hg_alias_list+=($cmdalias $cmd)
150 _hg_alias_list+=($cmdalias $cmd)
151 done
151 done
152 done
152 done
153 }
153 }
154
154
155 _hg_commands() {
155 _hg_commands() {
156 (( $#_hg_cmd_list )) || _hg_get_commands
156 (( $#_hg_cmd_list )) || _hg_get_commands
157 _describe -t commands 'mercurial command' _hg_cmd_list
157 _describe -t commands 'mercurial command' _hg_cmd_list
158 }
158 }
159
159
160 _hg_revrange() {
160 _hg_revrange() {
161 compset -P 1 '*:'
161 compset -P 1 '*:'
162 _hg_tags "$@"
162 _hg_tags "$@"
163 }
163 }
164
164
165 _hg_tags() {
165 _hg_tags() {
166 typeset -a tags
166 typeset -a tags
167 local tag rev
167 local tag rev
168
168
169 _hg_cmd tags 2> /dev/null | while read tag
169 _hg_cmd tags 2> /dev/null | while read tag
170 do
170 do
171 tags+=(${tag/ # [0-9]#:*})
171 tags+=(${tag/ # [0-9]#:*})
172 done
172 done
173 (( $#tags )) && _describe -t tags 'tags' tags
173 (( $#tags )) && _describe -t tags 'tags' tags
174 }
174 }
175
175
176 _hg_files() {
176 _hg_files() {
177 if [[ -n "$_hg_root" ]]
177 if [[ -n "$_hg_root" ]]
178 then
178 then
179 [[ -d "$_hg_root/.hg" ]] || return
179 [[ -d "$_hg_root/.hg" ]] || return
180 case "$_hg_root" in
180 case "$_hg_root" in
181 /*)
181 /*)
182 _files -W $_hg_root
182 _files -W $_hg_root
183 ;;
183 ;;
184 *)
184 *)
185 _files -W $PWD/$_hg_root
185 _files -W $PWD/$_hg_root
186 ;;
186 ;;
187 esac
187 esac
188 else
188 else
189 _files
189 _files
190 fi
190 fi
191 }
191 }
192
192
193 _hg_status() {
193 _hg_status() {
194 [[ -d $PREFIX ]] || PREFIX=$PREFIX:h
194 [[ -d $PREFIX ]] || PREFIX=$PREFIX:h
195 status_files=(${(ps:\0:)"$(_hg_cmd status -0n$1 ./$PREFIX 2>/dev/null)"})
195 status_files=(${(ps:\0:)"$(_hg_cmd status -0n$1 ./$PREFIX 2>/dev/null)"})
196 }
196 }
197
197
198 _hg_unknown() {
198 _hg_unknown() {
199 typeset -a status_files
199 typeset -a status_files
200 _hg_status u
200 _hg_status u
201 _wanted files expl 'unknown files' _multi_parts / status_files
201 _wanted files expl 'unknown files' _multi_parts / status_files
202 }
202 }
203
203
204 _hg_missing() {
204 _hg_missing() {
205 typeset -a status_files
205 typeset -a status_files
206 _hg_status d
206 _hg_status d
207 _wanted files expl 'missing files' _multi_parts / status_files
207 _wanted files expl 'missing files' _multi_parts / status_files
208 }
208 }
209
209
210 _hg_modified() {
210 _hg_modified() {
211 typeset -a status_files
211 typeset -a status_files
212 _hg_status m
212 _hg_status m
213 _wanted files expl 'modified files' _multi_parts / status_files
213 _wanted files expl 'modified files' _multi_parts / status_files
214 }
214 }
215
215
216 _hg_resolve() {
216 _hg_resolve() {
217 local rstate rpah
217 local rstate rpah
218
218
219 [[ -d $PREFIX ]] || PREFIX=$PREFIX:h
219 [[ -d $PREFIX ]] || PREFIX=$PREFIX:h
220
220
221 _hg_cmd resolve -l ./$PREFIX 2> /dev/null | while read rstate rpath
221 _hg_cmd resolve -l ./$PREFIX 2> /dev/null | while read rstate rpath
222 do
222 do
223 [[ $rstate == 'R' ]] && resolved_files+=($rpath)
223 [[ $rstate == 'R' ]] && resolved_files+=($rpath)
224 [[ $rstate == 'U' ]] && unresolved_files+=($rpath)
224 [[ $rstate == 'U' ]] && unresolved_files+=($rpath)
225 done
225 done
226 }
226 }
227
227
228 _hg_resolved() {
228 _hg_resolved() {
229 typeset -a resolved_files unresolved_files
229 typeset -a resolved_files unresolved_files
230 _hg_resolve
230 _hg_resolve
231 _wanted files expl 'resolved files' _multi_parts / resolved_files
231 _wanted files expl 'resolved files' _multi_parts / resolved_files
232 }
232 }
233
233
234 _hg_unresolved() {
234 _hg_unresolved() {
235 typeset -a resolved_files unresolved_files
235 typeset -a resolved_files unresolved_files
236 _hg_resolve
236 _hg_resolve
237 _wanted files expl 'unresolved files' _multi_parts / unresolved_files
237 _wanted files expl 'unresolved files' _multi_parts / unresolved_files
238 }
238 }
239
239
240 _hg_config() {
240 _hg_config() {
241 typeset -a items
241 typeset -a items
242 items=(${${(%f)"$(_call_program hg hg showconfig)"}%%\=*})
242 items=(${${(%f)"$(_call_program hg hg showconfig)"}%%\=*})
243 (( $#items )) && _describe -t config 'config item' items
243 (( $#items )) && _describe -t config 'config item' items
244 }
244 }
245
245
246 _hg_addremove() {
246 _hg_addremove() {
247 _alternative 'files:unknown files:_hg_unknown' \
247 _alternative 'files:unknown files:_hg_unknown' \
248 'files:missing files:_hg_missing'
248 'files:missing files:_hg_missing'
249 }
249 }
250
250
251 _hg_ssh_urls() {
251 _hg_ssh_urls() {
252 if [[ -prefix */ ]]
252 if [[ -prefix */ ]]
253 then
253 then
254 if zstyle -T ":completion:${curcontext}:files" remote-access
254 if zstyle -T ":completion:${curcontext}:files" remote-access
255 then
255 then
256 local host=${PREFIX%%/*}
256 local host=${PREFIX%%/*}
257 typeset -a remdirs
257 typeset -a remdirs
258 compset -p $(( $#host + 1 ))
258 compset -p $(( $#host + 1 ))
259 local rempath=${(M)PREFIX##*/}
259 local rempath=${(M)PREFIX##*/}
260 local cacheid="hg:${host}-${rempath//\//_}"
260 local cacheid="hg:${host}-${rempath//\//_}"
261 cacheid=${cacheid%[-_]}
261 cacheid=${cacheid%[-_]}
262 compset -P '*/'
262 compset -P '*/'
263 if _cache_invalid "$cacheid" || ! _retrieve_cache "$cacheid"
263 if _cache_invalid "$cacheid" || ! _retrieve_cache "$cacheid"
264 then
264 then
265 remdirs=(${${(M)${(f)"$(_call_program files ssh -a -x $host ls -1FL "${(q)rempath}" 2> /dev/null)"}##*/}%/})
265 remdirs=(${${(M)${(f)"$(_call_program files ssh -a -x $host ls -1FL "${(q)rempath}" 2> /dev/null)"}##*/}%/})
266 _store_cache "$cacheid" remdirs
266 _store_cache "$cacheid" remdirs
267 fi
267 fi
268 _describe -t directories 'remote directory' remdirs -S/
268 _describe -t directories 'remote directory' remdirs -S/
269 else
269 else
270 _message 'remote directory'
270 _message 'remote directory'
271 fi
271 fi
272 else
272 else
273 if compset -P '*@'
273 if compset -P '*@'
274 then
274 then
275 _hosts -S/
275 _hosts -S/
276 else
276 else
277 _alternative 'hosts:remote host name:_hosts -S/' \
277 _alternative 'hosts:remote host name:_hosts -S/' \
278 'users:user:_users -S@'
278 'users:user:_users -S@'
279 fi
279 fi
280 fi
280 fi
281 }
281 }
282
282
283 _hg_urls() {
283 _hg_urls() {
284 if compset -P bundle://
284 if compset -P bundle://
285 then
285 then
286 _files
286 _files
287 elif compset -P ssh://
287 elif compset -P ssh://
288 then
288 then
289 _hg_ssh_urls
289 _hg_ssh_urls
290 elif [[ -prefix *: ]]
290 elif [[ -prefix *: ]]
291 then
291 then
292 _urls
292 _urls
293 else
293 else
294 local expl
294 local expl
295 compset -S '[^:]*'
295 compset -S '[^:]*'
296 _wanted url-schemas expl 'URL schema' compadd -S '' - \
296 _wanted url-schemas expl 'URL schema' compadd -S '' - \
297 http:// https:// ssh:// bundle://
297 http:// https:// ssh:// bundle://
298 fi
298 fi
299 }
299 }
300
300
301 _hg_paths() {
301 _hg_paths() {
302 typeset -a paths pnames
302 typeset -a paths pnames
303 _hg_cmd paths 2> /dev/null | while read -A pnames
303 _hg_cmd paths 2> /dev/null | while read -A pnames
304 do
304 do
305 paths+=($pnames[1])
305 paths+=($pnames[1])
306 done
306 done
307 (( $#paths )) && _describe -t path-aliases 'repository alias' paths
307 (( $#paths )) && _describe -t path-aliases 'repository alias' paths
308 }
308 }
309
309
310 _hg_remote() {
310 _hg_remote() {
311 _alternative 'path-aliases:repository alias:_hg_paths' \
311 _alternative 'path-aliases:repository alias:_hg_paths' \
312 'directories:directory:_files -/' \
312 'directories:directory:_files -/' \
313 'urls:URL:_hg_urls'
313 'urls:URL:_hg_urls'
314 }
314 }
315
315
316 _hg_clone_dest() {
316 _hg_clone_dest() {
317 _alternative 'directories:directory:_files -/' \
317 _alternative 'directories:directory:_files -/' \
318 'urls:URL:_hg_urls'
318 'urls:URL:_hg_urls'
319 }
319 }
320
320
321 # Common options
321 # Common options
322 _hg_global_opts=(
322 _hg_global_opts=(
323 '(--repository -R)'{-R+,--repository}'[repository root directory]:repository:_files -/'
323 '(--repository -R)'{-R+,--repository}'[repository root directory]:repository:_files -/'
324 '--cwd[change working directory]:new working directory:_files -/'
324 '--cwd[change working directory]:new working directory:_files -/'
325 '(--noninteractive -y)'{-y,--noninteractive}'[do not prompt, assume yes for any required answers]'
325 '(--noninteractive -y)'{-y,--noninteractive}'[do not prompt, assume yes for any required answers]'
326 '(--verbose -v)'{-v,--verbose}'[enable additional output]'
326 '(--verbose -v)'{-v,--verbose}'[enable additional output]'
327 '*--config[set/override config option]:defined config items:_hg_config'
327 '*--config[set/override config option]:defined config items:_hg_config'
328 '(--quiet -q)'{-q,--quiet}'[suppress output]'
328 '(--quiet -q)'{-q,--quiet}'[suppress output]'
329 '(--help -h)'{-h,--help}'[display help and exit]'
329 '(--help -h)'{-h,--help}'[display help and exit]'
330 '--debug[debug mode]'
330 '--debug[debug mode]'
331 '--debugger[start debugger]'
331 '--debugger[start debugger]'
332 '--encoding[set the charset encoding (default: UTF8)]'
332 '--encoding[set the charset encoding (default: UTF8)]'
333 '--encodingmode[set the charset encoding mode (default: strict)]'
333 '--encodingmode[set the charset encoding mode (default: strict)]'
334 '--lsprof[print improved command execution profile]'
334 '--lsprof[print improved command execution profile]'
335 '--traceback[print traceback on exception]'
335 '--traceback[print traceback on exception]'
336 '--time[time how long the command takes]'
336 '--time[time how long the command takes]'
337 '--profile[profile]'
337 '--profile[profile]'
338 '--version[output version information and exit]'
338 '--version[output version information and exit]'
339 )
339 )
340
340
341 _hg_pat_opts=(
341 _hg_pat_opts=(
342 '*'{-I+,--include}'[include names matching the given patterns]:dir:_files -W $(_hg_cmd root) -/'
342 '*'{-I+,--include}'[include names matching the given patterns]:dir:_files -W $(_hg_cmd root) -/'
343 '*'{-X+,--exclude}'[exclude names matching the given patterns]:dir:_files -W $(_hg_cmd root) -/')
343 '*'{-X+,--exclude}'[exclude names matching the given patterns]:dir:_files -W $(_hg_cmd root) -/')
344
344
345 _hg_diff_opts=(
345 _hg_diff_opts=(
346 '(--text -a)'{-a,--text}'[treat all files as text]'
346 '(--text -a)'{-a,--text}'[treat all files as text]'
347 '(--git -g)'{-g,--git}'[use git extended diff format]'
347 '(--git -g)'{-g,--git}'[use git extended diff format]'
348 "--nodates[don't include dates in diff headers]")
348 "--nodates[don't include dates in diff headers]")
349
349
350 _hg_dryrun_opts=(
350 _hg_dryrun_opts=(
351 '(--dry-run -n)'{-n,--dry-run}'[do not perform actions, just print output]')
351 '(--dry-run -n)'{-n,--dry-run}'[do not perform actions, just print output]')
352
352
353 _hg_style_opts=(
353 _hg_style_opts=(
354 '--style[display using template map file]:'
354 '--style[display using template map file]:'
355 '--template[display with template]:')
355 '--template[display with template]:')
356
356
357 _hg_commit_opts=(
357 _hg_commit_opts=(
358 '(-m --message -l --logfile --edit -e)'{-e,--edit}'[edit commit message]'
358 '(-m --message -l --logfile --edit -e)'{-e,--edit}'[edit commit message]'
359 '(-e --edit -l --logfile --message -m)'{-m+,--message}'[use <text> as commit message]:message:'
359 '(-e --edit -l --logfile --message -m)'{-m+,--message}'[use <text> as commit message]:message:'
360 '(-e --edit -m --message --logfile -l)'{-l+,--logfile}'[read the commit message from <file>]:log file:_files')
360 '(-e --edit -m --message --logfile -l)'{-l+,--logfile}'[read the commit message from <file>]:log file:_files')
361
361
362 _hg_remote_opts=(
362 _hg_remote_opts=(
363 '(--ssh -e)'{-e+,--ssh}'[specify ssh command to use]:'
363 '(--ssh -e)'{-e+,--ssh}'[specify ssh command to use]:'
364 '--remotecmd[specify hg command to run on the remote side]:')
364 '--remotecmd[specify hg command to run on the remote side]:')
365
365
366 _hg_cmd() {
366 _hg_cmd() {
367 _call_program hg hg "$_hg_cmd_globals[@]" "$@"
367 _call_program hg hg "$_hg_cmd_globals[@]" "$@"
368 }
368 }
369
369
370 _hg_cmd_add() {
370 _hg_cmd_add() {
371 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \
371 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \
372 '*:unknown files:_hg_unknown'
372 '*:unknown files:_hg_unknown'
373 }
373 }
374
374
375 _hg_cmd_addremove() {
375 _hg_cmd_addremove() {
376 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \
376 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \
377 '(--similarity -s)'{-s+,--similarity}'[guess renamed files by similarity (0<=s<=100)]:' \
377 '(--similarity -s)'{-s+,--similarity}'[guess renamed files by similarity (0<=s<=100)]:' \
378 '*:unknown or missing files:_hg_addremove'
378 '*:unknown or missing files:_hg_addremove'
379 }
379 }
380
380
381 _hg_cmd_annotate() {
381 _hg_cmd_annotate() {
382 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
382 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
383 '(--rev -r)'{-r+,--rev}'[annotate the specified revision]:revision:_hg_tags' \
383 '(--rev -r)'{-r+,--rev}'[annotate the specified revision]:revision:_hg_tags' \
384 '(--follow -f)'{-f,--follow}'[follow file copies and renames]' \
384 '(--follow -f)'{-f,--follow}'[follow file copies and renames]' \
385 '(--text -a)'{-a,--text}'[treat all files as text]' \
385 '(--text -a)'{-a,--text}'[treat all files as text]' \
386 '(--user -u)'{-u,--user}'[list the author]' \
386 '(--user -u)'{-u,--user}'[list the author]' \
387 '(--date -d)'{-d,--date}'[list the date]' \
387 '(--date -d)'{-d,--date}'[list the date]' \
388 '(--number -n)'{-n,--number}'[list the revision number (default)]' \
388 '(--number -n)'{-n,--number}'[list the revision number (default)]' \
389 '(--changeset -c)'{-c,--changeset}'[list the changeset]' \
389 '(--changeset -c)'{-c,--changeset}'[list the changeset]' \
390 '*:files:_hg_files'
390 '*:files:_hg_files'
391 }
391 }
392
392
393 _hg_cmd_archive() {
393 _hg_cmd_archive() {
394 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
394 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
395 '--no-decode[do not pass files through decoders]' \
395 '--no-decode[do not pass files through decoders]' \
396 '(--prefix -p)'{-p+,--prefix}'[directory prefix for files in archive]:' \
396 '(--prefix -p)'{-p+,--prefix}'[directory prefix for files in archive]:' \
397 '(--rev -r)'{-r+,--rev}'[revision to distribute]:revision:_hg_tags' \
397 '(--rev -r)'{-r+,--rev}'[revision to distribute]:revision:_hg_tags' \
398 '(--type -t)'{-t+,--type}'[type of distribution to create]:archive type:(files tar tbz2 tgz uzip zip)' \
398 '(--type -t)'{-t+,--type}'[type of distribution to create]:archive type:(files tar tbz2 tgz uzip zip)' \
399 '*:destination:_files'
399 '*:destination:_files'
400 }
400 }
401
401
402 _hg_cmd_backout() {
402 _hg_cmd_backout() {
403 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
403 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
404 '--merge[merge with old dirstate parent after backout]' \
404 '--merge[merge with old dirstate parent after backout]' \
405 '(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \
405 '(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \
406 '--parent[parent to choose when backing out merge]' \
406 '--parent[parent to choose when backing out merge]' \
407 '(--user -u)'{-u+,--user}'[record user as commiter]:user:' \
407 '(--user -u)'{-u+,--user}'[record user as commiter]:user:' \
408 '(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_tags' \
408 '(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_tags' \
409 '(--message -m)'{-m+,--message}'[use <text> as commit message]:text:' \
409 '(--message -m)'{-m+,--message}'[use <text> as commit message]:text:' \
410 '(--logfile -l)'{-l+,--logfile}'[read commit message from <file>]:log file:_files -g \*.txt'
410 '(--logfile -l)'{-l+,--logfile}'[read commit message from <file>]:log file:_files -g \*.txt'
411 }
411 }
412
412
413 _hg_cmd_bundle() {
413 _hg_cmd_bundle() {
414 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \
414 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \
415 '(--force -f)'{-f,--force}'[run even when remote repository is unrelated]' \
415 '(--force -f)'{-f,--force}'[run even when remote repository is unrelated]' \
416 '(2)*--base[a base changeset to specify instead of a destination]:revision:_hg_tags' \
416 '(2)*--base[a base changeset to specify instead of a destination]:revision:_hg_tags' \
417 ':output file:_files' \
417 ':output file:_files' \
418 ':destination repository:_files -/'
418 ':destination repository:_files -/'
419 }
419 }
420
420
421 _hg_cmd_cat() {
421 _hg_cmd_cat() {
422 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
422 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
423 '(--output -o)'{-o+,--output}'[print output to file with formatted name]:filespec:' \
423 '(--output -o)'{-o+,--output}'[print output to file with formatted name]:filespec:' \
424 '(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_tags' \
424 '(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_tags' \
425 '*:file:_hg_files'
425 '*:file:_hg_files'
426 }
426 }
427
427
428 _hg_cmd_clone() {
428 _hg_cmd_clone() {
429 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \
429 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \
430 '(--noupdate -U)'{-U,--noupdate}'[do not update the new working directory]' \
430 '(--noupdate -U)'{-U,--noupdate}'[do not update the new working directory]' \
431 '(--rev -r)'{-r+,--rev}'[a changeset you would like to have after cloning]:' \
431 '(--rev -r)'{-r+,--rev}'[a changeset you would like to have after cloning]:' \
432 '--uncompressed[use uncompressed transfer (fast over LAN)]' \
432 '--uncompressed[use uncompressed transfer (fast over LAN)]' \
433 ':source repository:_hg_remote' \
433 ':source repository:_hg_remote' \
434 ':destination:_hg_clone_dest'
434 ':destination:_hg_clone_dest'
435 }
435 }
436
436
437 _hg_cmd_commit() {
437 _hg_cmd_commit() {
438 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
438 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
439 '(--addremove -A)'{-A,--addremove}'[mark new/missing files as added/removed before committing]' \
439 '(--addremove -A)'{-A,--addremove}'[mark new/missing files as added/removed before committing]' \
440 '(--message -m)'{-m+,--message}'[use <text> as commit message]:text:' \
440 '(--message -m)'{-m+,--message}'[use <text> as commit message]:text:' \
441 '(--logfile -l)'{-l+,--logfile}'[read commit message from <file>]:log file:_files -g \*.txt' \
441 '(--logfile -l)'{-l+,--logfile}'[read commit message from <file>]:log file:_files -g \*.txt' \
442 '(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \
442 '(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \
443 '(--user -u)'{-u+,--user}'[record user as commiter]:user:' \
443 '(--user -u)'{-u+,--user}'[record user as commiter]:user:' \
444 '*:file:_hg_files'
444 '*:file:_hg_files'
445 }
445 }
446
446
447 _hg_cmd_copy() {
447 _hg_cmd_copy() {
448 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \
448 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \
449 '(--after -A)'{-A,--after}'[record a copy that has already occurred]' \
449 '(--after -A)'{-A,--after}'[record a copy that has already occurred]' \
450 '(--force -f)'{-f,--force}'[forcibly copy over an existing managed file]' \
450 '(--force -f)'{-f,--force}'[forcibly copy over an existing managed file]' \
451 '*:file:_hg_files'
451 '*:file:_hg_files'
452 }
452 }
453
453
454 _hg_cmd_diff() {
454 _hg_cmd_diff() {
455 typeset -A opt_args
455 typeset -A opt_args
456 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_diff_opts \
456 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_diff_opts \
457 '*'{-r,--rev}'+[revision]:revision:_hg_revrange' \
457 '*'{-r,--rev}'+[revision]:revision:_hg_revrange' \
458 '(--show-function -p)'{-p,--show-function}'[show which function each change is in]' \
458 '(--show-function -p)'{-p,--show-function}'[show which function each change is in]' \
459 '(--ignore-all-space -w)'{-w,--ignore-all-space}'[ignore white space when comparing lines]' \
459 '(--ignore-all-space -w)'{-w,--ignore-all-space}'[ignore white space when comparing lines]' \
460 '(--ignore-space-change -b)'{-b,--ignore-space-change}'[ignore changes in the amount of white space]' \
460 '(--ignore-space-change -b)'{-b,--ignore-space-change}'[ignore changes in the amount of white space]' \
461 '(--ignore-blank-lines -B)'{-B,--ignore-blank-lines}'[ignore changes whose lines are all blank]' \
461 '(--ignore-blank-lines -B)'{-B,--ignore-blank-lines}'[ignore changes whose lines are all blank]' \
462 '*:file:->diff_files'
462 '*:file:->diff_files'
463
463
464 if [[ $state == 'diff_files' ]]
464 if [[ $state == 'diff_files' ]]
465 then
465 then
466 if [[ -n $opt_args[-r] ]]
466 if [[ -n $opt_args[-r] ]]
467 then
467 then
468 _hg_files
468 _hg_files
469 else
469 else
470 _hg_modified
470 _hg_modified
471 fi
471 fi
472 fi
472 fi
473 }
473 }
474
474
475 _hg_cmd_export() {
475 _hg_cmd_export() {
476 _arguments -s -w : $_hg_global_opts $_hg_diff_opts \
476 _arguments -s -w : $_hg_global_opts $_hg_diff_opts \
477 '(--outout -o)'{-o+,--output}'[print output to file with formatted name]:filespec:' \
477 '(--outout -o)'{-o+,--output}'[print output to file with formatted name]:filespec:' \
478 '--switch-parent[diff against the second parent]' \
478 '--switch-parent[diff against the second parent]' \
479 '*:revision:_hg_tags'
479 '*:revision:_hg_tags'
480 }
480 }
481
481
482 _hg_cmd_grep() {
482 _hg_cmd_grep() {
483 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
483 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
484 '(--print0 -0)'{-0,--print0}'[end filenames with NUL]' \
484 '(--print0 -0)'{-0,--print0}'[end filenames with NUL]' \
485 '--all[print all revisions with matches]' \
485 '--all[print all revisions with matches]' \
486 '(--follow -f)'{-f,--follow}'[follow changeset or file history]' \
486 '(--follow -f)'{-f,--follow}'[follow changeset or file history]' \
487 '(--ignore-case -i)'{-i,--ignore-case}'[ignore case when matching]' \
487 '(--ignore-case -i)'{-i,--ignore-case}'[ignore case when matching]' \
488 '(--files-with-matches -l)'{-l,--files-with-matches}'[print only filenames and revs that match]' \
488 '(--files-with-matches -l)'{-l,--files-with-matches}'[print only filenames and revs that match]' \
489 '(--line-number -n)'{-n,--line-number}'[print matching line numbers]' \
489 '(--line-number -n)'{-n,--line-number}'[print matching line numbers]' \
490 '*'{-r+,--rev}'[search in given revision range]:revision:_hg_revrange' \
490 '*'{-r+,--rev}'[search in given revision range]:revision:_hg_revrange' \
491 '(--user -u)'{-u,--user}'[print user who committed change]' \
491 '(--user -u)'{-u,--user}'[print user who committed change]' \
492 '1:search pattern:' \
492 '1:search pattern:' \
493 '*:files:_hg_files'
493 '*:files:_hg_files'
494 }
494 }
495
495
496 _hg_cmd_heads() {
496 _hg_cmd_heads() {
497 _arguments -s -w : $_hg_global_opts $_hg_style_opts \
497 _arguments -s -w : $_hg_global_opts $_hg_style_opts \
498 '(--rev -r)'{-r+,--rev}'[show only heads which are descendants of rev]:revision:_hg_tags'
498 '(--rev -r)'{-r+,--rev}'[show only heads which are descendants of rev]:revision:_hg_tags'
499 }
499 }
500
500
501 _hg_cmd_help() {
501 _hg_cmd_help() {
502 _arguments -s -w : $_hg_global_opts \
502 _arguments -s -w : $_hg_global_opts \
503 '*:mercurial command:_hg_commands'
503 '*:mercurial command:_hg_commands'
504 }
504 }
505
505
506 _hg_cmd_identify() {
506 _hg_cmd_identify() {
507 _arguments -s -w : $_hg_global_opts \
507 _arguments -s -w : $_hg_global_opts \
508 '(--rev -r)'{-r+,--rev}'[identify the specified rev]:revision:_hg_tags' \
508 '(--rev -r)'{-r+,--rev}'[identify the specified rev]:revision:_hg_tags' \
509 '(--num -n)'{-n+,--num}'[show local revision number]' \
509 '(--num -n)'{-n+,--num}'[show local revision number]' \
510 '(--id -i)'{-i+,--id}'[show global revision id]' \
510 '(--id -i)'{-i+,--id}'[show global revision id]' \
511 '(--branch -b)'{-b+,--branch}'[show branch]' \
511 '(--branch -b)'{-b+,--branch}'[show branch]' \
512 '(--tags -t)'{-t+,--tags}'[show tags]'
512 '(--tags -t)'{-t+,--tags}'[show tags]'
513 }
513 }
514
514
515 _hg_cmd_import() {
515 _hg_cmd_import() {
516 _arguments -s -w : $_hg_global_opts \
516 _arguments -s -w : $_hg_global_opts \
517 '(--strip -p)'{-p+,--strip}'[directory strip option for patch (default: 1)]:count:' \
517 '(--strip -p)'{-p+,--strip}'[directory strip option for patch (default: 1)]:count:' \
518 '(--message -m)'{-m+,--message}'[use <text> as commit message]:text:' \
518 '(--message -m)'{-m+,--message}'[use <text> as commit message]:text:' \
519 '(--force -f)'{-f,--force}'[skip check for outstanding uncommitted changes]' \
519 '(--force -f)'{-f,--force}'[skip check for outstanding uncommitted changes]' \
520 '*:patch:_files'
520 '*:patch:_files'
521 }
521 }
522
522
523 _hg_cmd_incoming() {
523 _hg_cmd_incoming() {
524 _arguments -s -w : $_hg_global_opts $_hg_remote_opts $_hg_style_opts \
524 _arguments -s -w : $_hg_global_opts $_hg_remote_opts $_hg_style_opts \
525 '(--no-merges -M)'{-M,--no-merges}'[do not show merge revisions]' \
525 '(--no-merges -M)'{-M,--no-merges}'[do not show merge revisions]' \
526 '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \
526 '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \
527 '(--patch -p)'{-p,--patch}'[show patch]' \
527 '(--patch -p)'{-p,--patch}'[show patch]' \
528 '(--rev -r)'{-r+,--rev}'[a specific revision up to which you would like to pull]:revision:_hg_tags' \
528 '(--rev -r)'{-r+,--rev}'[a specific revision up to which you would like to pull]:revision:_hg_tags' \
529 '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \
529 '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \
530 '--bundle[file to store the bundles into]:bundle file:_files' \
530 '--bundle[file to store the bundles into]:bundle file:_files' \
531 ':source:_hg_remote'
531 ':source:_hg_remote'
532 }
532 }
533
533
534 _hg_cmd_init() {
534 _hg_cmd_init() {
535 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \
535 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \
536 ':dir:_files -/'
536 ':dir:_files -/'
537 }
537 }
538
538
539 _hg_cmd_locate() {
539 _hg_cmd_locate() {
540 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
540 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
541 '(--rev -r)'{-r+,--rev}'[search repository as it stood at revision]:revision:_hg_tags' \
541 '(--rev -r)'{-r+,--rev}'[search repository as it stood at revision]:revision:_hg_tags' \
542 '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \
542 '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \
543 '(--fullpath -f)'{-f,--fullpath}'[print complete paths]' \
543 '(--fullpath -f)'{-f,--fullpath}'[print complete paths]' \
544 '*:search pattern:_hg_files'
544 '*:search pattern:_hg_files'
545 }
545 }
546
546
547 _hg_cmd_log() {
547 _hg_cmd_log() {
548 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_style_opts \
548 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_style_opts \
549 '(--follow --follow-first -f)'{-f,--follow}'[follow changeset or history]' \
549 '(--follow --follow-first -f)'{-f,--follow}'[follow changeset or history]' \
550 '(-f --follow)--follow-first[only follow the first parent of merge changesets]' \
550 '(-f --follow)--follow-first[only follow the first parent of merge changesets]' \
551 '(--copies -C)'{-C,--copies}'[show copied files]' \
551 '(--copies -C)'{-C,--copies}'[show copied files]' \
552 '(--keyword -k)'{-k+,--keyword}'[search for a keyword]:' \
552 '(--keyword -k)'{-k+,--keyword}'[search for a keyword]:' \
553 '(--limit -l)'{-l+,--limit}'[limit number of changes displayed]:' \
553 '(--limit -l)'{-l+,--limit}'[limit number of changes displayed]:' \
554 '*'{-r,--rev}'[show the specified revision or range]:revision:_hg_revrange' \
554 '*'{-r,--rev}'[show the specified revision or range]:revision:_hg_revrange' \
555 '(--no-merges -M)'{-M,--no-merges}'[do not show merges]' \
555 '(--no-merges -M)'{-M,--no-merges}'[do not show merges]' \
556 '(--only-merges -m)'{-m,--only-merges}'[show only merges]' \
556 '(--only-merges -m)'{-m,--only-merges}'[show only merges]' \
557 '(--patch -p)'{-p,--patch}'[show patch]' \
557 '(--patch -p)'{-p,--patch}'[show patch]' \
558 '(--prune -P)'{-P+,--prune}'[do not display revision or any of its ancestors]:revision:_hg_tags' \
558 '(--prune -P)'{-P+,--prune}'[do not display revision or any of its ancestors]:revision:_hg_tags' \
559 '*:files:_hg_files'
559 '*:files:_hg_files'
560 }
560 }
561
561
562 _hg_cmd_manifest() {
562 _hg_cmd_manifest() {
563 _arguments -s -w : $_hg_global_opts \
563 _arguments -s -w : $_hg_global_opts \
564 ':revision:_hg_tags'
564 ':revision:_hg_tags'
565 }
565 }
566
566
567 _hg_cmd_outgoing() {
567 _hg_cmd_outgoing() {
568 _arguments -s -w : $_hg_global_opts $_hg_remote_opts $_hg_style_opts \
568 _arguments -s -w : $_hg_global_opts $_hg_remote_opts $_hg_style_opts \
569 '(--no-merges -M)'{-M,--no-merges}'[do not show merge revisions]' \
569 '(--no-merges -M)'{-M,--no-merges}'[do not show merge revisions]' \
570 '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \
570 '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \
571 '(--patch -p)'{-p,--patch}'[show patch]' \
571 '(--patch -p)'{-p,--patch}'[show patch]' \
572 '(--rev -r)'{-r+,--rev}'[a specific revision you would like to push]' \
572 '(--rev -r)'{-r+,--rev}'[a specific revision you would like to push]' \
573 '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \
573 '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \
574 ':destination:_hg_remote'
574 ':destination:_hg_remote'
575 }
575 }
576
576
577 _hg_cmd_parents() {
577 _hg_cmd_parents() {
578 _arguments -s -w : $_hg_global_opts $_hg_style_opts \
578 _arguments -s -w : $_hg_global_opts $_hg_style_opts \
579 '(--rev -r)'{-r+,--rev}'[show parents of the specified rev]:revision:_hg_tags' \
579 '(--rev -r)'{-r+,--rev}'[show parents of the specified rev]:revision:_hg_tags' \
580 ':last modified file:_hg_files'
580 ':last modified file:_hg_files'
581 }
581 }
582
582
583 _hg_cmd_paths() {
583 _hg_cmd_paths() {
584 _arguments -s -w : $_hg_global_opts \
584 _arguments -s -w : $_hg_global_opts \
585 ':path:_hg_paths'
585 ':path:_hg_paths'
586 }
586 }
587
587
588 _hg_cmd_pull() {
588 _hg_cmd_pull() {
589 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \
589 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \
590 '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \
590 '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \
591 '(--update -u)'{-u,--update}'[update to new tip if changesets were pulled]' \
591 '(--update -u)'{-u,--update}'[update to new tip if changesets were pulled]' \
592 '(--rev -r)'{-r+,--rev}'[a specific revision up to which you would like to pull]:revision:' \
592 '(--rev -r)'{-r+,--rev}'[a specific revision up to which you would like to pull]:revision:' \
593 ':source:_hg_remote'
593 ':source:_hg_remote'
594 }
594 }
595
595
596 _hg_cmd_push() {
596 _hg_cmd_push() {
597 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \
597 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \
598 '(--force -f)'{-f,--force}'[force push]' \
598 '(--force -f)'{-f,--force}'[force push]' \
599 '(--rev -r)'{-r+,--rev}'[a specific revision you would like to push]:revision:_hg_tags' \
599 '(--rev -r)'{-r+,--rev}'[a specific revision you would like to push]:revision:_hg_tags' \
600 ':destination:_hg_remote'
600 ':destination:_hg_remote'
601 }
601 }
602
602
603 _hg_cmd_remove() {
603 _hg_cmd_remove() {
604 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
604 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
605 '(--after -A)'{-A,--after}'[record remove that has already occurred]' \
605 '(--after -A)'{-A,--after}'[record remove that has already occurred]' \
606 '(--force -f)'{-f,--force}'[remove file even if modified]' \
606 '(--force -f)'{-f,--force}'[remove file even if modified]' \
607 '*:file:_hg_files'
607 '*:file:_hg_files'
608 }
608 }
609
609
610 _hg_cmd_rename() {
610 _hg_cmd_rename() {
611 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \
611 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \
612 '(--after -A)'{-A,--after}'[record a rename that has already occurred]' \
612 '(--after -A)'{-A,--after}'[record a rename that has already occurred]' \
613 '(--force -f)'{-f,--force}'[forcibly copy over an existing managed file]' \
613 '(--force -f)'{-f,--force}'[forcibly copy over an existing managed file]' \
614 '*:file:_hg_files'
614 '*:file:_hg_files'
615 }
615 }
616
616
617 _hg_cmd_resolve() {
617 _hg_cmd_resolve() {
618 local context state line
618 local context state line
619 typeset -A opt_args
619 typeset -A opt_args
620
620
621 _arguments -s -w : $_hg_global_opts \
621 _arguments -s -w : $_hg_global_opts \
622 '(--list -l --mark -m --unmark -u)'{-l,--list}'[list state of files needing merge]:*:merged files:->resolve_files' \
622 '(--list -l --mark -m --unmark -u)'{-l,--list}'[list state of files needing merge]:*:merged files:->resolve_files' \
623 '(--mark -m --list -l --unmark -u)'{-m,--mark}'[mark files as resolved]:*:unresolved files:_hg_unresolved' \
623 '(--mark -m --list -l --unmark -u)'{-m,--mark}'[mark files as resolved]:*:unresolved files:_hg_unresolved' \
624 '(--unmark -u --list -l --mark -m)'{-u,--unmark}'[unmark files as resolved]:*:resolved files:_hg_resolved' \
624 '(--unmark -u --list -l --mark -m)'{-u,--unmark}'[unmark files as resolved]:*:resolved files:_hg_resolved' \
625 '*:file:_hg_unresolved'
625 '*:file:_hg_unresolved'
626
626
627 if [[ $state == 'resolve_files' ]]
627 if [[ $state == 'resolve_files' ]]
628 then
628 then
629 _alternative 'files:resolved files:_hg_resolved' \
629 _alternative 'files:resolved files:_hg_resolved' \
630 'files:unresolved files:_hg_unresolved'
630 'files:unresolved files:_hg_unresolved'
631 fi
631 fi
632 }
632 }
633
633
634 _hg_cmd_revert() {
634 _hg_cmd_revert() {
635 local context state line
635 local context state line
636 typeset -A opt_args
636 typeset -A opt_args
637
637
638 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \
638 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \
639 '(--all -a :)'{-a,--all}'[revert all changes when no arguments given]' \
639 '(--all -a :)'{-a,--all}'[revert all changes when no arguments given]' \
640 '(--rev -r)'{-r+,--rev}'[revision to revert to]:revision:_hg_tags' \
640 '(--rev -r)'{-r+,--rev}'[revision to revert to]:revision:_hg_tags' \
641 '--no-backup[do not save backup copies of files]' \
641 '--no-backup[do not save backup copies of files]' \
642 '*:file:->diff_files'
642 '*:file:->diff_files'
643
643
644 if [[ $state == 'diff_files' ]]
644 if [[ $state == 'diff_files' ]]
645 then
645 then
646 if [[ -n $opt_args[-r] ]]
646 if [[ -n $opt_args[-r] ]]
647 then
647 then
648 _hg_files
648 _hg_files
649 else
649 else
650 typeset -a status_files
650 typeset -a status_files
651 _hg_status mard
651 _hg_status mard
652 _wanted files expl 'modified, added, removed or deleted file' _multi_parts / status_files
652 _wanted files expl 'modified, added, removed or deleted file' _multi_parts / status_files
653 fi
653 fi
654 fi
654 fi
655 }
655 }
656
656
657 _hg_cmd_serve() {
657 _hg_cmd_serve() {
658 _arguments -s -w : $_hg_global_opts \
658 _arguments -s -w : $_hg_global_opts \
659 '(--accesslog -A)'{-A+,--accesslog}'[name of access log file]:log file:_files' \
659 '(--accesslog -A)'{-A+,--accesslog}'[name of access log file]:log file:_files' \
660 '(--errorlog -E)'{-E+,--errorlog}'[name of error log file]:log file:_files' \
660 '(--errorlog -E)'{-E+,--errorlog}'[name of error log file]:log file:_files' \
661 '(--daemon -d)'{-d,--daemon}'[run server in background]' \
661 '(--daemon -d)'{-d,--daemon}'[run server in background]' \
662 '(--port -p)'{-p+,--port}'[listen port]:listen port:' \
662 '(--port -p)'{-p+,--port}'[listen port]:listen port:' \
663 '(--address -a)'{-a+,--address}'[interface address]:interface address:' \
663 '(--address -a)'{-a+,--address}'[interface address]:interface address:' \
664 '(--name -n)'{-n+,--name}'[name to show in web pages]:repository name:' \
664 '(--name -n)'{-n+,--name}'[name to show in web pages]:repository name:' \
665 '(--templates -t)'{-t,--templates}'[web template directory]:template dir:_files -/' \
665 '(--templates -t)'{-t,--templates}'[web template directory]:template dir:_files -/' \
666 '--style[web template style]:style' \
666 '--style[web template style]:style' \
667 '--stdio[for remote clients]' \
667 '--stdio[for remote clients]' \
668 '(--ipv6 -6)'{-6,--ipv6}'[use IPv6 in addition to IPv4]'
668 '(--ipv6 -6)'{-6,--ipv6}'[use IPv6 in addition to IPv4]'
669 }
669 }
670
670
671 _hg_cmd_showconfig() {
671 _hg_cmd_showconfig() {
672 _arguments -s -w : $_hg_global_opts \
672 _arguments -s -w : $_hg_global_opts \
673 '(--untrusted -u)'{-u+,--untrusted}'[show untrusted configuration options]' \
673 '(--untrusted -u)'{-u+,--untrusted}'[show untrusted configuration options]' \
674 ':config item:_hg_config'
674 ':config item:_hg_config'
675 }
675 }
676
676
677 _hg_cmd_status() {
677 _hg_cmd_status() {
678 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
678 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
679 '(--all -A)'{-A,--all}'[show status of all files]' \
679 '(--all -A)'{-A,--all}'[show status of all files]' \
680 '(--modified -m)'{-m,--modified}'[show only modified files]' \
680 '(--modified -m)'{-m,--modified}'[show only modified files]' \
681 '(--added -a)'{-a,--added}'[show only added files]' \
681 '(--added -a)'{-a,--added}'[show only added files]' \
682 '(--removed -r)'{-r,--removed}'[show only removed files]' \
682 '(--removed -r)'{-r,--removed}'[show only removed files]' \
683 '(--deleted -d)'{-d,--deleted}'[show only deleted (but tracked) files]' \
683 '(--deleted -d)'{-d,--deleted}'[show only deleted (but tracked) files]' \
684 '(--clean -c)'{-c,--clean}'[show only files without changes]' \
684 '(--clean -c)'{-c,--clean}'[show only files without changes]' \
685 '(--unknown -u)'{-u,--unknown}'[show only unknown files]' \
685 '(--unknown -u)'{-u,--unknown}'[show only unknown files]' \
686 '(--ignored -i)'{-i,--ignored}'[show ignored files]' \
686 '(--ignored -i)'{-i,--ignored}'[show ignored files]' \
687 '(--no-status -n)'{-n,--no-status}'[hide status prefix]' \
687 '(--no-status -n)'{-n,--no-status}'[hide status prefix]' \
688 '(--copies -C)'{-C,--copies}'[show source of copied files]' \
688 '(--copies -C)'{-C,--copies}'[show source of copied files]' \
689 '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \
689 '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \
690 '--rev[show difference from revision]:revision:_hg_tags' \
690 '--rev[show difference from revision]:revision:_hg_tags' \
691 '*:files:_files'
691 '*:files:_files'
692 }
692 }
693
693
694 _hg_cmd_tag() {
694 _hg_cmd_tag() {
695 _arguments -s -w : $_hg_global_opts \
695 _arguments -s -w : $_hg_global_opts \
696 '(--local -l)'{-l,--local}'[make the tag local]' \
696 '(--local -l)'{-l,--local}'[make the tag local]' \
697 '(--message -m)'{-m+,--message}'[message for tag commit log entry]:message:' \
697 '(--message -m)'{-m+,--message}'[message for tag commit log entry]:message:' \
698 '(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \
698 '(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \
699 '(--user -u)'{-u+,--user}'[record user as commiter]:user:' \
699 '(--user -u)'{-u+,--user}'[record user as commiter]:user:' \
700 '(--rev -r)'{-r+,--rev}'[revision to tag]:revision:_hg_tags' \
700 '(--rev -r)'{-r+,--rev}'[revision to tag]:revision:_hg_tags' \
701 ':tag name:'
701 ':tag name:'
702 }
702 }
703
703
704 _hg_cmd_tip() {
704 _hg_cmd_tip() {
705 _arguments -s -w : $_hg_global_opts $_hg_style_opts \
705 _arguments -s -w : $_hg_global_opts $_hg_style_opts \
706 '(--patch -p)'{-p,--patch}'[show patch]'
706 '(--patch -p)'{-p,--patch}'[show patch]'
707 }
707 }
708
708
709 _hg_cmd_unbundle() {
709 _hg_cmd_unbundle() {
710 _arguments -s -w : $_hg_global_opts \
710 _arguments -s -w : $_hg_global_opts \
711 '(--update -u)'{-u,--update}'[update to new tip if changesets were unbundled]' \
711 '(--update -u)'{-u,--update}'[update to new tip if changesets were unbundled]' \
712 ':files:_files'
712 ':files:_files'
713 }
713 }
714
714
715 _hg_cmd_update() {
715 _hg_cmd_update() {
716 _arguments -s -w : $_hg_global_opts \
716 _arguments -s -w : $_hg_global_opts \
717 '(--clean -C)'{-C,--clean}'[overwrite locally modified files]' \
717 '(--clean -C)'{-C,--clean}'[overwrite locally modified files]' \
718 '(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_tags' \
718 '(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_tags' \
719 ':revision:_hg_tags'
719 ':revision:_hg_tags'
720 }
720 }
721
721
722 # bisect extension
722 # bisect extension
723 _hg_cmd_bisect() {
723 _hg_cmd_bisect() {
724 _arguments -s -w : $_hg_global_opts ':evaluation:(help init reset next good bad)'
724 _arguments -s -w : $_hg_global_opts ':evaluation:(help init reset next good bad)'
725 }
725 }
726
726
727 # HGK
727 # HGK
728 _hg_cmd_view() {
728 _hg_cmd_view() {
729 _arguments -s -w : $_hg_global_opts \
729 _arguments -s -w : $_hg_global_opts \
730 '(--limit -l)'{-l+,--limit}'[limit number of changes displayed]:' \
730 '(--limit -l)'{-l+,--limit}'[limit number of changes displayed]:' \
731 ':revision range:_hg_tags'
731 ':revision range:_hg_tags'
732 }
732 }
733
733
734 # MQ
734 # MQ
735 _hg_qseries() {
735 _hg_qseries() {
736 typeset -a patches
736 typeset -a patches
737 patches=(${(f)"$(_hg_cmd qseries 2>/dev/null)"})
737 patches=(${(f)"$(_hg_cmd qseries 2>/dev/null)"})
738 (( $#patches )) && _describe -t hg-patches 'patches' patches
738 (( $#patches )) && _describe -t hg-patches 'patches' patches
739 }
739 }
740
740
741 _hg_qapplied() {
741 _hg_qapplied() {
742 typeset -a patches
742 typeset -a patches
743 patches=(${(f)"$(_hg_cmd qapplied 2>/dev/null)"})
743 patches=(${(f)"$(_hg_cmd qapplied 2>/dev/null)"})
744 if (( $#patches ))
744 if (( $#patches ))
745 then
745 then
746 patches+=(qbase qtip)
746 patches+=(qbase qtip)
747 _describe -t hg-applied-patches 'applied patches' patches
747 _describe -t hg-applied-patches 'applied patches' patches
748 fi
748 fi
749 }
749 }
750
750
751 _hg_qunapplied() {
751 _hg_qunapplied() {
752 typeset -a patches
752 typeset -a patches
753 patches=(${(f)"$(_hg_cmd qunapplied 2>/dev/null)"})
753 patches=(${(f)"$(_hg_cmd qunapplied 2>/dev/null)"})
754 (( $#patches )) && _describe -t hg-unapplied-patches 'unapplied patches' patches
754 (( $#patches )) && _describe -t hg-unapplied-patches 'unapplied patches' patches
755 }
755 }
756
756
757 # unapplied, including guarded patches
758 _hg_qdeletable() {
759 typeset -a unapplied
760 unapplied=(${(f)"$(_hg_cmd qseries 2>/dev/null)"})
761 for p in $(_hg_cmd qapplied 2>/dev/null)
762 do
763 unapplied=(${unapplied:#$p})
764 done
765
766 (( $#unapplied )) && _describe -t hg-allunapplied-patches 'all unapplied patches' unapplied
767 }
768
757 _hg_qguards() {
769 _hg_qguards() {
758 typeset -a guards
770 typeset -a guards
759 local guard
771 local guard
760 compset -P "+|-"
772 compset -P "+|-"
761 _hg_cmd qselect -s 2>/dev/null | while read guard
773 _hg_cmd qselect -s 2>/dev/null | while read guard
762 do
774 do
763 guards+=(${guard#(+|-)})
775 guards+=(${guard#(+|-)})
764 done
776 done
765 (( $#guards )) && _describe -t hg-guards 'guards' guards
777 (( $#guards )) && _describe -t hg-guards 'guards' guards
766 }
778 }
767
779
768 _hg_qseries_opts=(
780 _hg_qseries_opts=(
769 '(--summary -s)'{-s,--summary}'[print first line of patch header]')
781 '(--summary -s)'{-s,--summary}'[print first line of patch header]')
770
782
771 _hg_cmd_qapplied() {
783 _hg_cmd_qapplied() {
772 _arguments -s -w : $_hg_global_opts $_hg_qseries_opts
784 _arguments -s -w : $_hg_global_opts $_hg_qseries_opts
773 }
785 }
774
786
775 _hg_cmd_qdelete() {
787 _hg_cmd_qdelete() {
776 _arguments -s -w : $_hg_global_opts \
788 _arguments -s -w : $_hg_global_opts \
777 '(--keep -k)'{-k,--keep}'[keep patch file]' \
789 '(--keep -k)'{-k,--keep}'[keep patch file]' \
778 '*'{-r+,--rev}'[stop managing a revision]:applied patch:_hg_revrange' \
790 '*'{-r+,--rev}'[stop managing a revision]:applied patch:_hg_revrange' \
779 '*:unapplied patch:_hg_qunapplied'
791 '*:unapplied patch:_hg_qdeletable'
780 }
792 }
781
793
782 _hg_cmd_qdiff() {
794 _hg_cmd_qdiff() {
783 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
795 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
784 '*:pattern:_hg_files'
796 '*:pattern:_hg_files'
785 }
797 }
786
798
787 _hg_cmd_qfold() {
799 _hg_cmd_qfold() {
788 _arguments -s -w : $_hg_global_opts $_h_commit_opts \
800 _arguments -s -w : $_hg_global_opts $_h_commit_opts \
789 '(--keep,-k)'{-k,--keep}'[keep folded patch files]' \
801 '(--keep,-k)'{-k,--keep}'[keep folded patch files]' \
790 '*:unapplied patch:_hg_qunapplied'
802 '*:unapplied patch:_hg_qunapplied'
791 }
803 }
792
804
793 _hg_cmd_qgoto() {
805 _hg_cmd_qgoto() {
794 _arguments -s -w : $_hg_global_opts \
806 _arguments -s -w : $_hg_global_opts \
795 '(--force -f)'{-f,--force}'[overwrite any local changes]' \
807 '(--force -f)'{-f,--force}'[overwrite any local changes]' \
796 ':patch:_hg_qseries'
808 ':patch:_hg_qseries'
797 }
809 }
798
810
799 _hg_cmd_qguard() {
811 _hg_cmd_qguard() {
800 _arguments -s -w : $_hg_global_opts \
812 _arguments -s -w : $_hg_global_opts \
801 '(--list -l)'{-l,--list}'[list all patches and guards]' \
813 '(--list -l)'{-l,--list}'[list all patches and guards]' \
802 '(--none -n)'{-n,--none}'[drop all guards]' \
814 '(--none -n)'{-n,--none}'[drop all guards]' \
803 ':patch:_hg_qseries' \
815 ':patch:_hg_qseries' \
804 '*:guards:_hg_qguards'
816 '*:guards:_hg_qguards'
805 }
817 }
806
818
807 _hg_cmd_qheader() {
819 _hg_cmd_qheader() {
808 _arguments -s -w : $_hg_global_opts \
820 _arguments -s -w : $_hg_global_opts \
809 ':patch:_hg_qseries'
821 ':patch:_hg_qseries'
810 }
822 }
811
823
812 _hg_cmd_qimport() {
824 _hg_cmd_qimport() {
813 _arguments -s -w : $_hg_global_opts \
825 _arguments -s -w : $_hg_global_opts \
814 '(--existing -e)'{-e,--existing}'[import file in patch dir]' \
826 '(--existing -e)'{-e,--existing}'[import file in patch dir]' \
815 '(--name -n 2)'{-n+,--name}'[patch file name]:name:' \
827 '(--name -n 2)'{-n+,--name}'[patch file name]:name:' \
816 '(--force -f)'{-f,--force}'[overwrite existing files]' \
828 '(--force -f)'{-f,--force}'[overwrite existing files]' \
817 '*'{-r+,--rev}'[place existing revisions under mq control]:revision:_hg_revrange' \
829 '*'{-r+,--rev}'[place existing revisions under mq control]:revision:_hg_revrange' \
818 '*:patch:_files'
830 '*:patch:_files'
819 }
831 }
820
832
821 _hg_cmd_qnew() {
833 _hg_cmd_qnew() {
822 _arguments -s -w : $_hg_global_opts $_hg_commit_opts \
834 _arguments -s -w : $_hg_global_opts $_hg_commit_opts \
823 '(--force -f)'{-f,--force}'[import uncommitted changes into patch]' \
835 '(--force -f)'{-f,--force}'[import uncommitted changes into patch]' \
824 ':patch:'
836 ':patch:'
825 }
837 }
826
838
827 _hg_cmd_qnext() {
839 _hg_cmd_qnext() {
828 _arguments -s -w : $_hg_global_opts $_hg_qseries_opts
840 _arguments -s -w : $_hg_global_opts $_hg_qseries_opts
829 }
841 }
830
842
831 _hg_cmd_qpop() {
843 _hg_cmd_qpop() {
832 _arguments -s -w : $_hg_global_opts \
844 _arguments -s -w : $_hg_global_opts \
833 '(--all -a :)'{-a,--all}'[pop all patches]' \
845 '(--all -a :)'{-a,--all}'[pop all patches]' \
834 '(--name -n)'{-n+,--name}'[queue name to pop]:' \
846 '(--name -n)'{-n+,--name}'[queue name to pop]:' \
835 '(--force -f)'{-f,--force}'[forget any local changes]' \
847 '(--force -f)'{-f,--force}'[forget any local changes]' \
836 ':patch:_hg_qapplied'
848 ':patch:_hg_qapplied'
837 }
849 }
838
850
839 _hg_cmd_qprev() {
851 _hg_cmd_qprev() {
840 _arguments -s -w : $_hg_global_opts $_hg_qseries_opts
852 _arguments -s -w : $_hg_global_opts $_hg_qseries_opts
841 }
853 }
842
854
843 _hg_cmd_qpush() {
855 _hg_cmd_qpush() {
844 _arguments -s -w : $_hg_global_opts \
856 _arguments -s -w : $_hg_global_opts \
845 '(--all -a :)'{-a,--all}'[apply all patches]' \
857 '(--all -a :)'{-a,--all}'[apply all patches]' \
846 '(--list -l)'{-l,--list}'[list patch name in commit text]' \
858 '(--list -l)'{-l,--list}'[list patch name in commit text]' \
847 '(--merge -m)'{-m+,--merge}'[merge from another queue]:' \
859 '(--merge -m)'{-m+,--merge}'[merge from another queue]:' \
848 '(--name -n)'{-n+,--name}'[merge queue name]:' \
860 '(--name -n)'{-n+,--name}'[merge queue name]:' \
849 '(--force -f)'{-f,--force}'[apply if the patch has rejects]' \
861 '(--force -f)'{-f,--force}'[apply if the patch has rejects]' \
850 ':patch:_hg_qunapplied'
862 ':patch:_hg_qunapplied'
851 }
863 }
852
864
853 _hg_cmd_qrefresh() {
865 _hg_cmd_qrefresh() {
854 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_commit_opts \
866 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_commit_opts \
855 '(--git -g)'{-g,--git}'[use git extended diff format]' \
867 '(--git -g)'{-g,--git}'[use git extended diff format]' \
856 '(--short -s)'{-s,--short}'[short refresh]' \
868 '(--short -s)'{-s,--short}'[short refresh]' \
857 '*:files:_hg_files'
869 '*:files:_hg_files'
858 }
870 }
859
871
860 _hg_cmd_qrename() {
872 _hg_cmd_qrename() {
861 _arguments -s -w : $_hg_global_opts \
873 _arguments -s -w : $_hg_global_opts \
862 ':patch:_hg_qseries' \
874 ':patch:_hg_qseries' \
863 ':destination:'
875 ':destination:'
864 }
876 }
865
877
866 _hg_cmd_qselect() {
878 _hg_cmd_qselect() {
867 _arguments -s -w : $_hg_global_opts \
879 _arguments -s -w : $_hg_global_opts \
868 '(--none -n :)'{-n,--none}'[disable all guards]' \
880 '(--none -n :)'{-n,--none}'[disable all guards]' \
869 '(--series -s :)'{-s,--series}'[list all guards in series file]' \
881 '(--series -s :)'{-s,--series}'[list all guards in series file]' \
870 '--pop[pop to before first guarded applied patch]' \
882 '--pop[pop to before first guarded applied patch]' \
871 '--reapply[pop and reapply patches]' \
883 '--reapply[pop and reapply patches]' \
872 '*:guards:_hg_qguards'
884 '*:guards:_hg_qguards'
873 }
885 }
874
886
875 _hg_cmd_qseries() {
887 _hg_cmd_qseries() {
876 _arguments -s -w : $_hg_global_opts $_hg_qseries_opts \
888 _arguments -s -w : $_hg_global_opts $_hg_qseries_opts \
877 '(--missing -m)'{-m,--missing}'[print patches not in series]'
889 '(--missing -m)'{-m,--missing}'[print patches not in series]'
878 }
890 }
879
891
880 _hg_cmd_qunapplied() {
892 _hg_cmd_qunapplied() {
881 _arguments -s -w : $_hg_global_opts $_hg_qseries_opts
893 _arguments -s -w : $_hg_global_opts $_hg_qseries_opts
882 }
894 }
883
895
884 _hg_cmd_qtop() {
896 _hg_cmd_qtop() {
885 _arguments -s -w : $_hg_global_opts $_hg_qseries_opts
897 _arguments -s -w : $_hg_global_opts $_hg_qseries_opts
886 }
898 }
887
899
888 _hg_cmd_strip() {
900 _hg_cmd_strip() {
889 _arguments -s -w : $_hg_global_opts \
901 _arguments -s -w : $_hg_global_opts \
890 '(--force -f)'{-f,--force}'[force multi-head removal]' \
902 '(--force -f)'{-f,--force}'[force multi-head removal]' \
891 '(--backup -b)'{-b,--backup}'[bundle unrelated changesets]' \
903 '(--backup -b)'{-b,--backup}'[bundle unrelated changesets]' \
892 '(--nobackup -n)'{-n,--nobackup}'[no backups]' \
904 '(--nobackup -n)'{-n,--nobackup}'[no backups]' \
893 ':revision:_hg_tags'
905 ':revision:_hg_tags'
894 }
906 }
895
907
896 _hg "$@"
908 _hg "$@"
General Comments 0
You need to be logged in to leave comments. Login now