about summary refs log tree commit diff
path: root/Functions/VCS_Info/VCS_INFO_hook
diff options
context:
space:
mode:
authorFrank Terbeck <bewater@users.sourceforge.net>2010-05-10 10:46:48 +0000
committerFrank Terbeck <bewater@users.sourceforge.net>2010-05-10 10:46:48 +0000
commit0501efc54af2d194f952c2968a7aeeb5bac8fdf4 (patch)
tree9d632c46950c434594cc46263e35558018912b20 /Functions/VCS_Info/VCS_INFO_hook
parent144a06bf958b4e573fd3c78eab30536349d09cff (diff)
downloadzsh-0501efc54af2d194f952c2968a7aeeb5bac8fdf4.tar.gz
zsh-0501efc54af2d194f952c2968a7aeeb5bac8fdf4.tar.xz
zsh-0501efc54af2d194f952c2968a7aeeb5bac8fdf4.zip
Seth House, Simon Ruderich and myself: 27948: various vcs_info changes
Here's a diff-stat:

 Doc/Zsh/contrib.yo                                |  506 ++++++++++++++-------
 Functions/VCS_Info/.distfiles                     |    1 +
 Functions/VCS_Info/Backends/VCS_INFO_detect_hg    |   14 +-
 Functions/VCS_Info/Backends/VCS_INFO_get_data_git |   35 +-
 Functions/VCS_Info/Backends/VCS_INFO_get_data_hg  |  295 +++++++++----
 Functions/VCS_Info/VCS_INFO_formats               |   26 +-
 Functions/VCS_Info/VCS_INFO_hook                  |   10 +-
 Functions/VCS_Info/VCS_INFO_quilt                 |  190 ++++++++
 Functions/VCS_Info/vcs_info                       |   30 +-
 Misc/.distfiles                                   |    1 +
 Misc/vcs_info-examples                            |  496 ++++++++++++++++++++
 11 files changed, 1303 insertions(+), 301 deletions(-)

The major changes are vast improvements for the mercurial (hg) backend
(which was done almost entirely by Seth); improved documentation (mostly
done by Simon and again Seth); quilt support (as an addon and stand
alone, see the manual for details); a number of new hooks and a fair
share of bugfixes.
Diffstat (limited to 'Functions/VCS_Info/VCS_INFO_hook')
-rw-r--r--Functions/VCS_Info/VCS_INFO_hook10
1 files changed, 7 insertions, 3 deletions
diff --git a/Functions/VCS_Info/VCS_INFO_hook b/Functions/VCS_Info/VCS_INFO_hook
index 71845d808..7274d726f 100644
--- a/Functions/VCS_Info/VCS_INFO_hook
+++ b/Functions/VCS_Info/VCS_INFO_hook
@@ -20,8 +20,11 @@ if (( debug )); then
 fi
 
 zstyle -a "${context}" hooks hooks || return 0
-# protect some internal variables in hooks
-typeset -r vcs rrn usercontext maxexports msgs vcs_comm
+# Protect some internal variables in hooks. The `-g' parameter to
+# typeset does *not* make the parameters global here (they are already
+# "*-local-export). It prevents typeset from creating *new* *local*
+# parameters in this function's scope.
+typeset -g -r vcs rrn usercontext maxexports msgs vcs_comm
 for hook in ${hooks} ; do
     func="+vi-${hook}"
     if (( ${+functions[$func]} == 0 )); then
@@ -29,6 +32,7 @@ for hook in ${hooks} ; do
         continue
     fi
     (( debug )) && printf '  + Running function: "%s"\n' "${func}"
+    true
     ${func} "$@"
     case $? in
         (0)
@@ -38,5 +42,5 @@ for hook in ${hooks} ; do
             ;;
     esac
 done
-typeset +r vcs rrn usercontext maxexports msgs vcs_comm
+typeset -g +r vcs rrn usercontext maxexports msgs vcs_comm
 return $ret