Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH 2/3] vcs_info hg mq: Don't include applied patches in the unapplied patches
- X-seq: zsh-workers 49728
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH 2/3] vcs_info hg mq: Don't include applied patches in the unapplied patches
- Date: Sat, 29 Jan 2022 16:15:26 +0000
- Archived-at: <https://zsh.org/workers/49728>
- In-reply-to: <20220129161527.17303-1-danielsh@tarpaulin.shahaf.local2>
- List-id: <zsh-workers.zsh.org>
- References: <20220129161527.17303-1-danielsh@tarpaulin.shahaf.local2>
For instance, with 4 applied patches, 5 unapplied patches, and no guards
involved, the patch-format style would indicate 9 (= 4+5) unapplied patches
and 4 applied patches.
---
Functions/VCS_Info/Backends/VCS_INFO_get_data_hg | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg b/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
index 0041a153c..d789d662a 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} )
Messages sorted by:
Reverse Date,
Date,
Thread,
Author