about summary refs log tree commit diff
path: root/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
diff options
context:
space:
mode:
Diffstat (limited to 'Functions/VCS_Info/Backends/VCS_INFO_get_data_hg')
-rw-r--r--Functions/VCS_Info/Backends/VCS_INFO_get_data_hg8
1 files changed, 6 insertions, 2 deletions
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg b/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
index 9f61aeaf4..f7e9d6f45 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
@@ -217,12 +217,16 @@ if zstyle -T ":vcs_info:${vcs}:${usercontext}:${rrn}" get-mq \
     fi
 
     local -A extra_hook_com=( guards "${guards_string}"   guards-n ${#mqguards} )
-    local -a extra_zformats=( "g:${extra_hook_com[guards]}" "G:${#mqguards}" )
+
+    (( ${+functions[VCS_INFO_hg_extra_zformats]} )) || 
+    VCS_INFO_hg_extra_zformats() {
+        reply=( "g:${hook_com[guards]}" "G:${#mqguards}" )
+    }
 
     VCS_INFO_set-patch-format 'mqpatches' 'applied_string' \
                               'mqunapplied' 'unapplied_string' \
                               ":vcs_info:${vcs}:${usercontext}:${rrn}" hgmqstring \
-                              extra_hook_com extra_zformats
+                              extra_hook_com VCS_INFO_hg_extra_zformats
     hgmqstring=$REPLY
 fi