# HG changeset patch # User Augie Fackler # Date 1323712046 21600 # Node ID 1e2125a577da7c1ca84cf2f7c80d8c05e70a72c4 # Parent 546ac96796daee7cf3ef63532ca0b3b8786d9ca7 _hg: import updated version from upstream diff --git a/.zfun/_hg b/.zfun/_hg --- a/.zfun/_hg +++ b/.zfun/_hg @@ -165,6 +165,7 @@ typeset -A _hg_cmd_globals _hg_labels() { _hg_tags "$@" _hg_bookmarks "$@" + _hg_branches "$@" } _hg_tags() { @@ -191,6 +192,17 @@ typeset -A _hg_cmd_globals (( $#bookmarks )) && _describe -t bookmarks 'bookmarks' bookmarks } +_hg_branches() { + typeset -a branches + local branch + + _hg_cmd branches | while read branch + do + branches+=(${branch/ # [0-9]#:*}) + done + (( $#branches )) && _describe -t branches 'branches' branches +} + # likely merge candidates _hg_mergerevs() { typeset -a heads @@ -360,8 +372,8 @@ typeset -A _hg_cmd_globals '(--help -h)'{-h,--help}'[display help and exit]' '--debug[debug mode]' '--debugger[start debugger]' - '--encoding[set the charset encoding (default: UTF8)]' - '--encodingmode[set the charset encoding mode (default: strict)]' + '--encoding[set the charset encoding]' + '--encodingmode[set the charset encoding mode]' '--lsprof[print improved command execution profile]' '--traceback[print traceback on exception]' '--time[time how long the command takes]' @@ -617,6 +629,7 @@ typeset -A _hg_cmd_globals '(--only-merges -m)'{-m,--only-merges}'[show only merges]' \ '(--patch -p)'{-p,--patch}'[show patch]' \ '(--prune -P)'{-P+,--prune}'[do not display revision or any of its ancestors]:revision:_hg_labels' \ + '(--branch -b)'{-b+,--branch}'[show changesets within the given named branch]:branch:_hg_branches' \ '*:files:_hg_files' }