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, 5 insertions, 3 deletions
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg b/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
index 2806aee1d..ea3798b81 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
@@ -14,7 +14,7 @@ local hgbase bmfile branchfile topicfile rebasefile dirstatefile mqseriesfile \
 
 local -a hgid_args defrevformat defbranchformat \
     hgbmarks mqpatches mqguards mqunapplied hgmisc \
-    i_patchguards i_negguards i_posguards
+    i_patch i_patchguards i_negguards i_posguards
 
 local -A hook_com
 
@@ -56,7 +56,6 @@ if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" get-revision ; then
         zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" \
             "check-for-changes" || hgid_args+=( -r. )
 
-        local HGPLAIN
         HGPLAIN=1 ${vcs_comm[cmd]} ${(z)hgid_args} 2> /dev/null \
             | read -r r_csetid r_lrev
     fi
@@ -184,6 +183,9 @@ if zstyle -T ":vcs_info:${vcs}:${usercontext}:${rrn}" get-mq \
             # Skip commented lines
             [[ ${i_patch} == [[:space:]]#"#"* ]] && continue
 
+            # Skip applied patches
+            (( ${+mqpatches[(re)${i_patch}]} )) && continue
+
             # Separate negative and positive guards to more easily find the
             # intersection of active guards with patch guards
             i_patchguards=( ${(s: :)i_patchguards} )
@@ -226,7 +228,7 @@ if zstyle -T ":vcs_info:${vcs}:${usercontext}:${rrn}" get-mq \
     VCS_INFO_set-patch-format 'mqpatches' 'applied_string' \
                               'mqunapplied' 'unapplied_string' \
                               ":vcs_info:${vcs}:${usercontext}:${rrn}" hgmqstring \
-                              extra_hook_com VCS_INFO_hg_extra_zformats
+                              extra_hook_com VCS_INFO_hg_extra_zformats ''
     hgmqstring=$REPLY
 fi