about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--Functions/VCS_Info/Backends/VCS_INFO_get_data_hg3
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index a856cc47f..a3e6497c6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2022-02-20  Daniel Shahaf  <d.s@daniel.shahaf.name>
 
+	* 49728: Functions/VCS_Info/Backends/VCS_INFO_get_data_hg:
+	vcs_info hg mq: Don't include applied patches in the unapplied
+	patches
+
 	* 49727 (+ comment): Doc/Zsh/contrib.yo,
 	Functions/VCS_Info/Backends/VCS_INFO_get_data_git,
 	Functions/VCS_Info/Backends/VCS_INFO_get_data_hg,
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg b/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
index e7123f0bf..ea3798b81 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
@@ -183,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} )