From 779b3112f85d01d297ab04e6c1b68a0b33d76a55 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Wed, 21 Oct 2015 05:11:59 +0000 Subject: 36913 + 36945: vcs_info quilt: Pass patch subject lines to gen-applied-string The format used is '${patchname} ${subject}', which is analogous to the git backend. --- ChangeLog | 3 +++ Functions/VCS_Info/VCS_INFO_quilt | 30 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/ChangeLog b/ChangeLog index fe93bc724..dffd3b35a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2015-10-24 Daniel Shahaf + * 36913 + 36945: Functions/VCS_Info/VCS_INFO_quilt: vcs_info quilt: + Pass patch subject lines to gen-applied-string + * 36912: Functions/VCS_Info/VCS_INFO_quilt: vcs_info quilt: Tolerate being in child of .pc's parent diff --git a/Functions/VCS_Info/VCS_INFO_quilt b/Functions/VCS_Info/VCS_INFO_quilt index 29603a27a..c3c3d864d 100644 --- a/Functions/VCS_Info/VCS_INFO_quilt +++ b/Functions/VCS_Info/VCS_INFO_quilt @@ -145,6 +145,36 @@ function VCS_INFO_quilt() { unapplied=() fi + if [[ -n $patches ]]; then + () { + local i line + for ((i=1; i<=$#applied; i++)); do + if [[ -f "$patches/$applied[$i]" ]] && + read -r line < "$patches/$applied[$i]" && + [[ $line != (#b)(---|Index:)* ]] && + true + ; + then + applied[$i]+=" $line" + else + applied[$i]+=" ?" + fi + done + for ((i=1; i<=$#unapplied; i++)); do + if [[ -f "$patches/$unapplied[$i]" ]] && + read -r line < "$patches/$unapplied[$i]" && + [[ $line != (#b)(---|Index:)* ]] && + true + ; + then + unapplied[$i]+=" $line" + else + unapplied[$i]+=" ?" + fi + done + } + fi + all=( ${(Oa)applied} ${unapplied} ) if VCS_INFO_hook 'gen-applied-string' "${applied[@]}"; then -- cgit 1.4.1