From 2854a67e09748a2e6f4e1d8a73bc463bad4cbd4e Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Mon, 23 Jan 2017 18:15:35 +0000 Subject: 40403/0004: vcs_info set-patch-format helper: Part #4. This also fixes the %a (${hook_com[all-n]}) expando in the hg backend: before this change, it counted only unapplied changes. --- Functions/VCS_Info/VCS_INFO_quilt | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'Functions/VCS_Info/VCS_INFO_quilt') diff --git a/Functions/VCS_Info/VCS_INFO_quilt b/Functions/VCS_Info/VCS_INFO_quilt index a81da1c49..aed9f0c33 100644 --- a/Functions/VCS_Info/VCS_INFO_quilt +++ b/Functions/VCS_Info/VCS_INFO_quilt @@ -91,7 +91,7 @@ function VCS_INFO_quilt() { local patches pc tmp qstring root local -i ret local context - local -a applied unapplied all applied_string unapplied_string quiltcommand quilt_env + local -a applied unapplied applied_string unapplied_string quiltcommand quilt_env local -A hook_com context=":vcs_info:${vcs}.quilt-${mode}:${usercontext}:${rrn}" @@ -171,17 +171,12 @@ function VCS_INFO_quilt() { } fi - all=( ${(Oa)applied} ${unapplied} ) - VCS_INFO_set-patch-format 'applied' 'applied_string' \ 'unapplied' 'unapplied_string' \ ${context} qstring - - hook_com=( applied "${applied_string}" unapplied "${unapplied_string}" - applied-n ${#applied} unapplied-n ${#unapplied} all-n ${#all} ) if VCS_INFO_hook 'set-patch-format' ${qstring}; then zformat -f qstring "${qstring}" "p:${hook_com[applied]}" "u:${hook_com[unapplied]}" \ - "n:${#applied}" "c:${#unapplied}" "a:${#all}" + "n:${#applied}" "c:${#unapplied}" "a:${hook_com[all-n]}" else qstring=${hook_com[patch-replace]} fi -- cgit v1.2.3-70-g09d2