zsh-workers
 help / color / mirror / code / Atom feed
* Misc patches for git completion and vcs_info
@ 2014-09-12 21:30 Marc Finet
  2014-09-12 21:30 ` [PATCH 1/9] vcs_info examples: fix typo Marc Finet
                   ` (10 more replies)
  0 siblings, 11 replies; 37+ messages in thread
From: Marc Finet @ 2014-09-12 21:30 UTC (permalink / raw)
  To: zsh-workers

Hello,

Since i switched to zsh, i've being trying to tweak my dev environment and
fell on a few zsh behaviors i did not expect especially regarding git
handling (i played a lot with interesting/unique features of zsh though).

Below is a list of patches that i added in my current zsh (based on
tonight's master). Please consider them for review as my zsh-level is
currently very low (e.g. patch 2) and i might have broken other use-cases
(patch 4 for instance makes me a little bit nervous as it seems to easy).

Thanks,

Marc.


^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 1/9] vcs_info examples: fix typo
  2014-09-12 21:30 Misc patches for git completion and vcs_info Marc Finet
@ 2014-09-12 21:30 ` Marc Finet
  2014-09-14  9:33   ` Frank Terbeck
  2014-09-12 21:30 ` [PATCH 2/9] completion git: support aliases when \n exist Marc Finet
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 37+ messages in thread
From: Marc Finet @ 2014-09-12 21:30 UTC (permalink / raw)
  To: zsh-workers; +Cc: Marc Finet

---
 Misc/vcs_info-examples | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Misc/vcs_info-examples b/Misc/vcs_info-examples
index 5d8ff18..766eb82 100644
--- a/Misc/vcs_info-examples
+++ b/Misc/vcs_info-examples
@@ -301,7 +301,7 @@ zstyle ':vcs_info:*+pre-get-data:*' hooks pre-get-data
 
     # If we got to this point, running vcs_info was not forced, so now we
     # default to not running it and selectively choose when we want to run
-    # it (ret=1 means run it, ret=0 means don't).
+    # it (ret=0 means run it, ret=1 means don't).
     ret=1
     # If a git/hg command was run then run vcs_info as the status might
     # need to be updated.
-- 
2.1.0


^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 2/9] completion git: support aliases when \n exist
  2014-09-12 21:30 Misc patches for git completion and vcs_info Marc Finet
  2014-09-12 21:30 ` [PATCH 1/9] vcs_info examples: fix typo Marc Finet
@ 2014-09-12 21:30 ` Marc Finet
  2014-09-12 21:30 ` [PATCH 3/9] vcs_info git: detect revert or cherry-pick with multiple commits Marc Finet
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 37+ messages in thread
From: Marc Finet @ 2014-09-12 21:30 UTC (permalink / raw)
  To: zsh-workers; +Cc: Marc Finet

The git completion for aliases (i.e. completing with aliased verb)
was broken whem some \n exist in aliases.
---
 Completion/Unix/Command/_git | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index b1f411a..d941aac 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -6560,9 +6560,13 @@ _git() {
   if (( CURRENT > 2 )); then
     local -a aliases
     local -A git_aliases
-    # TODO: Should use -z here, but I couldn't get it to work.
-    aliases=(${(f)${${${(f)"$(_call_program aliases git config --get-regexp '\^alias\.')"}#alias.}/ /$'\n'}/(#e)/$'\n'})
-    (( $#aliases % 2 == 0 )) && git_aliases=($aliases)
+    local k v
+    aliases=(${(0)"$(_call_program aliases git config -z --get-regexp '\^alias\.')"})
+    for a in ${aliases}; do
+        k="${${a/$'\n'*}/alias.}"
+        v="${a#*$'\n'}"
+        git_aliases[$k]="$v"
+    done
 
     if (( $+git_aliases[$words[2]] && !$+commands[git-$words[2]] && !$+functions[_git-$words[2]] )); then
       local -a tmpwords expalias
-- 
2.1.0


^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 3/9] vcs_info git: detect revert or cherry-pick with multiple commits
  2014-09-12 21:30 Misc patches for git completion and vcs_info Marc Finet
  2014-09-12 21:30 ` [PATCH 1/9] vcs_info examples: fix typo Marc Finet
  2014-09-12 21:30 ` [PATCH 2/9] completion git: support aliases when \n exist Marc Finet
@ 2014-09-12 21:30 ` Marc Finet
  2014-09-14  9:36   ` Frank Terbeck
  2014-09-12 21:30 ` [PATCH 4/9] vcs_info git: set rrn before using it Marc Finet
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 37+ messages in thread
From: Marc Finet @ 2014-09-12 21:30 UTC (permalink / raw)
  To: zsh-workers; +Cc: Marc Finet

When revert or cherry-pick involve many commits the .git/sequencer
directory holds context for the action and no CHERRY_PICK_HEAD exist.
---
 Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
index 76ab92f..263a325 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
@@ -62,6 +62,11 @@ VCS_INFO_git_getaction () {
         return 0
     fi
 
+    if [[ -d "${gitdir}/sequencer" ]] ; then
+         gitaction="cherry-or-revert"
+         return 0
+    fi
+
     return 1
 }
 
-- 
2.1.0


^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 4/9] vcs_info git: set rrn before using it
  2014-09-12 21:30 Misc patches for git completion and vcs_info Marc Finet
                   ` (2 preceding siblings ...)
  2014-09-12 21:30 ` [PATCH 3/9] vcs_info git: detect revert or cherry-pick with multiple commits Marc Finet
@ 2014-09-12 21:30 ` Marc Finet
  2014-09-14  9:33   ` Frank Terbeck
  2014-09-12 21:30 ` [PATCH 5/9] vcs_info quilt: fix standalone detection Marc Finet
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 37+ messages in thread
From: Marc Finet @ 2014-09-12 21:30 UTC (permalink / raw)
  To: zsh-workers; +Cc: Marc Finet

This would fix setting check-for-changes or
check-for-staged-changes per repository.
---
 Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
index 263a325..b5a38da 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
@@ -126,6 +126,8 @@ if [[ -z ${gitdir} ]] || [[ -z ${gitbranch} ]] ; then
     return 1
 fi
 
+gitbase=$( ${vcs_comm[cmd]} rev-parse --show-toplevel )
+rrn=${gitbase:t}
 if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" "check-for-changes" ; then
     querystaged=1
     queryunstaged=1
@@ -154,8 +156,6 @@ fi
 
 VCS_INFO_adjust
 VCS_INFO_git_getaction ${gitdir}
-gitbase=$( ${vcs_comm[cmd]} rev-parse --show-toplevel )
-rrn=${gitbase:t}
 
 local patchdir=${gitdir}/patches/${gitbranch}
 if [[ -d $patchdir ]] && [[ -f $patchdir/applied ]] \
-- 
2.1.0


^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 5/9] vcs_info quilt: fix standalone detection
  2014-09-12 21:30 Misc patches for git completion and vcs_info Marc Finet
                   ` (3 preceding siblings ...)
  2014-09-12 21:30 ` [PATCH 4/9] vcs_info git: set rrn before using it Marc Finet
@ 2014-09-12 21:30 ` Marc Finet
  2014-09-14  9:42   ` Frank Terbeck
  2014-09-12 21:30 ` [PATCH 6/9] vcs_info quilt: fix unapplied detection on sub-directory Marc Finet
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 37+ messages in thread
From: Marc Finet @ 2014-09-12 21:30 UTC (permalink / raw)
  To: zsh-workers; +Cc: Marc Finet

Since VCS_INFO_bydir_detect always uses the
vcs_comm[detect_need_file], it should be cleared when querying
it without file.
---
 Functions/VCS_Info/VCS_INFO_quilt | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/Functions/VCS_Info/VCS_INFO_quilt b/Functions/VCS_Info/VCS_INFO_quilt
index 7001eca..db15dda 100644
--- a/Functions/VCS_Info/VCS_INFO_quilt
+++ b/Functions/VCS_Info/VCS_INFO_quilt
@@ -70,13 +70,11 @@ function VCS_INFO_quilt-dirfind() {
 
     olddir=${vcs_comm[basedir]}
     vcs_comm[basedir]=''
-    if [[ -n "${file}" ]]; then
-        oldfile=${vcs_comm[detect_need_file]}
-        vcs_comm[detect_need_file]=${file}
-    fi
+    oldfile=${vcs_comm[detect_need_file]}
+    vcs_comm[detect_need_file]=${file}
     VCS_INFO_bydir_detect ${dir}
     ret=$?
-    [[ -n "${file}" ]] && vcs_comm[detect_need_file]=${oldfile}
+    vcs_comm[detect_need_file]=${oldfile}
     printf '%s' ${vcs_comm[basedir]}
     vcs_comm[basedir]="${olddir}"
     return ${ret}
-- 
2.1.0


^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 6/9] vcs_info quilt: fix unapplied detection on sub-directory
  2014-09-12 21:30 Misc patches for git completion and vcs_info Marc Finet
                   ` (4 preceding siblings ...)
  2014-09-12 21:30 ` [PATCH 5/9] vcs_info quilt: fix standalone detection Marc Finet
@ 2014-09-12 21:30 ` Marc Finet
  2014-09-14  9:47   ` Frank Terbeck
  2014-09-12 21:30 ` [PATCH 7/9] vcs_info git: fix applied-string name Marc Finet
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 37+ messages in thread
From: Marc Finet @ 2014-09-12 21:30 UTC (permalink / raw)
  To: zsh-workers; +Cc: Marc Finet

When being in a subdirectory of a "repo" being handled with quilt,
the `quilt unapplied` command returns all the patches because
QUILT_PATCHES is an absolute path (which exists and is a dir) and
quilt considers that .pc should in current directory.
Changing quilt might be overkill and it seems that QUILT_PATCHES
should just be a name, not an absolute path.
---
 Functions/VCS_Info/VCS_INFO_quilt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Functions/VCS_Info/VCS_INFO_quilt b/Functions/VCS_Info/VCS_INFO_quilt
index db15dda..53835dd 100644
--- a/Functions/VCS_Info/VCS_INFO_quilt
+++ b/Functions/VCS_Info/VCS_INFO_quilt
@@ -134,7 +134,7 @@ function VCS_INFO_quilt() {
         # This zstyle call needs to be moved further up if `quilt' needs
         # to be run in more places than this one.
         zstyle -s "${context}" quiltcommand quiltcommand || quiltcommand='quilt'
-        unapplied=( ${(f)"$(QUILT_PATCHES=$patches $quiltcommand --quiltrc /dev/null unapplied 2> /dev/null)"} )
+        unapplied=( ${(f)"$(QUILT_PATCHES=$(basename $patches) $quiltcommand --quiltrc /dev/null unapplied 2> /dev/null)"} )
         unapplied=( ${unapplied:#} )
     else
         unapplied=()
-- 
2.1.0


^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 7/9] vcs_info git: fix applied-string name
  2014-09-12 21:30 Misc patches for git completion and vcs_info Marc Finet
                   ` (5 preceding siblings ...)
  2014-09-12 21:30 ` [PATCH 6/9] vcs_info quilt: fix unapplied detection on sub-directory Marc Finet
@ 2014-09-12 21:30 ` Marc Finet
  2014-09-14  9:49   ` Frank Terbeck
  2014-09-12 21:30 ` [PATCH 8/9] vcs_info git: consider patches for rebase Marc Finet
                   ` (3 subsequent siblings)
  10 siblings, 1 reply; 37+ messages in thread
From: Marc Finet @ 2014-09-12 21:30 UTC (permalink / raw)
  To: zsh-workers; +Cc: Marc Finet

Documentation and hg backend use applied-string. patch-string does not
appear anywhere.
---
 Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
index b5a38da..188f204 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
@@ -176,7 +176,7 @@ then
             stgitpatch=""
         fi
     else
-        stgitpatch=${hook_com[patch-string]}
+        stgitpatch=${hook_com[applied-string]}
     fi
     hook_com=()
     if VCS_INFO_hook 'gen-unapplied-string' "${stgit_unapplied[@]}"; then
-- 
2.1.0


^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 8/9] vcs_info git: consider patches for rebase
  2014-09-12 21:30 Misc patches for git completion and vcs_info Marc Finet
                   ` (6 preceding siblings ...)
  2014-09-12 21:30 ` [PATCH 7/9] vcs_info git: fix applied-string name Marc Finet
@ 2014-09-12 21:30 ` Marc Finet
  2014-09-14 10:08   ` Frank Terbeck
  2014-09-12 21:30 ` [PATCH 9/9] completion git: fix send-email --confirm values Marc Finet
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 37+ messages in thread
From: Marc Finet @ 2014-09-12 21:30 UTC (permalink / raw)
  To: zsh-workers; +Cc: Marc Finet

Since a rebase contains a list of patches to re-apply, re-use the
facility for stgit to have the same mechanism.
The patch list given to the gen-{un,}applied-string hooks is an array
with the sha1 and the subject of the commit. On rebase merge, the
applied patches prior to current contains only a number and "?".
---
 Doc/Zsh/contrib.yo                                |  14 +--
 Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 116 ++++++++++++++--------
 2 files changed, 81 insertions(+), 49 deletions(-)

diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo
index 1c1a66a..361e866 100644
--- a/Doc/Zsh/contrib.yo
+++ b/Doc/Zsh/contrib.yo
@@ -1296,10 +1296,10 @@ tt(formats) and tt(actionformats) and will be availabe in the global
 tt(backend_misc) array as tt(${backend_misc[bookmarks]}).
 )
 item(tt(gen-applied-string))(
-Called in the tt(git) (with tt(stgit)), and tt(hg) (with tt(mq)) backends
-and in tt(quilt) support when the tt(applied-string) is generated; the
-tt(use-quilt) zstyle must be true for tt(quilt) (the tt(mq) and tt(stgit)
-backends are active by default).
+Called in the tt(git) (with tt(stgit) or during rebase), and tt(hg)
+(with tt(mq)) backends and in tt(quilt) support when the tt(applied-string)
+is generated; the tt(use-quilt) zstyle must be true for tt(quilt) (the tt(mq)
+and tt(stgit) backends are active by default).
 
 This hook gets the names of all applied patches which tt(vcs_info) collected
 so far in the opposite order, which means that the first argument is the
@@ -1312,9 +1312,9 @@ tt(backend_misc) array as tt($backend_misc[patches]}); and it will be
 available as tt(%p) in the tt(patch-format) and tt(nopatch-format) styles.
 )
 item(tt(gen-unapplied-string))(
-Called in the tt(git) (with tt(stgit)), and tt(hg) (with tt(mq)) backend
-and in tt(quilt) support when the tt(unapplied-string) is generated; the
-tt(get-unapplied) style must be true.
+Called in the tt(git) (with tt(stgit) or during rebase), and tt(hg) (with
+tt(mq)) backend and in tt(quilt) support when the tt(unapplied-string) is
+generated; the tt(get-unapplied) style must be true.
 
 This hook gets the names of all unapplied patches which tt(vcs_info)
 collected so far in the opposite order, which mean that the first argument is
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
index 188f204..a0fd85d 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
@@ -3,9 +3,9 @@
 ## Distributed under the same BSD-ish license as zsh itself.
 
 setopt localoptions extendedglob NO_shwordsplit
-local gitdir gitbase gitbranch gitaction gitunstaged gitstaged gitsha1
-local stgitpatch stgitunapplied
+local gitdir gitbase gitbranch gitaction gitunstaged gitstaged gitsha1 gitmisc
 local -i querystaged queryunstaged
+local -a git_patches_applied git_patches_unapplied
 local -A hook_com
 
 VCS_INFO_git_getaction () {
@@ -113,6 +113,44 @@ VCS_INFO_git_getbranch () {
     return 0
 }
 
+VCS_INFO_git_handle_patches () {
+    local git_applied_s git_unapplied_s gitmsg git_all
+    git_patches_applied=(${(Oa)git_patches_applied})
+    git_patches_unapplied=(${(Oa)git_patches_unapplied})
+    (( git_all = ${#git_patches_applied} + ${#git_patches_unapplied} ))
+
+    if VCS_INFO_hook 'gen-applied-string' "${git_patches_applied[@]}"; then
+        if (( ${#git_patches_applied} )); then
+            git_applied_s=${git_patches_applied[1]}
+        else
+            git_applied_s=""
+        fi
+    else
+        git_applied_s=${hook_com[applied-string]}
+    fi
+    hook_com=()
+    if VCS_INFO_hook 'gen-unapplied-string' "${git_patches_unapplied[@]}"; then
+        git_patches_unapplied=${#git_patches_unapplied}
+    else
+        git_patches_unapplied=${hook_com[unapplied-string]}
+    fi
+
+    if (( ${#git_patches_applied} )); then
+        zstyle -s ":vcs_info:${vcs}:${usercontext}:${rrn}" patch-format gitmsg || gitmsg="%p (%n applied)"
+    else
+        zstyle -s ":vcs_info:${vcs}:${usercontext}:${rrn}" nopatch-format gitmsg || gitmsg="no patch applied"
+    fi
+    hook_com=( applied "${git_applied_s}"     unapplied "${git_patches_unapplied}"
+               applied-n ${#git_patches_applied} unapplied-n ${#git_patches_unapplied} all-n ${git_all} )
+    if VCS_INFO_hook 'set-patch-format' "${gitmsg}"; then
+        zformat -f gitmisc "${gitmsg}" "p:${hook_com[applied]}" "u:${hook_com[unapplied]}" \
+                                          "n:${#git_patches_applied}" "c:${#git_patches_unapplied}" "a:${git_all}"
+    else
+        gitmisc=${hook_com[patch-replace]}
+    fi
+    hook_com=()
+}
+
 gitdir=${vcs_comm[gitdir]}
 VCS_INFO_git_getbranch ${gitdir}
 if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" get-revision ; then
@@ -157,52 +195,46 @@ fi
 VCS_INFO_adjust
 VCS_INFO_git_getaction ${gitdir}
 
+
+VCS_INFO_get_get_rebase()
+{
+    if [[ -f "$1" ]]; then
+       echo "$(< "$1")"
+    fi
+}
+
 local patchdir=${gitdir}/patches/${gitbranch}
 if [[ -d $patchdir ]] && [[ -f $patchdir/applied ]] \
    && [[ -f $patchdir/unapplied ]]
 then
-    local -a stgit_applied stgit_unapplied stgit_all
-
-    stgit_applied=(${(f)"$(< "${patchdir}/applied")"})
-    stgit_applied=( ${(Oa)stgit_applied} )
-    stgit_unapplied=(${(f)"$(< "${patchdir}/unapplied")"})
-    stgit_unapplied=( ${(oa)stgit_unapplied} )
-    stgit_all=( ${(Oa)stgit_applied} ${stgit_unapplied} )
-
-    if VCS_INFO_hook 'gen-applied-string' "${stgit_applied[@]}"; then
-        if (( ${#stgit_applied} )); then
-            stgitpatch=${stgit_applied[1]}
-        else
-            stgitpatch=""
-        fi
-    else
-        stgitpatch=${hook_com[applied-string]}
-    fi
-    hook_com=()
-    if VCS_INFO_hook 'gen-unapplied-string' "${stgit_unapplied[@]}"; then
-        stgitunapplied=${#stgit_unapplied}
-    else
-        stgitunapplied=${hook_com[unapplied-string]}
-    fi
+    git_patches_applied=(${(f)"$(< "${patchdir}/applied")"})
+    git_patches_unapplied=(${(f)"$(< "${patchdir}/unapplied")"})
+    VCS_INFO_git_handle_patches
+elif [[ -d "${gitdir}/rebase-merge" ]]; then
+    patchdir="${gitdir}/rebase-merge"
+    local p
+    for p in ${(f)"$(< "${patchdir}/done")"}; do
+        # remove action
+        git_patches_applied+=("${${(s: :)p}[2,-1]}")
+    done
+    git_patches_unapplied=(${(f)"$(grep -v '^$' "${patchdir}/git-rebase-todo" | grep -v '^#')"})
+    VCS_INFO_git_handle_patches
+elif [[ -d "${gitdir}/rebase-apply" ]]; then
+    # Fake patch names for all but current patch
+    patchdir="${gitdir}/rebase-apply"
+    local cur=$(< "${patchdir}/next")
+    local p
+    for p in $(seq $(($cur - 1))); do
+        git_patches_applied+=("$(printf "%04d" $p) ?")
+    done
+    git_patches_applied+=("$(< "${patchdir}/original-commit") ${${(f)$(< "${patchdir}/msg-clean")}[1]}")
+    git_patches_unapplied=($(seq $cur $(< "${patchdir}/last")))
 
-    if (( ${#stgit_applied} )); then
-        zstyle -s ":vcs_info:${vcs}:${usercontext}:${rrn}" patch-format stgitmsg || stgitmsg="%p (%n applied)"
-    else
-        zstyle -s ":vcs_info:${vcs}:${usercontext}:${rrn}" nopatch-format stgitmsg || stgitmsg="no patch applied"
-    fi
-    hook_com=( applied "${stgitpatch}"     unapplied "${stgitunapplied}"
-               applied-n ${#stgit_applied} unapplied-n ${#stgit_unapplied} all-n ${#stgit_all} )
-    if VCS_INFO_hook 'set-patch-format' "${stgitmsg}"; then
-        zformat -f stgitmsg "${stgitmsg}" "p:${hook_com[applied]}" "u:${hook_com[unapplied]}" \
-                                          "n:${#stgit_applied}" "c:${#stgit_unapplied}" "a:${#stgit_all}"
-    else
-        stgitmsg=${hook_com[patch-replace]}
-    fi
-    hook_com=()
+    VCS_INFO_git_handle_patches
 else
-    stgitmsg=''
+    gitmisc=''
 fi
 
-backend_misc[patches]="${stgitmsg}"
-VCS_INFO_formats "${gitaction}" "${gitbranch}" "${gitbase}" "${gitstaged}" "${gitunstaged}" "${gitsha1}" "${stgitmsg}"
+backend_misc[patches]="${gitmisc}"
+VCS_INFO_formats "${gitaction}" "${gitbranch}" "${gitbase}" "${gitstaged}" "${gitunstaged}" "${gitsha1}" "${gitmisc}"
 return 0
-- 
2.1.0


^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 9/9] completion git: fix send-email --confirm values
  2014-09-12 21:30 Misc patches for git completion and vcs_info Marc Finet
                   ` (7 preceding siblings ...)
  2014-09-12 21:30 ` [PATCH 8/9] vcs_info git: consider patches for rebase Marc Finet
@ 2014-09-12 21:30 ` Marc Finet
  2014-09-14 10:11   ` Frank Terbeck
  2014-09-12 23:50 ` Misc patches for git completion and vcs_info Bart Schaefer
  2014-09-13 12:23 ` Frank Terbeck
  10 siblings, 1 reply; 37+ messages in thread
From: Marc Finet @ 2014-09-12 21:30 UTC (permalink / raw)
  To: zsh-workers; +Cc: Marc Finet

---
 Completion/Unix/Command/_git | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index d941aac..34a4e4f 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -3683,7 +3683,7 @@ _git-send-email () {
     '(--suppress-from                   )--no-suppress-from[add the From: address to the Cc: list]' \
     '(         --no-thread)--thread[set In-Reply-To: and References: headers]' \
     '(--thread            )--no-thread[do not set In-Reply-To: and References: headers]' \
-    '--confirm[specify type of confirmation required before sending]: :__git_sendemail_confirm' \
+    '--confirm[specify type of confirmation required before sending]: :__git_sendemail_confirm_values' \
     '--dry-run[do everything except actually sending the emails]' \
     '(               --no-format-patch)--format-patch[interpret ambiguous arguments as format-patch arguments]' \
     '(--format-patch                  )--no-format-patch[interpret ambiguous arguments file-name arguments]' \
-- 
2.1.0


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Misc patches for git completion and vcs_info
  2014-09-12 21:30 Misc patches for git completion and vcs_info Marc Finet
                   ` (8 preceding siblings ...)
  2014-09-12 21:30 ` [PATCH 9/9] completion git: fix send-email --confirm values Marc Finet
@ 2014-09-12 23:50 ` Bart Schaefer
  2014-09-13  7:35   ` Marc Finet
  2014-09-13 12:23 ` Frank Terbeck
  10 siblings, 1 reply; 37+ messages in thread
From: Bart Schaefer @ 2014-09-12 23:50 UTC (permalink / raw)
  To: zsh-workers

On Sep 12, 11:30pm, Marc Finet wrote:
}
} Below is a list of patches that i added in my current zsh (based on
} tonight's master). Please consider them for review as my zsh-level is
} currently very low (e.g. patch 2) and i might have broken other use-cases
} (patch 4 for instance makes me a little bit nervous as it seems to easy).

(I think you left out the list.)

I'll leave it to one of the people who more regularly messes with VCS_Info
to apply these, but here's my brief take on each of them:

[PATCH 1/9] vcs_info examples: fix typo

 - no issues with this one

[PATCH 2/9] completion git: support aliases when \n exist

 - looks OK, but my "git config" foo is too weak to assess

PATCH 3/9] vcs_info git: detect revert or cherry-pick with multiple commits

 - no issues

[PATCH 4/9] vcs_info git: set rrn before using it

 - seems pretty obvious

[PATCH 5/9] vcs_info quilt: fix standalone detection

 - I'm not sure this is correct; do we need to differentiate (( $# == 1 ))
   from [[ -z "$2" ]] ?

[PATCH 6/9] vcs_info quilt: fix unapplied detection on sub-directory

 - $(basename $patches) can be replaced with ${patches:t}

[PATCH 7/9] vcs_info git: fix applied-string name

 - seems pretty obvious

[PATCH 8/9] vcs_info git: consider patches for rebase

 - needs git foo currently beyond me to confirm correctness

[PATCH 9/9] completion git: fix send-email --confirm values

 - no issues


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Misc patches for git completion and vcs_info
  2014-09-12 23:50 ` Misc patches for git completion and vcs_info Bart Schaefer
@ 2014-09-13  7:35   ` Marc Finet
  0 siblings, 0 replies; 37+ messages in thread
From: Marc Finet @ 2014-09-13  7:35 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-workers

The Fri, 12 Sep 2014 16:50:46 -0700, Bart Schaefer
<schaefer@brasslantern.com> wrote 

> On Sep 12, 11:30pm, Marc Finet wrote:
> }
> } Below is a list of patches that i added in my current zsh (based
> on } tonight's master). Please consider them for review as my
> zsh-level is } currently very low (e.g. patch 2) and i might have
> broken other use-cases } (patch 4 for instance makes me a little
> bit nervous as it seems to easy).
> 
> (I think you left out the list.)
My bad, i'm not yet fluent with git send-email.
 
> I'll leave it to one of the people who more regularly messes with
> VCS_Info to apply these, but here's my brief take on each of them:
> 
> [PATCH 1/9] vcs_info examples: fix typo
> 
>  - no issues with this one
> 
> [PATCH 2/9] completion git: support aliases when \n exist
> 
>  - looks OK, but my "git config" foo is too weak to assess
> 
> PATCH 3/9] vcs_info git: detect revert or cherry-pick with multiple
> commits
> 
>  - no issues
> 
> [PATCH 4/9] vcs_info git: set rrn before using it
> 
>  - seems pretty obvious
> 
> [PATCH 5/9] vcs_info quilt: fix standalone detection
> 
>  - I'm not sure this is correct; do we need to differentiate (( $#
> == 1 )) from [[ -z "$2" ]] ?
Since VCS_INFO_bydir_detect would use the vcs_comm[detect_need_file]:
    for file in ${(s: :)${vcs_comm[detect_need_file]}}; do ...
we have to (re)set it, but i admit that setting it this way (with
a non-existent value) might not be the best way.

> 
> [PATCH 6/9] vcs_info quilt: fix unapplied detection on sub-directory
> 
>  - $(basename $patches) can be replaced with ${patches:t}
Ok (I'll try to remember more parameter expansions).

> [PATCH 7/9] vcs_info git: fix applied-string name
> 
>  - seems pretty obvious
> 
> [PATCH 8/9] vcs_info git: consider patches for rebase
> 
>  - needs git foo currently beyond me to confirm correctness
> 
> [PATCH 9/9] completion git: fix send-email --confirm values
> 
>  - no issues

Thanks for the review,

Marc.


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: Misc patches for git completion and vcs_info
  2014-09-12 21:30 Misc patches for git completion and vcs_info Marc Finet
                   ` (9 preceding siblings ...)
  2014-09-12 23:50 ` Misc patches for git completion and vcs_info Bart Schaefer
@ 2014-09-13 12:23 ` Frank Terbeck
  10 siblings, 0 replies; 37+ messages in thread
From: Frank Terbeck @ 2014-09-13 12:23 UTC (permalink / raw)
  To: Marc Finet; +Cc: zsh-workers

Hey Marc,

Marc Finet wrote:
> Below is a list of patches that i added in my current zsh (based on
> tonight's master). Please consider them for review as my zsh-level is
> currently very low (e.g. patch 2) and i might have broken other use-cases
> (patch 4 for instance makes me a little bit nervous as it seems to easy).

I'll take a look at the vcs_info related ones as soon as I can; most
look straightforward, though. I'm so far only unsure about the patches
that touch the quilt backend (well, and the big one, 8/9, which I didn't
look at, yet, at all).

git-completion patches: The one about _confirm vs. _confirm_values is
correct, since __git_sendemail_confirm() doesn't even exist.

The one about the alias completion, is a bit more complex, obviously. I
don't have multi-line aliases set in my git-configuration, so I'll take
your word for it. :-)


Regards, Frank


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 4/9] vcs_info git: set rrn before using it
  2014-09-12 21:30 ` [PATCH 4/9] vcs_info git: set rrn before using it Marc Finet
@ 2014-09-14  9:33   ` Frank Terbeck
  2014-09-16 20:07     ` Marc Finet
  0 siblings, 1 reply; 37+ messages in thread
From: Frank Terbeck @ 2014-09-14  9:33 UTC (permalink / raw)
  To: Marc Finet; +Cc: zsh-workers

Marc Finet wrote:
> This would fix setting check-for-changes or
> check-for-staged-changes per repository.

This is a good catch. There is another reference of $rrn earlier though
at

  if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" get-revision ; then

I think the chunk you moved should be moved before that.


Regards, Frank


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 1/9] vcs_info examples: fix typo
  2014-09-12 21:30 ` [PATCH 1/9] vcs_info examples: fix typo Marc Finet
@ 2014-09-14  9:33   ` Frank Terbeck
  0 siblings, 0 replies; 37+ messages in thread
From: Frank Terbeck @ 2014-09-14  9:33 UTC (permalink / raw)
  To: Marc Finet; +Cc: zsh-workers

Marc Finet wrote:
> -    # it (ret=1 means run it, ret=0 means don't).
> +    # it (ret=0 means run it, ret=1 means don't).

Yeap, correct. Thanks!


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 3/9] vcs_info git: detect revert or cherry-pick with multiple commits
  2014-09-12 21:30 ` [PATCH 3/9] vcs_info git: detect revert or cherry-pick with multiple commits Marc Finet
@ 2014-09-14  9:36   ` Frank Terbeck
  2014-09-15  6:22     ` Phil Pennock
  0 siblings, 1 reply; 37+ messages in thread
From: Frank Terbeck @ 2014-09-14  9:36 UTC (permalink / raw)
  To: Marc Finet; +Cc: zsh-workers

Marc Finet wrote:
> When revert or cherry-pick involve many commits the .git/sequencer
> directory holds context for the action and no CHERRY_PICK_HEAD exist.

Hm. I've never hit that situation. I suppose it's correct. You wouldn't
happen to have a documentation reference to this one?


Regards, Frank


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 5/9] vcs_info quilt: fix standalone detection
  2014-09-12 21:30 ` [PATCH 5/9] vcs_info quilt: fix standalone detection Marc Finet
@ 2014-09-14  9:42   ` Frank Terbeck
  2014-09-16 20:19     ` Marc Finet
  0 siblings, 1 reply; 37+ messages in thread
From: Frank Terbeck @ 2014-09-14  9:42 UTC (permalink / raw)
  To: Marc Finet; +Cc: zsh-workers

Marc Finet wrote:
[...]
> -    if [[ -n "${file}" ]]; then
> -        oldfile=${vcs_comm[detect_need_file]}
> -        vcs_comm[detect_need_file]=${file}
> -    fi
> +    oldfile=${vcs_comm[detect_need_file]}
> +    vcs_comm[detect_need_file]=${file}
>      VCS_INFO_bydir_detect ${dir}
>      ret=$?
> -    [[ -n "${file}" ]] && vcs_comm[detect_need_file]=${oldfile}
> +    vcs_comm[detect_need_file]=${oldfile}

I don't think this changes anything really, but the removing the
conditionals makes the code a bit easier to read. So ACK.


Regards, Frank


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 6/9] vcs_info quilt: fix unapplied detection on sub-directory
  2014-09-12 21:30 ` [PATCH 6/9] vcs_info quilt: fix unapplied detection on sub-directory Marc Finet
@ 2014-09-14  9:47   ` Frank Terbeck
  2014-09-16 20:25     ` Marc Finet
  2014-10-08 22:36     ` Marc Finet
  0 siblings, 2 replies; 37+ messages in thread
From: Frank Terbeck @ 2014-09-14  9:47 UTC (permalink / raw)
  To: Marc Finet; +Cc: zsh-workers

Marc Finet wrote:
> When being in a subdirectory of a "repo" being handled with quilt,
> the `quilt unapplied` command returns all the patches because
> QUILT_PATCHES is an absolute path (which exists and is a dir) and
> quilt considers that .pc should in current directory.
> Changing quilt might be overkill and it seems that QUILT_PATCHES
> should just be a name, not an absolute path.
[...]
> -        unapplied=( ${(f)"$(QUILT_PATCHES=$patches $quiltcommand --quiltrc /dev/null unapplied 2> /dev/null)"} )
> +        unapplied=( ${(f)"$(QUILT_PATCHES=$(basename $patches) $quiltcommand --quiltrc /dev/null unapplied 2> /dev/null)"} )


You can't do it like this. With debian-packages for example, quilt
patches live in ‘debian/patches’, which the ‘basename’ call would trim
down to ‘patches’.

If you do need special QUILT_PATCHES treatment, you can set a
‘quit-patches-dir’ style; if the treatment needs to be fancy, you can
also set the style to a function, which opens up the door to whatever
you like.


Regards, Frank


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 7/9] vcs_info git: fix applied-string name
  2014-09-12 21:30 ` [PATCH 7/9] vcs_info git: fix applied-string name Marc Finet
@ 2014-09-14  9:49   ` Frank Terbeck
  0 siblings, 0 replies; 37+ messages in thread
From: Frank Terbeck @ 2014-09-14  9:49 UTC (permalink / raw)
  To: Marc Finet; +Cc: zsh-workers

Marc Finet wrote:
[...]
> -        stgitpatch=${hook_com[patch-string]}
> +        stgitpatch=${hook_com[applied-string]}

Makes sense I guess. ACK.


Regards, Frank


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 8/9] vcs_info git: consider patches for rebase
  2014-09-12 21:30 ` [PATCH 8/9] vcs_info git: consider patches for rebase Marc Finet
@ 2014-09-14 10:08   ` Frank Terbeck
  2014-09-14 10:13     ` Frank Terbeck
  0 siblings, 1 reply; 37+ messages in thread
From: Frank Terbeck @ 2014-09-14 10:08 UTC (permalink / raw)
  To: Marc Finet; +Cc: zsh-workers

Marc Finet wrote:
> Since a rebase contains a list of patches to re-apply, re-use the
> facility for stgit to have the same mechanism.
> The patch list given to the gen-{un,}applied-string hooks is an array
> with the sha1 and the subject of the commit. On rebase merge, the
> applied patches prior to current contains only a number and "?".

Okay. This looks good, unless I missed something.

Let's apply it and see if people start to complain. :-)


Regards, Frank


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 9/9] completion git: fix send-email --confirm values
  2014-09-12 21:30 ` [PATCH 9/9] completion git: fix send-email --confirm values Marc Finet
@ 2014-09-14 10:11   ` Frank Terbeck
  0 siblings, 0 replies; 37+ messages in thread
From: Frank Terbeck @ 2014-09-14 10:11 UTC (permalink / raw)
  To: Marc Finet; +Cc: zsh-workers

Marc Finet wrote:
> -    '--confirm[specify type of confirmation required before sending]: :__git_sendemail_confirm' \
> +    '--confirm[specify type of confirmation required before sending]: :__git_sendemail_confirm_values' \

Yes, this one is correct again.

I'll be pushing the following patches in a bit:

 [PATCH 1/9] vcs_info examples: fix typo
 [PATCH 2/9] completion git: support aliases when \n e
 [PATCH 3/9] vcs_info git: detect revert or cherry-pic
 [PATCH 5/9] vcs_info quilt: fix standalone detection
 [PATCH 7/9] vcs_info git: fix applied-string name
 [PATCH 9/9] completion git: fix send-email --confirm

I will not push these for now:

 [PATCH 6/9] vcs_info quilt: fix unapplied detection o

   ...because I don't think this one is correct. See my reply to the
   individual mail.

 [PATCH 4/9] vcs_info git: set rrn before using it

   Basically correct, but it should be set even earlier. See the
   individual mail about this as well.

 [PATCH 8/9] vcs_info git: consider patches for rebase

   I'm not quite through this one yet. But I like the basic idea and so
   far I've not seen anything that seems obviously wrong. I just need
   some more time.


Regards, Frank


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 8/9] vcs_info git: consider patches for rebase
  2014-09-14 10:08   ` Frank Terbeck
@ 2014-09-14 10:13     ` Frank Terbeck
  2014-09-16 20:07       ` Marc Finet
  0 siblings, 1 reply; 37+ messages in thread
From: Frank Terbeck @ 2014-09-14 10:13 UTC (permalink / raw)
  To: Marc Finet; +Cc: zsh-workers

Frank Terbeck wrote:
> Let's apply it and see if people start to complain. :-)

...ungh. Because I didn't apply the $rrn patch yet, this doesn't apply
cleanly. Do you mind updating the $rrn patch and then rebase this one on
top of it and resend these two?

Thanks!


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 3/9] vcs_info git: detect revert or cherry-pick with multiple commits
  2014-09-14  9:36   ` Frank Terbeck
@ 2014-09-15  6:22     ` Phil Pennock
  0 siblings, 0 replies; 37+ messages in thread
From: Phil Pennock @ 2014-09-15  6:22 UTC (permalink / raw)
  To: Frank Terbeck; +Cc: Marc Finet, zsh-workers

On 2014-09-14 at 11:36 +0200, Frank Terbeck wrote:
> Marc Finet wrote:
> > When revert or cherry-pick involve many commits the .git/sequencer
> > directory holds context for the action and no CHERRY_PICK_HEAD exist.
> 
> Hm. I've never hit that situation. I suppose it's correct. You wouldn't
> happen to have a documentation reference to this one?

There are regression tests in t/t3507-cherry-pick-conflict.sh inside the
Git tree which show the situations in which the CHERRY_PICK_HEAD must or
must not exist.

Looks like options such as `--strategy=resolve` will inhibit the
creation of that file.

http://git-scm.com/docs/git-cherry-pick

----------------------------8< cut here >8------------------------------
SEQUENCER SUBCOMMANDS
--continue
Continue the operation in progress using the information in
.git/sequencer. Can be used to continue after resolving conflicts in a
failed cherry-pick or revert.
----------------------------8< cut here >8------------------------------

That's not proof that .git/sequencer can hold information even when
CHERRY_PICK_HEAD exists, but it's suggestive.

It _looks_ as though, if you are cherry-picking multiple commits in one
invocation, then .git/sequencer will exist; during the processing of
each commit in turn, CHERRY_PICK_HEAD will usually be created, then
removed iff that cherry-pick was successful.

-Phil


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 4/9] vcs_info git: set rrn before using it
  2014-09-14  9:33   ` Frank Terbeck
@ 2014-09-16 20:07     ` Marc Finet
  2014-09-16 20:41       ` Frank Terbeck
  0 siblings, 1 reply; 37+ messages in thread
From: Marc Finet @ 2014-09-16 20:07 UTC (permalink / raw)
  To: Frank Terbeck; +Cc: zsh-workers

On Sun, 14 Sep 2014 11:33:03 +0200
Frank Terbeck <ft@bewatermyfriend.org> wrote:

> Marc Finet wrote:
> > This would fix setting check-for-changes or
> > check-for-staged-changes per repository.
> 
> This is a good catch. There is another reference of $rrn earlier
> though at
> 
>   if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}"
> get-revision ; then
> 
> I think the chunk you moved should be moved before that.

Well spotted. Here is v2:

This would fix handling get-revision, check-for-changes or
check-for-staged-changes when set per repository.
---
 Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git index
263a325..6231301 100644 ---
a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git +++
b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git @@ -115,6 +115,8 @@
VCS_INFO_git_getbranch () { 
 gitdir=${vcs_comm[gitdir]}
 VCS_INFO_git_getbranch ${gitdir}
+gitbase=$( ${vcs_comm[cmd]} rev-parse --show-toplevel )
+rrn=${gitbase:t}
 if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" get-revision ;
then gitsha1=$(${vcs_comm[cmd]} rev-parse --quiet --verify HEAD)
 else
@@ -154,8 +156,6 @@ fi
 
 VCS_INFO_adjust
 VCS_INFO_git_getaction ${gitdir}
-gitbase=$( ${vcs_comm[cmd]} rev-parse --show-toplevel )
-rrn=${gitbase:t}
 
 local patchdir=${gitdir}/patches/${gitbranch}
 if [[ -d $patchdir ]] && [[ -f $patchdir/applied ]] \
-- 
2.1.0



^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 8/9] vcs_info git: consider patches for rebase
  2014-09-14 10:13     ` Frank Terbeck
@ 2014-09-16 20:07       ` Marc Finet
  0 siblings, 0 replies; 37+ messages in thread
From: Marc Finet @ 2014-09-16 20:07 UTC (permalink / raw)
  To: Frank Terbeck; +Cc: zsh-workers

On Sun, 14 Sep 2014 12:13:02 +0200
Frank Terbeck <ft@bewatermyfriend.org> wrote:

> Frank Terbeck wrote:
> > Let's apply it and see if people start to complain. :-)
> 
> ...ungh. Because I didn't apply the $rrn patch yet, this doesn't apply
> cleanly. Do you mind updating the $rrn patch and then rebase this one
> on top of it and resend these two?
> 
> Thanks!

Sure, here comes the v2 against patch4 (rrn) updated:

Since a rebase contains a list of patches to re-apply, re-use the
facility for stgit to have the same mechanism.
The patch list given to the gen-{un,}applied-string hooks is an array
with the sha1 and the subject of the commit. On rebase merge, the
applied patches prior to current contains only a number and "?".
---
 Doc/Zsh/contrib.yo                                |  14 +--
 Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 116 ++++++++++++++--------
 2 files changed, 81 insertions(+), 49 deletions(-)

diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo
index 1c1a66a..361e866 100644
--- a/Doc/Zsh/contrib.yo
+++ b/Doc/Zsh/contrib.yo
@@ -1296,10 +1296,10 @@ tt(formats) and tt(actionformats) and will be availabe in the global
 tt(backend_misc) array as tt(${backend_misc[bookmarks]}).
 )
 item(tt(gen-applied-string))(
-Called in the tt(git) (with tt(stgit)), and tt(hg) (with tt(mq)) backends
-and in tt(quilt) support when the tt(applied-string) is generated; the
-tt(use-quilt) zstyle must be true for tt(quilt) (the tt(mq) and tt(stgit)
-backends are active by default).
+Called in the tt(git) (with tt(stgit) or during rebase), and tt(hg)
+(with tt(mq)) backends and in tt(quilt) support when the tt(applied-string)
+is generated; the tt(use-quilt) zstyle must be true for tt(quilt) (the tt(mq)
+and tt(stgit) backends are active by default).
 
 This hook gets the names of all applied patches which tt(vcs_info) collected
 so far in the opposite order, which means that the first argument is the
@@ -1312,9 +1312,9 @@ tt(backend_misc) array as tt($backend_misc[patches]}); and it will be
 available as tt(%p) in the tt(patch-format) and tt(nopatch-format) styles.
 )
 item(tt(gen-unapplied-string))(
-Called in the tt(git) (with tt(stgit)), and tt(hg) (with tt(mq)) backend
-and in tt(quilt) support when the tt(unapplied-string) is generated; the
-tt(get-unapplied) style must be true.
+Called in the tt(git) (with tt(stgit) or during rebase), and tt(hg) (with
+tt(mq)) backend and in tt(quilt) support when the tt(unapplied-string) is
+generated; the tt(get-unapplied) style must be true.
 
 This hook gets the names of all unapplied patches which tt(vcs_info)
 collected so far in the opposite order, which mean that the first argument is
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
index 24efab2..c243bf7 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
@@ -3,9 +3,9 @@
 ## Distributed under the same BSD-ish license as zsh itself.
 
 setopt localoptions extendedglob NO_shwordsplit
-local gitdir gitbase gitbranch gitaction gitunstaged gitstaged gitsha1
-local stgitpatch stgitunapplied
+local gitdir gitbase gitbranch gitaction gitunstaged gitstaged gitsha1 gitmisc
 local -i querystaged queryunstaged
+local -a git_patches_applied git_patches_unapplied
 local -A hook_com
 
 VCS_INFO_git_getaction () {
@@ -113,6 +113,44 @@ VCS_INFO_git_getbranch () {
     return 0
 }
 
+VCS_INFO_git_handle_patches () {
+    local git_applied_s git_unapplied_s gitmsg git_all
+    git_patches_applied=(${(Oa)git_patches_applied})
+    git_patches_unapplied=(${(Oa)git_patches_unapplied})
+    (( git_all = ${#git_patches_applied} + ${#git_patches_unapplied} ))
+
+    if VCS_INFO_hook 'gen-applied-string' "${git_patches_applied[@]}"; then
+        if (( ${#git_patches_applied} )); then
+            git_applied_s=${git_patches_applied[1]}
+        else
+            git_applied_s=""
+        fi
+    else
+        git_applied_s=${hook_com[applied-string]}
+    fi
+    hook_com=()
+    if VCS_INFO_hook 'gen-unapplied-string' "${git_patches_unapplied[@]}"; then
+        git_patches_unapplied=${#git_patches_unapplied}
+    else
+        git_patches_unapplied=${hook_com[unapplied-string]}
+    fi
+
+    if (( ${#git_patches_applied} )); then
+        zstyle -s ":vcs_info:${vcs}:${usercontext}:${rrn}" patch-format gitmsg || gitmsg="%p (%n applied)"
+    else
+        zstyle -s ":vcs_info:${vcs}:${usercontext}:${rrn}" nopatch-format gitmsg || gitmsg="no patch applied"
+    fi
+    hook_com=( applied "${git_applied_s}"     unapplied "${git_patches_unapplied}"
+               applied-n ${#git_patches_applied} unapplied-n ${#git_patches_unapplied} all-n ${git_all} )
+    if VCS_INFO_hook 'set-patch-format' "${gitmsg}"; then
+        zformat -f gitmisc "${gitmsg}" "p:${hook_com[applied]}" "u:${hook_com[unapplied]}" \
+                                          "n:${#git_patches_applied}" "c:${#git_patches_unapplied}" "a:${git_all}"
+    else
+        gitmisc=${hook_com[patch-replace]}
+    fi
+    hook_com=()
+}
+
 gitdir=${vcs_comm[gitdir]}
 VCS_INFO_git_getbranch ${gitdir}
 gitbase=$( ${vcs_comm[cmd]} rev-parse --show-toplevel )
@@ -157,52 +195,46 @@ fi
 VCS_INFO_adjust
 VCS_INFO_git_getaction ${gitdir}
 
+
+VCS_INFO_get_get_rebase()
+{
+    if [[ -f "$1" ]]; then
+       echo "$(< "$1")"
+    fi
+}
+
 local patchdir=${gitdir}/patches/${gitbranch}
 if [[ -d $patchdir ]] && [[ -f $patchdir/applied ]] \
    && [[ -f $patchdir/unapplied ]]
 then
-    local -a stgit_applied stgit_unapplied stgit_all
-
-    stgit_applied=(${(f)"$(< "${patchdir}/applied")"})
-    stgit_applied=( ${(Oa)stgit_applied} )
-    stgit_unapplied=(${(f)"$(< "${patchdir}/unapplied")"})
-    stgit_unapplied=( ${(oa)stgit_unapplied} )
-    stgit_all=( ${(Oa)stgit_applied} ${stgit_unapplied} )
-
-    if VCS_INFO_hook 'gen-applied-string' "${stgit_applied[@]}"; then
-        if (( ${#stgit_applied} )); then
-            stgitpatch=${stgit_applied[1]}
-        else
-            stgitpatch=""
-        fi
-    else
-        stgitpatch=${hook_com[applied-string]}
-    fi
-    hook_com=()
-    if VCS_INFO_hook 'gen-unapplied-string' "${stgit_unapplied[@]}"; then
-        stgitunapplied=${#stgit_unapplied}
-    else
-        stgitunapplied=${hook_com[unapplied-string]}
-    fi
+    git_patches_applied=(${(f)"$(< "${patchdir}/applied")"})
+    git_patches_unapplied=(${(f)"$(< "${patchdir}/unapplied")"})
+    VCS_INFO_git_handle_patches
+elif [[ -d "${gitdir}/rebase-merge" ]]; then
+    patchdir="${gitdir}/rebase-merge"
+    local p
+    for p in ${(f)"$(< "${patchdir}/done")"}; do
+        # remove action
+        git_patches_applied+=("${${(s: :)p}[2,-1]}")
+    done
+    git_patches_unapplied=(${(f)"$(grep -v '^$' "${patchdir}/git-rebase-todo" | grep -v '^#')"})
+    VCS_INFO_git_handle_patches
+elif [[ -d "${gitdir}/rebase-apply" ]]; then
+    # Fake patch names for all but current patch
+    patchdir="${gitdir}/rebase-apply"
+    local cur=$(< "${patchdir}/next")
+    local p
+    for p in $(seq $(($cur - 1))); do
+        git_patches_applied+=("$(printf "%04d" $p) ?")
+    done
+    git_patches_applied+=("$(< "${patchdir}/original-commit") ${${(f)$(< "${patchdir}/msg-clean")}[1]}")
+    git_patches_unapplied=($(seq $cur $(< "${patchdir}/last")))
 
-    if (( ${#stgit_applied} )); then
-        zstyle -s ":vcs_info:${vcs}:${usercontext}:${rrn}" patch-format stgitmsg || stgitmsg="%p (%n applied)"
-    else
-        zstyle -s ":vcs_info:${vcs}:${usercontext}:${rrn}" nopatch-format stgitmsg || stgitmsg="no patch applied"
-    fi
-    hook_com=( applied "${stgitpatch}"     unapplied "${stgitunapplied}"
-               applied-n ${#stgit_applied} unapplied-n ${#stgit_unapplied} all-n ${#stgit_all} )
-    if VCS_INFO_hook 'set-patch-format' "${stgitmsg}"; then
-        zformat -f stgitmsg "${stgitmsg}" "p:${hook_com[applied]}" "u:${hook_com[unapplied]}" \
-                                          "n:${#stgit_applied}" "c:${#stgit_unapplied}" "a:${#stgit_all}"
-    else
-        stgitmsg=${hook_com[patch-replace]}
-    fi
-    hook_com=()
+    VCS_INFO_git_handle_patches
 else
-    stgitmsg=''
+    gitmisc=''
 fi
 
-backend_misc[patches]="${stgitmsg}"
-VCS_INFO_formats "${gitaction}" "${gitbranch}" "${gitbase}" "${gitstaged}" "${gitunstaged}" "${gitsha1}" "${stgitmsg}"
+backend_misc[patches]="${gitmisc}"
+VCS_INFO_formats "${gitaction}" "${gitbranch}" "${gitbase}" "${gitstaged}" "${gitunstaged}" "${gitsha1}" "${gitmisc}"
 return 0
-- 
2.1.0


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 5/9] vcs_info quilt: fix standalone detection
  2014-09-14  9:42   ` Frank Terbeck
@ 2014-09-16 20:19     ` Marc Finet
  0 siblings, 0 replies; 37+ messages in thread
From: Marc Finet @ 2014-09-16 20:19 UTC (permalink / raw)
  To: Frank Terbeck; +Cc: zsh-workers

On Sun, 14 Sep 2014 11:42:55 +0200
Frank Terbeck <ft@bewatermyfriend.org> wrote:

> Marc Finet wrote:
> [...]
> > -    if [[ -n "${file}" ]]; then
> > -        oldfile=${vcs_comm[detect_need_file]}
> > -        vcs_comm[detect_need_file]=${file}
> > -    fi
> > +    oldfile=${vcs_comm[detect_need_file]}
> > +    vcs_comm[detect_need_file]=${file}
> >      VCS_INFO_bydir_detect ${dir}
> >      ret=$?
> > -    [[ -n "${file}" ]] && vcs_comm[detect_need_file]=${oldfile}
> > +    vcs_comm[detect_need_file]=${oldfile}
> 
> I don't think this changes anything really, but the removing the
> conditionals makes the code a bit easier to read. So ACK.
I can't remember on which case i fell on this case but
vcs_comm[detect_need_file] was set (and not cleared) by a previous call
hence finally not detecting quilt correctly. While reading at the patch
once more, it might not have interfered with quilt but by an other
backend that set vcs_comm[detect_need_file].

Marc.


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 6/9] vcs_info quilt: fix unapplied detection on sub-directory
  2014-09-14  9:47   ` Frank Terbeck
@ 2014-09-16 20:25     ` Marc Finet
  2014-10-08 22:36     ` Marc Finet
  1 sibling, 0 replies; 37+ messages in thread
From: Marc Finet @ 2014-09-16 20:25 UTC (permalink / raw)
  To: Frank Terbeck; +Cc: zsh-workers

On Sun, 14 Sep 2014 11:47:55 +0200
Frank Terbeck <ft@bewatermyfriend.org> wrote:

> Marc Finet wrote:
> > When being in a subdirectory of a "repo" being handled with quilt,
> > the `quilt unapplied` command returns all the patches because
> > QUILT_PATCHES is an absolute path (which exists and is a dir) and
> > quilt considers that .pc should in current directory.
> > Changing quilt might be overkill and it seems that QUILT_PATCHES
> > should just be a name, not an absolute path.
> [...]
> > -        unapplied=( ${(f)"$(QUILT_PATCHES=$patches $quiltcommand
> > --quiltrc /dev/null unapplied 2> /dev/null)"} )
> > +        unapplied=( ${(f)"$(QUILT_PATCHES=$(basename $patches)
> > $quiltcommand --quiltrc /dev/null unapplied 2> /dev/null)"} )
> 
> 
> You can't do it like this. With debian-packages for example, quilt
> patches live in ‘debian/patches’, which the ‘basename’ call would trim
> down to ‘patches’.
> 
> If you do need special QUILT_PATCHES treatment, you can set a
> ‘quit-patches-dir’ style; if the treatment needs to be fancy, you can
> also set the style to a function, which opens up the door to whatever
> you like.

Hum, I can't remember on which quilt settings the problem occurred (I
should have explained it on the commit message more), but I
have seen the debian/patches on a few places. I need to re-test all the
places i have quilt to be sure of the intended behavior. Please drop
this patch as there is still a problem with debian/patches as with this
patch vcs_info reports twice the number of patches (they appear both in
applied and unapplied, i.e. the problem I tried to fix).

Marc.


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 4/9] vcs_info git: set rrn before using it
  2014-09-16 20:07     ` Marc Finet
@ 2014-09-16 20:41       ` Frank Terbeck
  2014-09-16 20:57         ` Marc Finet
  0 siblings, 1 reply; 37+ messages in thread
From: Frank Terbeck @ 2014-09-16 20:41 UTC (permalink / raw)
  To: Marc Finet; +Cc: zsh-workers

Marc Finet wrote:
[...]
> diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
> b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git index
> 263a325..6231301 100644 ---
> a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git +++
> b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git @@ -115,6 +115,8 @@
> VCS_INFO_git_getbranch () { 
>  gitdir=${vcs_comm[gitdir]}
>  VCS_INFO_git_getbranch ${gitdir}
> +gitbase=$( ${vcs_comm[cmd]} rev-parse --show-toplevel )
> +rrn=${gitbase:t}
>  if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" get-revision ;
> then gitsha1=$(${vcs_comm[cmd]} rev-parse --quiet --verify HEAD)
[...]

This patch looks like it was mutilated by MUA. Could you resend? Maybe
using "git send-email" or if all else fails, the .patch file attached to
an email?


Regards, Frank


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 4/9] vcs_info git: set rrn before using it
  2014-09-16 20:41       ` Frank Terbeck
@ 2014-09-16 20:57         ` Marc Finet
  2014-09-16 21:23           ` Frank Terbeck
  0 siblings, 1 reply; 37+ messages in thread
From: Marc Finet @ 2014-09-16 20:57 UTC (permalink / raw)
  To: Frank Terbeck; +Cc: zsh-workers

On Tue, 16 Sep 2014 22:41:17 +0200
Frank Terbeck <ft@bewatermyfriend.org> wrote:

> Marc Finet wrote:
> [...]
> > diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
> > b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git index
> > 263a325..6231301 100644 ---
> > a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git +++
> > b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git @@ -115,6
> > +115,8 @@ VCS_INFO_git_getbranch () { 
> >  gitdir=${vcs_comm[gitdir]}
> >  VCS_INFO_git_getbranch ${gitdir}
> > +gitbase=$( ${vcs_comm[cmd]} rev-parse --show-toplevel )
> > +rrn=${gitbase:t}
> >  if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}"
> > get-revision ; then gitsha1=$(${vcs_comm[cmd]} rev-parse --quiet
> > --verify HEAD)
> [...]
> 
> This patch looks like it was mutilated by MUA. Could you resend? Maybe
> using "git send-email" or if all else fails, the .patch file attached
> to an email?

Should be better now.

Marc [still configuring my "new" machine].

This would fix handling get-revision, check-for-changes or
check-for-staged-changes when set per repository.

---
 Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
index 263a325..6231301 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
@@ -115,6 +115,8 @@ VCS_INFO_git_getbranch () {
 
 gitdir=${vcs_comm[gitdir]}
 VCS_INFO_git_getbranch ${gitdir}
+gitbase=$( ${vcs_comm[cmd]} rev-parse --show-toplevel )
+rrn=${gitbase:t}
 if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" get-revision ; then
     gitsha1=$(${vcs_comm[cmd]} rev-parse --quiet --verify HEAD)
 else
@@ -154,8 +156,6 @@ fi
 
 VCS_INFO_adjust
 VCS_INFO_git_getaction ${gitdir}
-gitbase=$( ${vcs_comm[cmd]} rev-parse --show-toplevel )
-rrn=${gitbase:t}
 
 local patchdir=${gitdir}/patches/${gitbranch}
 if [[ -d $patchdir ]] && [[ -f $patchdir/applied ]] \
-- 
2.1.0


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 4/9] vcs_info git: set rrn before using it
  2014-09-16 20:57         ` Marc Finet
@ 2014-09-16 21:23           ` Frank Terbeck
  0 siblings, 0 replies; 37+ messages in thread
From: Frank Terbeck @ 2014-09-16 21:23 UTC (permalink / raw)
  To: Marc Finet; +Cc: zsh-workers

Marc Finet wrote:
[...]
> Should be better now.

Yup, thanks. Applied those last two right now.


Regards, Frank


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 6/9] vcs_info quilt: fix unapplied detection on sub-directory
  2014-09-14  9:47   ` Frank Terbeck
  2014-09-16 20:25     ` Marc Finet
@ 2014-10-08 22:36     ` Marc Finet
  2014-10-09 16:03       ` Frank Terbeck
  1 sibling, 1 reply; 37+ messages in thread
From: Marc Finet @ 2014-10-08 22:36 UTC (permalink / raw)
  To: Frank Terbeck; +Cc: zsh-workers

On Sun, Sep 14, 2014 at 11:47:55AM +0200, Frank Terbeck wrote:
> Marc Finet wrote:
> > When being in a subdirectory of a "repo" being handled with quilt,
> > the `quilt unapplied` command returns all the patches because
> > QUILT_PATCHES is an absolute path (which exists and is a dir) and
> > quilt considers that .pc should in current directory.
> > Changing quilt might be overkill and it seems that QUILT_PATCHES
> > should just be a name, not an absolute path.
> [...]
> > -        unapplied=( ${(f)"$(QUILT_PATCHES=$patches $quiltcommand --quiltrc /dev/null unapplied 2> /dev/null)"} )
> > +        unapplied=( ${(f)"$(QUILT_PATCHES=$(basename $patches) $quiltcommand --quiltrc /dev/null unapplied 2> /dev/null)"} )
> 
> 
> You can't do it like this. With debian-packages for example, quilt
> patches live in ‘debian/patches’, which the ‘basename’ call would trim
> down to ‘patches’.
> 
> If you do need special QUILT_PATCHES treatment, you can set a
> ‘quit-patches-dir’ style; if the treatment needs to be fancy, you can
> also set the style to a function, which opens up the door to whatever
> you like.
Hum, in fact this commit was intented to 'fix' such the debian/ behavior
but miserably failed. I tested different settings and here are my results;
for debian patches, the working tree is as follows:
  work/
  ├── debian/
  │    ├── patches/
  │    │     ├── series         (list of patches to apply)
  │    │     ├── patch1.diff    (one particular patch)
  │    │     ├── patch2.diff
  │    │     └── ...
  │    └── ...
  ├── .pc/
  │    ├── .quilt_patches (content of QUILT_PATCHES)
  │    ├── .quilt_series  (content of QUILT_SERIES)
  │    ├── patch1.diff/   (copy of patched files)
  │    │    └── ...
  │    ├── patch2.diff/
  │    │    └── ...
  │    └── ...
  └── ...
But:
  - 1) without setting QUILT_PATCHES nor quilt-patch-dir:
     - quilt is not detected in work/
     - quilt is detected in work/anything/ but reports all patches
       as both applied and unapplied (%a/%p gives x/2x)
     - `quilt` does not work if no .pc/ exists
  - 2) with QUILT_PATCHES set to "debian":
     - quilt is detected everywhere and reports correct patches
       numbers
     - but `quilt` stops to work (e.g. `quilt series` shows only
       latest patch, `quilt pop` fails)
  - 3) with QUILT_PATCHES set to "debian/patches":
     - quilt is detected in work/
     - quilt is detected in work/anything/ but reports all patches
       as both applied and unapplied (%a/%p gives x/2x)
     - `quilt` works when no .pc/ exists
  - 4) with quilt-patch-dir set to "debian"
     - quilt is correctly detected everywhere
     - but unapplied patches are not detected (due to missing /patches when
       setting QUILT_PATCHES on quilt unapplied invocation)
     - but `quilt` does not work if no .pc/ exists
  - 5) with quilt-patch-dir set to "debian/patches":
     - quilt is detected in work/
     - quilt is detect in work/anything/ but reports all patches
       as both applied and unapplied (%a/%p gives x/2x)

So I do not understand the role of quilt-patch-dir as for me it takes
the role of QUILT_PATCHES except the missing '/patches'. Moreover changing
to sub-directory in cases 1, 3 and 5 makes applied patch detection failing
because:
 - applied is patch1.diff patch2.diff ...
 - unapplied is /path/to/work/debian/patches/patch1.diff ...

For me $patches should have the QUILT_PATCHES semantic, i.e. include the
/patches at end (as said in man page). If you agree with this analysis, i
might find a patch to make cases 3 and 5 working (even if it breaks the
quite-working case 4). And re-reading the man page gives me a hint for the
quilt-patch-dir usage: configure QUILT_PATCHES (with hook) per repository
with zstyle ?

Marc


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 6/9] vcs_info quilt: fix unapplied detection on sub-directory
  2014-10-08 22:36     ` Marc Finet
@ 2014-10-09 16:03       ` Frank Terbeck
  2014-10-16  4:59         ` Marc Finet
  0 siblings, 1 reply; 37+ messages in thread
From: Frank Terbeck @ 2014-10-09 16:03 UTC (permalink / raw)
  To: Marc Finet; +Cc: zsh-workers

Hi Marc,

Disclaimer: I don't use quilt much anymore, so I'm rusty about its
            behaviours in many cases.

One thing off the bat, although it probably doesn't make much of a
difference: Are you using "quilt" in "standalone mode" or is the
directory controlled by a real VCS as well?

I am unsure about what's going on precisely. Could you do this:

    functions -t vcs_info

And retry your test cases? That will produce long traces of what's going
on, and might give ideas as to what's amiss.

Marc Finet wrote:
[...]
> Hum, in fact this commit was intented to 'fix' such the debian/ behavior
> but miserably failed. I tested different settings and here are my results;
> for debian patches, the working tree is as follows:
>   work/
>   ├── debian/
>   │    ├── patches/
>   │    │     ├── series         (list of patches to apply)
>   │    │     ├── patch1.diff    (one particular patch)
>   │    │     ├── patch2.diff
>   │    │     └── ...
>   │    └── ...
>   ├── .pc/
>   │    ├── .quilt_patches (content of QUILT_PATCHES)
>   │    ├── .quilt_series  (content of QUILT_SERIES)
>   │    ├── patch1.diff/   (copy of patched files)
>   │    │    └── ...
>   │    ├── patch2.diff/
>   │    │    └── ...
>   │    └── ...
>   └── ...
> But:
>   - 1) without setting QUILT_PATCHES nor quilt-patch-dir:
>      - quilt is not detected in work/
>      - quilt is detected in work/anything/ but reports all patches
>        as both applied and unapplied (%a/%p gives x/2x)
>      - `quilt` does not work if no .pc/ exists

No idea why this happens. The default if everything is unset is
"patches", which shouldn't be found in any case.

>   - 2) with QUILT_PATCHES set to "debian":
>      - quilt is detected everywhere and reports correct patches
>        numbers
>      - but `quilt` stops to work (e.g. `quilt series` shows only
>        latest patch, `quilt pop` fails)

See below.

>   - 3) with QUILT_PATCHES set to "debian/patches":
>      - quilt is detected in work/
>      - quilt is detected in work/anything/ but reports all patches
>        as both applied and unapplied (%a/%p gives x/2x)
>      - `quilt` works when no .pc/ exists

I don't know why the patches are reported applied and unapplied.

>   - 4) with quilt-patch-dir set to "debian"
>      - quilt is correctly detected everywhere
>      - but unapplied patches are not detected (due to missing /patches when
>        setting QUILT_PATCHES on quilt unapplied invocation)
>      - but `quilt` does not work if no .pc/ exists
>   - 5) with quilt-patch-dir set to "debian/patches":
>      - quilt is detected in work/
>      - quilt is detect in work/anything/ but reports all patches
>        as both applied and unapplied (%a/%p gives x/2x)

I think $QUILT_PATCHES needs to be set to the correct directory
including "patches/". Without, it only works, because the directory is
searched recursively.

I don't know why the patches are reported as applied and unapplied off
hand. :-/

The applied patches are read from .pc/applied-patches, the list of
unapplied patches is retrieved by calling "quilt unapplied".

> So I do not understand the role of quilt-patch-dir as for me it takes
> the role of QUILT_PATCHES except the missing '/patches'. Moreover changing
> to sub-directory in cases 1, 3 and 5 makes applied patch detection failing
> because:

The ‘quilt-patch-dir’ style *sets* QUILT_PATCHES if set. The system
also sets QUILT_PATCHES to an absolute path-name, which should make it
work in subdirectories as well.

But like I said, I don't use quilt much anymore.

>  - applied is patch1.diff patch2.diff ...
>  - unapplied is /path/to/work/debian/patches/patch1.diff ...
>
> For me $patches should have the QUILT_PATCHES semantic, i.e. include the
> /patches at end (as said in man page). If you agree with this analysis, i
> might find a patch to make cases 3 and 5 working (even if it breaks the
> quite-working case 4). And re-reading the man page gives me a hint for the
> quilt-patch-dir usage: configure QUILT_PATCHES (with hook) per repository
> with zstyle ?

As I said above, $patches get assigned to $QUILT_PATCHES. So it should
behave exactly the same.


Regards, Frank


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 6/9] vcs_info quilt: fix unapplied detection on sub-directory
  2014-10-09 16:03       ` Frank Terbeck
@ 2014-10-16  4:59         ` Marc Finet
  2014-10-16  8:17           ` Frank Terbeck
  0 siblings, 1 reply; 37+ messages in thread
From: Marc Finet @ 2014-10-16  4:59 UTC (permalink / raw)
  To: Frank Terbeck; +Cc: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 2993 bytes --]

Hello Franck,

On Thu, Oct 09, 2014 at 06:03:44PM +0200, Frank Terbeck wrote:
> Hi Marc,
> 
> Disclaimer: I don't use quilt much anymore, so I'm rusty about its
>             behaviours in many cases.
> 
> One thing off the bat, although it probably doesn't make much of a
> difference: Are you using "quilt" in "standalone mode" or is the
> directory controlled by a real VCS as well?
In this case i use it in standalone mode; no other VCS involved here.

> I am unsure about what's going on precisely. Could you do this:
> 
>     functions -t vcs_info
> 
> And retry your test cases? That will produce long traces of what's going
> on, and might give ideas as to what's amiss.
You'll find the trace attached. By the way, how do you deactivate
tracing ? functions -T vcs_info removes a lot of traces (the VCS_INFO*) but
keeps traces from vcs_info().

> I think $QUILT_PATCHES needs to be set to the correct directory
> including "patches/". Without, it only works, because the directory is
> searched recursively.
> 
> I don't know why the patches are reported as applied and unapplied off
> hand. :-/
> 
> The applied patches are read from .pc/applied-patches, the list of
> unapplied patches is retrieved by calling "quilt unapplied".
This is where the problem occurs, applied uses relative path, while
unapplied lists absolute path, because QUILT_PATCHES is set to an
absolute path. e.g.
    ~/src/from-debian/gmrun-0.9.2# QUILT_PATCHES=$(pwd)/debian/patches quilt applied
    /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/10-escaping.patch
    ...
    /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/80-selectoption.pat
    ~/src/from-debian/gmrun-0.9.2# quilt applied
    debian/patches/10-escaping.patch
    debian/patches/20-includes.patch
    debian/patches/30-fix-gcc-4.3-build.patch
    debian/patches/40-history_string.patch
    debian/patches/50-empty-history.patch
    debian/patches/60-fix_gtkcompletionline.patch

So applied and unapplied lists are considered differents. The
.pc/applied-patches file contains only relative paths.

> > So I do not understand the role of quilt-patch-dir as for me it takes
> > the role of QUILT_PATCHES except the missing '/patches'. Moreover changing
> > to sub-directory in cases 1, 3 and 5 makes applied patch detection failing
> > because:
> 
> The ‘quilt-patch-dir’ style *sets* QUILT_PATCHES if set. The system
> also sets QUILT_PATCHES to an absolute path-name, which should make it
> work in subdirectories as well.
I do not see where the QUILT_PATCHES variable is set (I mean exported to
the shell for further quilt commands using this 'detected' value). Maybe
your hook sets it according to the documentation: "Note: you can use
vcs_info to keep the value of $QUILT_PATCHES correct all the time via the
post-quilt hook"

> But like I said, I don't use quilt much anymore.
Maybe the its behaviour has changed regarding path to be displayed. 

Marc.

[-- Attachment #2: quilt-trace-export.txt --]
[-- Type: text/plain, Size: 76461 bytes --]

~/src/from-debian/gmrun-0.9.2 export QUILT_PATCHES=debian/patches
~/src/from-debian/gmrun-0.9.2 (10/11) functions -t vcs_info                                                                    100-gmrunrc.patch
+vcs_info:1> emulate -L zsh
+vcs_info:2> setopt extendedglob NO_warn_create_global
+vcs_info:4> [[ -r . ]]
+vcs_info:6> local pat
+vcs_info:7> local -i found retval
+vcs_info:8> local -a enabled disabled dps
+vcs_info:9> local -x usercontext vcs rrn quiltmode LC_MESSAGES
+vcs_info:10> local -ix maxexports
+vcs_info:11> local -ax msgs
+vcs_info:12> local -Ax vcs_comm hook_com backend_misc user_data
+vcs_info:14> LC_MESSAGES=C
+vcs_info:15> [[ -n '' ]]
+vcs_info:20> vcs=-init-
+vcs_info:20> rrn=-all-
+vcs_info:20> quiltmode=addon
+vcs_info:21> usercontext=default
+vcs_info:23> VCS_INFO_hook start-up
+VCS_INFO_hook:5> local hook static func
+VCS_INFO_hook:6> local -x context hook_name
+VCS_INFO_hook:7> local -xi ret
+VCS_INFO_hook:8> local -a hooks tmp
+VCS_INFO_hook:9> local -i debug
+VCS_INFO_hook:11> ret=0
+VCS_INFO_hook:12> hook_name=start-up
+VCS_INFO_hook:13> shift
+VCS_INFO_hook:14> context=:vcs_info:-init-+start-up:default:-all-
+VCS_INFO_hook:15> static=:vcs_info-static_hooks:start-up
+VCS_INFO_hook:17> zstyle -t :vcs_info:-init-+start-up:default:-all- debug
+VCS_INFO_hook:17> debug=0
+VCS_INFO_hook:18> ((  debug  ))
+VCS_INFO_hook:24> zstyle -a :vcs_info-static_hooks:start-up hooks hooks
+VCS_INFO_hook:25> ((  debug  ))
+VCS_INFO_hook:28> zstyle -a :vcs_info:-init-+start-up:default:-all- hooks tmp
+VCS_INFO_hook:29> ((  debug  ))
+VCS_INFO_hook:32> hooks+=( )
+VCS_INFO_hook:33> ((  0 == 0  ))
+VCS_INFO_hook:33> return 0
+vcs_info:24> retval=0
+vcs_info:25> ((  retval == 1  ))
+vcs_info:27> ((  retval == 2  ))
+vcs_info:35> zstyle -a :vcs_info:-init-:default:-all- enable enabled
+vcs_info:36> ((  4 == 0  ))
+vcs_info:38> [[ -n '' ]]
+vcs_info:43> [[ -n '' ]]
+vcs_info:48> zstyle -a :vcs_info:-init-:default:-all- disable-patterns dps
+vcs_info:57> VCS_INFO_maxexports
+VCS_INFO_maxexports:5> setopt localoptions NO_shwordsplit
+VCS_INFO_maxexports:7> zstyle -s :vcs_info:-init-:default:-all- max-exports maxexports
+VCS_INFO_maxexports:7> maxexports=2
+VCS_INFO_maxexports:8> [[ 2 != <-> ]]
+VCS_INFO_maxexports:8> ((  maxexports < 1  ))
+VCS_INFO_maxexports:13> return 0
+vcs_info:59> ((  found = 0  ))
+vcs_info:60> vcs=git
+vcs_info:61> [[ -n '' ]]
+vcs_info:62> ((  1 == 0  ))
+vcs_info:67> vcs_comm=( )
+vcs_info:68> VCS_INFO_get_cmd
+VCS_INFO_get_cmd:4> local cmd
+VCS_INFO_get_cmd:5> zstyle -s :vcs_info:git:default:-all- command cmd
+VCS_INFO_get_cmd:6> vcs_comm[cmd]=git
+vcs_info:69> VCS_INFO_detect_git
+VCS_INFO_detect_git:5> setopt localoptions NO_shwordsplit
+VCS_INFO_detect_git:7> [[ '' == --flavours ]]
+VCS_INFO_detect_git:9> VCS_INFO_check_com git
+VCS_INFO_check_com:5> setopt localoptions NO_shwordsplit
+VCS_INFO_check_com:7> case git (/*)
+VCS_INFO_check_com:7> case git (*)
+VCS_INFO_check_com:12> ((  1  ))
+VCS_INFO_check_com:12> return 0
+VCS_INFO_detect_git:9> git rev-parse --is-inside-work-tree
+VCS_INFO_detect_git:15> return 1
+vcs_info:60> vcs=svn
+vcs_info:61> [[ -n '' ]]
+vcs_info:62> ((  1 == 0  ))
+vcs_info:67> vcs_comm=( )
+vcs_info:68> VCS_INFO_get_cmd
+VCS_INFO_get_cmd:4> local cmd
+VCS_INFO_get_cmd:5> zstyle -s :vcs_info:svn:default:-all- command cmd
+VCS_INFO_get_cmd:6> vcs_comm[cmd]=svn
+vcs_info:69> VCS_INFO_detect_svn
+VCS_INFO_detect_svn:5> setopt localoptions NO_shwordsplit
+VCS_INFO_detect_svn:7> [[ '' == --flavours ]]
+VCS_INFO_detect_svn:9> VCS_INFO_check_com svn
+VCS_INFO_check_com:5> setopt localoptions NO_shwordsplit
+VCS_INFO_check_com:7> case svn (/*)
+VCS_INFO_check_com:7> case svn (*)
+VCS_INFO_check_com:12> ((  1  ))
+VCS_INFO_check_com:12> return 0
+VCS_INFO_detect_svn:10> vcs_comm[detect_need_file]='entries format wc.db'
+VCS_INFO_detect_svn:11> VCS_INFO_bydir_detect .svn
+VCS_INFO_bydir_detect:5> setopt localoptions NO_shwordsplit
+VCS_INFO_bydir_detect:6> local 'dirname=.svn'
+VCS_INFO_bydir_detect:7> local 'basedir=.' realbasedir file
+VCS_INFO_bydir_detect:9> realbasedir=+VCS_INFO_bydir_detect:9> VCS_INFO_realpath .
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q .
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:9> realbasedir=/home/marc/src/from-debian/gmrun-0.9.2
+VCS_INFO_bydir_detect:10> [[ /home/marc/src/from-debian/gmrun-0.9.2 != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc/src/from-debian/gmrun-0.9.2 ]]
+VCS_INFO_bydir_detect:12> [[ -n 'entries format wc.db' ]]
+VCS_INFO_bydir_detect:13> [[ -d ./.svn ]]
+VCS_INFO_bydir_detect:22> basedir=./..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/home/marc/src/from-debian
+VCS_INFO_bydir_detect:10> [[ /home/marc/src/from-debian != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc/src/from-debian ]]
+VCS_INFO_bydir_detect:12> [[ -n 'entries format wc.db' ]]
+VCS_INFO_bydir_detect:13> [[ -d ./../.svn ]]
+VCS_INFO_bydir_detect:22> basedir=./../..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./../..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./../..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/home/marc/src
+VCS_INFO_bydir_detect:10> [[ /home/marc/src != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc/src ]]
+VCS_INFO_bydir_detect:12> [[ -n 'entries format wc.db' ]]
+VCS_INFO_bydir_detect:13> [[ -d ./../../.svn ]]
+VCS_INFO_bydir_detect:22> basedir=./../../..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./../../..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./../../..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/home/marc
+VCS_INFO_bydir_detect:10> [[ /home/marc != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc ]]
+VCS_INFO_bydir_detect:12> [[ -n 'entries format wc.db' ]]
+VCS_INFO_bydir_detect:13> [[ -d ./../../../.svn ]]
+VCS_INFO_bydir_detect:22> basedir=./../../../..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./../../../..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./../../../..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/home
+VCS_INFO_bydir_detect:10> [[ /home != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home ]]
+VCS_INFO_bydir_detect:12> [[ -n 'entries format wc.db' ]]
+VCS_INFO_bydir_detect:13> [[ -d ./../../../../.svn ]]
+VCS_INFO_bydir_detect:22> basedir=./../../../../..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./../../../../..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./../../../../..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/
+VCS_INFO_bydir_detect:10> [[ / != / ]]
+VCS_INFO_bydir_detect:26> [[ / == / ]]
+VCS_INFO_bydir_detect:26> return 1
+VCS_INFO_detect_svn:11> return 1
+vcs_info:60> vcs=bzr
+vcs_info:61> [[ -n '' ]]
+vcs_info:62> ((  1 == 0  ))
+vcs_info:67> vcs_comm=( )
+vcs_info:68> VCS_INFO_get_cmd
+VCS_INFO_get_cmd:4> local cmd
+VCS_INFO_get_cmd:5> zstyle -s :vcs_info:bzr:default:-all- command cmd
+VCS_INFO_get_cmd:6> vcs_comm[cmd]=bzr
+vcs_info:69> VCS_INFO_detect_bzr
+VCS_INFO_detect_bzr:5> setopt localoptions NO_shwordsplit
+VCS_INFO_detect_bzr:7> [[ '' == --flavours ]]
+VCS_INFO_detect_bzr:9> VCS_INFO_check_com bzr
+VCS_INFO_check_com:5> setopt localoptions NO_shwordsplit
+VCS_INFO_check_com:7> case bzr (/*)
+VCS_INFO_check_com:7> case bzr (*)
+VCS_INFO_check_com:12> ((  1  ))
+VCS_INFO_check_com:12> return 0
+VCS_INFO_detect_bzr:10> vcs_comm[detect_need_file]=branch/format
+VCS_INFO_detect_bzr:11> VCS_INFO_bydir_detect .bzr
+VCS_INFO_bydir_detect:5> setopt localoptions NO_shwordsplit
+VCS_INFO_bydir_detect:6> local 'dirname=.bzr'
+VCS_INFO_bydir_detect:7> local 'basedir=.' realbasedir file
+VCS_INFO_bydir_detect:9> realbasedir=+VCS_INFO_bydir_detect:9> VCS_INFO_realpath .
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q .
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:9> realbasedir=/home/marc/src/from-debian/gmrun-0.9.2
+VCS_INFO_bydir_detect:10> [[ /home/marc/src/from-debian/gmrun-0.9.2 != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc/src/from-debian/gmrun-0.9.2 ]]
+VCS_INFO_bydir_detect:12> [[ -n branch/format ]]
+VCS_INFO_bydir_detect:13> [[ -d ./.bzr ]]
+VCS_INFO_bydir_detect:22> basedir=./..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/home/marc/src/from-debian
+VCS_INFO_bydir_detect:10> [[ /home/marc/src/from-debian != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc/src/from-debian ]]
+VCS_INFO_bydir_detect:12> [[ -n branch/format ]]
+VCS_INFO_bydir_detect:13> [[ -d ./../.bzr ]]
+VCS_INFO_bydir_detect:22> basedir=./../..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./../..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./../..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/home/marc/src
+VCS_INFO_bydir_detect:10> [[ /home/marc/src != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc/src ]]
+VCS_INFO_bydir_detect:12> [[ -n branch/format ]]
+VCS_INFO_bydir_detect:13> [[ -d ./../../.bzr ]]
+VCS_INFO_bydir_detect:22> basedir=./../../..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./../../..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./../../..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/home/marc
+VCS_INFO_bydir_detect:10> [[ /home/marc != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc ]]
+VCS_INFO_bydir_detect:12> [[ -n branch/format ]]
+VCS_INFO_bydir_detect:13> [[ -d ./../../../.bzr ]]
+VCS_INFO_bydir_detect:22> basedir=./../../../..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./../../../..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./../../../..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/home
+VCS_INFO_bydir_detect:10> [[ /home != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home ]]
+VCS_INFO_bydir_detect:12> [[ -n branch/format ]]
+VCS_INFO_bydir_detect:13> [[ -d ./../../../../.bzr ]]
+VCS_INFO_bydir_detect:22> basedir=./../../../../..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./../../../../..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./../../../../..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/
+VCS_INFO_bydir_detect:10> [[ / != / ]]
+VCS_INFO_bydir_detect:26> [[ / == / ]]
+VCS_INFO_bydir_detect:26> return 1
+VCS_INFO_detect_bzr:12> return 1
+vcs_info:60> vcs=hg
+vcs_info:61> [[ -n '' ]]
+vcs_info:62> ((  1 == 0  ))
+vcs_info:67> vcs_comm=( )
+vcs_info:68> VCS_INFO_get_cmd
+VCS_INFO_get_cmd:4> local cmd
+VCS_INFO_get_cmd:5> zstyle -s :vcs_info:hg:default:-all- command cmd
+VCS_INFO_get_cmd:6> vcs_comm[cmd]=hg
+vcs_info:69> VCS_INFO_detect_hg
+VCS_INFO_detect_hg:5> setopt localoptions NO_shwordsplit
+VCS_INFO_detect_hg:7> [[ '' == --flavours ]]
+VCS_INFO_detect_hg:9> VCS_INFO_check_com hg
+VCS_INFO_check_com:5> setopt localoptions NO_shwordsplit
+VCS_INFO_check_com:7> case hg (/*)
+VCS_INFO_check_com:7> case hg (*)
+VCS_INFO_check_com:12> ((  1  ))
+VCS_INFO_check_com:12> return 0
+VCS_INFO_detect_hg:10> vcs_comm[detect_need_file]='store data sharedpath'
+VCS_INFO_detect_hg:11> VCS_INFO_bydir_detect .hg
+VCS_INFO_bydir_detect:5> setopt localoptions NO_shwordsplit
+VCS_INFO_bydir_detect:6> local 'dirname=.hg'
+VCS_INFO_bydir_detect:7> local 'basedir=.' realbasedir file
+VCS_INFO_bydir_detect:9> realbasedir=+VCS_INFO_bydir_detect:9> VCS_INFO_realpath .
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q .
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:9> realbasedir=/home/marc/src/from-debian/gmrun-0.9.2
+VCS_INFO_bydir_detect:10> [[ /home/marc/src/from-debian/gmrun-0.9.2 != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc/src/from-debian/gmrun-0.9.2 ]]
+VCS_INFO_bydir_detect:12> [[ -n 'store data sharedpath' ]]
+VCS_INFO_bydir_detect:13> [[ -d ./.hg ]]
+VCS_INFO_bydir_detect:22> basedir=./..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/home/marc/src/from-debian
+VCS_INFO_bydir_detect:10> [[ /home/marc/src/from-debian != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc/src/from-debian ]]
+VCS_INFO_bydir_detect:12> [[ -n 'store data sharedpath' ]]
+VCS_INFO_bydir_detect:13> [[ -d ./../.hg ]]
+VCS_INFO_bydir_detect:22> basedir=./../..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./../..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./../..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/home/marc/src
+VCS_INFO_bydir_detect:10> [[ /home/marc/src != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc/src ]]
+VCS_INFO_bydir_detect:12> [[ -n 'store data sharedpath' ]]
+VCS_INFO_bydir_detect:13> [[ -d ./../../.hg ]]
+VCS_INFO_bydir_detect:22> basedir=./../../..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./../../..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./../../..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/home/marc
+VCS_INFO_bydir_detect:10> [[ /home/marc != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc ]]
+VCS_INFO_bydir_detect:12> [[ -n 'store data sharedpath' ]]
+VCS_INFO_bydir_detect:13> [[ -d ./../../../.hg ]]
+VCS_INFO_bydir_detect:22> basedir=./../../../..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./../../../..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./../../../..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/home
+VCS_INFO_bydir_detect:10> [[ /home != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home ]]
+VCS_INFO_bydir_detect:12> [[ -n 'store data sharedpath' ]]
+VCS_INFO_bydir_detect:13> [[ -d ./../../../../.hg ]]
+VCS_INFO_bydir_detect:22> basedir=./../../../../..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./../../../../..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./../../../../..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/
+VCS_INFO_bydir_detect:10> [[ / != / ]]
+VCS_INFO_bydir_detect:26> [[ / == / ]]
+VCS_INFO_bydir_detect:26> return 1
+VCS_INFO_detect_hg:11> return 1
+vcs_info:72> ((  found == 0  ))
+vcs_info:73> vcs=-quilt-
+vcs_info:73> quiltmode=standalone
+vcs_info:74> VCS_INFO_quilt standalone
+VCS_INFO_quilt:1> emulate -L zsh
+VCS_INFO_quilt:2> setopt extendedglob
+VCS_INFO_quilt:3> local 'mode=standalone'
+VCS_INFO_quilt:4> local patches pc tmp qstring root
+VCS_INFO_quilt:5> local -i ret
+VCS_INFO_quilt:6> local -x context
+VCS_INFO_quilt:7> local -a applied unapplied all applied_string unapplied_string quiltcommand
+VCS_INFO_quilt:8> local -Ax hook_com
+VCS_INFO_quilt:10> context=:vcs_info:-quilt-.quilt-standalone:default:-all-
+VCS_INFO_quilt:11> zstyle -t :vcs_info:-quilt-.quilt-standalone:default:-all- use-quilt
+VCS_INFO_quilt:13> case standalone (standalone)
+VCS_INFO_quilt:15> VCS_INFO_quilt-standalone-detect
+VCS_INFO_quilt-standalone-detect:1> emulate -L zsh
+VCS_INFO_quilt-standalone-detect:2> setopt extendedglob
+VCS_INFO_quilt-standalone-detect:3> local param
+VCS_INFO_quilt-standalone-detect:4> local -i ret
+VCS_INFO_quilt-standalone-detect:6> zstyle -s :vcs_info:-quilt-.quilt-standalone:default:-all- quilt-standalone param
+VCS_INFO_quilt-standalone-detect:7> [[ always == never ]]
+VCS_INFO_quilt-standalone-detect:8> [[ always == always ]]
+VCS_INFO_quilt-standalone-detect:8> return 0
+VCS_INFO_quilt:25> zstyle -s :vcs_info:-quilt-.quilt-standalone:default:-all- quilt-patch-dir patches
+VCS_INFO_quilt:25> patches=debian/patches
+VCS_INFO_quilt:26> [[ debian/patches != /* ]]
+VCS_INFO_quilt:27> tmp=debian/patches
+VCS_INFO_quilt:28> patches=+VCS_INFO_quilt:28> VCS_INFO_quilt-dirfind debian/patches
+VCS_INFO_quilt-dirfind:5> emulate -L zsh
+VCS_INFO_quilt-dirfind:6> setopt extendedglob
+VCS_INFO_quilt-dirfind:7> local 'dir=debian/patches' 'file='
+VCS_INFO_quilt-dirfind:7> shift 1
+VCS_INFO_quilt-dirfind:8> local ret oldfile olddir
+VCS_INFO_quilt-dirfind:10> olddir=''
+VCS_INFO_quilt-dirfind:11> vcs_comm[basedir]=''
+VCS_INFO_quilt-dirfind:12> oldfile='store data sharedpath'
+VCS_INFO_quilt-dirfind:13> vcs_comm[detect_need_file]=''
+VCS_INFO_quilt-dirfind:14> VCS_INFO_bydir_detect debian/patches
+VCS_INFO_bydir_detect:5> setopt localoptions NO_shwordsplit
+VCS_INFO_bydir_detect:6> local 'dirname=debian/patches'
+VCS_INFO_bydir_detect:7> local 'basedir=.' realbasedir file
+VCS_INFO_bydir_detect:9> realbasedir=+VCS_INFO_bydir_detect:9> VCS_INFO_realpath .
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q .
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:9> realbasedir=/home/marc/src/from-debian/gmrun-0.9.2
+VCS_INFO_bydir_detect:10> [[ /home/marc/src/from-debian/gmrun-0.9.2 != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc/src/from-debian/gmrun-0.9.2 ]]
+VCS_INFO_bydir_detect:12> [[ -n '' ]]
+VCS_INFO_bydir_detect:19> [[ -d ./debian/patches ]]
+VCS_INFO_bydir_detect:19> break
+VCS_INFO_bydir_detect:26> [[ /home/marc/src/from-debian/gmrun-0.9.2 == / ]]
+VCS_INFO_bydir_detect:27> vcs_comm[basedir]=/home/marc/src/from-debian/gmrun-0.9.2
+VCS_INFO_bydir_detect:28> return 0
+VCS_INFO_quilt-dirfind:15> ret=0
+VCS_INFO_quilt-dirfind:16> vcs_comm[detect_need_file]='store data sharedpath'
+VCS_INFO_quilt-dirfind:17> printf %s /home/marc/src/from-debian/gmrun-0.9.2
+VCS_INFO_quilt-dirfind:18> vcs_comm[basedir]=''
+VCS_INFO_quilt-dirfind:19> return 0
+VCS_INFO_quilt:28> patches=/home/marc/src/from-debian/gmrun-0.9.2
+VCS_INFO_quilt:29> ret=0
+VCS_INFO_quilt:30> ((  ret  ))
+VCS_INFO_quilt:31> patches=/home/marc/src/from-debian/gmrun-0.9.2/debian/patches
+VCS_INFO_quilt:36> pc=+VCS_INFO_quilt:36> VCS_INFO_quilt-dirfind .pc .version
+VCS_INFO_quilt-dirfind:5> emulate -L zsh
+VCS_INFO_quilt-dirfind:6> setopt extendedglob
+VCS_INFO_quilt-dirfind:7> local 'dir=.pc' 'file=.version'
+VCS_INFO_quilt-dirfind:7> shift 2
+VCS_INFO_quilt-dirfind:8> local ret oldfile olddir
+VCS_INFO_quilt-dirfind:10> olddir=''
+VCS_INFO_quilt-dirfind:11> vcs_comm[basedir]=''
+VCS_INFO_quilt-dirfind:12> oldfile='store data sharedpath'
+VCS_INFO_quilt-dirfind:13> vcs_comm[detect_need_file]=.version
+VCS_INFO_quilt-dirfind:14> VCS_INFO_bydir_detect .pc
+VCS_INFO_bydir_detect:5> setopt localoptions NO_shwordsplit
+VCS_INFO_bydir_detect:6> local 'dirname=.pc'
+VCS_INFO_bydir_detect:7> local 'basedir=.' realbasedir file
+VCS_INFO_bydir_detect:9> realbasedir=+VCS_INFO_bydir_detect:9> VCS_INFO_realpath .
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q .
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:9> realbasedir=/home/marc/src/from-debian/gmrun-0.9.2
+VCS_INFO_bydir_detect:10> [[ /home/marc/src/from-debian/gmrun-0.9.2 != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc/src/from-debian/gmrun-0.9.2 ]]
+VCS_INFO_bydir_detect:12> [[ -n .version ]]
+VCS_INFO_bydir_detect:13> [[ -d ./.pc ]]
+VCS_INFO_bydir_detect:14> file=.version
+VCS_INFO_bydir_detect:15> [[ -e ./.pc/.version ]]
+VCS_INFO_bydir_detect:15> break 2
+VCS_INFO_bydir_detect:26> [[ /home/marc/src/from-debian/gmrun-0.9.2 == / ]]
+VCS_INFO_bydir_detect:27> vcs_comm[basedir]=/home/marc/src/from-debian/gmrun-0.9.2
+VCS_INFO_bydir_detect:28> return 0
+VCS_INFO_quilt-dirfind:15> ret=0
+VCS_INFO_quilt-dirfind:16> vcs_comm[detect_need_file]='store data sharedpath'
+VCS_INFO_quilt-dirfind:17> printf %s /home/marc/src/from-debian/gmrun-0.9.2
+VCS_INFO_quilt-dirfind:18> vcs_comm[basedir]=''
+VCS_INFO_quilt-dirfind:19> return 0
+VCS_INFO_quilt:36> pc=/home/marc/src/from-debian/gmrun-0.9.2
+VCS_INFO_quilt:37> ret=0
+VCS_INFO_quilt:38> ((  ret == 0  ))
+VCS_INFO_quilt:39> [[ standalone == standalone ]]
+VCS_INFO_quilt:39> root=/home/marc/src/from-debian/gmrun-0.9.2
+VCS_INFO_quilt:40> pc=/home/marc/src/from-debian/gmrun-0.9.2/.pc
+VCS_INFO_quilt:41> [[ -e /home/marc/src/from-debian/gmrun-0.9.2/.pc/applied-patches ]]
+VCS_INFO_quilt:42> applied=( 10-escaping.patch 20-includes.patch 30-fix-gcc-4.3-build.patch 40-history_string.patch 50-empty-history.patch 60-fix_gtkcompletionline.patch 70-cmdline.patch 80-selectoption.patch 90-window_placement.patch 100-gmrunrc.patch )
+VCS_INFO_quilt:44> applied=( 10-escaping.patch 20-includes.patch 30-fix-gcc-4.3-build.patch 40-history_string.patch 50-empty-history.patch 60-fix_gtkcompletionline.patch 70-cmdline.patch 80-selectoption.patch 90-window_placement.patch 100-gmrunrc.patch )
+VCS_INFO_quilt:45> applied=( 100-gmrunrc.patch 90-window_placement.patch 80-selectoption.patch 70-cmdline.patch 60-fix_gtkcompletionline.patch 50-empty-history.patch 40-history_string.patch 30-fix-gcc-4.3-build.patch 20-includes.patch 10-escaping.patch )
+VCS_INFO_quilt:50> zstyle -t :vcs_info:-quilt-.quilt-standalone:default:-all- get-unapplied
+VCS_INFO_quilt:53> zstyle -s :vcs_info:-quilt-.quilt-standalone:default:-all- quiltcommand quiltcommand
+VCS_INFO_quilt:53> quiltcommand=quilt
+VCS_INFO_quilt:54> unapplied=+VCS_INFO_quilt:54> QUILT_PATCHES=/home/marc/src/from-debian/gmrun-0.9.2/debian/patches quilt --quiltrc /dev/null unapplied
+VCS_INFO_quilt:54> unapplied=( /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/debian-changes-0.9.2-2.1 )
+VCS_INFO_quilt:55> unapplied=( /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/debian-changes-0.9.2-2.1 )
+VCS_INFO_quilt:60> all=( 10-escaping.patch 20-includes.patch 30-fix-gcc-4.3-build.patch 40-history_string.patch 50-empty-history.patch 60-fix_gtkcompletionline.patch 70-cmdline.patch 80-selectoption.patch 90-window_placement.patch 100-gmrunrc.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/debian-changes-0.9.2-2.1 )
+VCS_INFO_quilt:62> VCS_INFO_hook gen-applied-string 100-gmrunrc.patch 90-window_placement.patch 80-selectoption.patch 70-cmdline.patch 60-fix_gtkcompletionline.patch 50-empty-history.patch 40-history_string.patch 30-fix-gcc-4.3-build.patch 20-includes.patch 10-escaping.patch
+VCS_INFO_hook:5> local hook static func
+VCS_INFO_hook:6> local -x context hook_name
+VCS_INFO_hook:7> local -xi ret
+VCS_INFO_hook:8> local -a hooks tmp
+VCS_INFO_hook:9> local -i debug
+VCS_INFO_hook:11> ret=0
+VCS_INFO_hook:12> hook_name=gen-applied-string
+VCS_INFO_hook:13> shift
+VCS_INFO_hook:14> context=:vcs_info:-quilt-+gen-applied-string:default:-all-
+VCS_INFO_hook:15> static=:vcs_info-static_hooks:gen-applied-string
+VCS_INFO_hook:17> zstyle -t :vcs_info:-quilt-+gen-applied-string:default:-all- debug
+VCS_INFO_hook:17> debug=0
+VCS_INFO_hook:18> ((  debug  ))
+VCS_INFO_hook:24> zstyle -a :vcs_info-static_hooks:gen-applied-string hooks hooks
+VCS_INFO_hook:25> ((  debug  ))
+VCS_INFO_hook:28> zstyle -a :vcs_info:-quilt-+gen-applied-string:default:-all- hooks tmp
+VCS_INFO_hook:29> ((  debug  ))
+VCS_INFO_hook:32> hooks+=( )
+VCS_INFO_hook:33> ((  1 == 0  ))
+VCS_INFO_hook:39> typeset -g -r vcs rrn usercontext maxexports msgs vcs_comm
+VCS_INFO_hook:40> hook=gen-applied-string
+VCS_INFO_hook:41> func=+vi-gen-applied-string
+VCS_INFO_hook:42> ((  1 == 0  ))
+VCS_INFO_hook:46> ((  debug  ))
+VCS_INFO_hook:47> true
+VCS_INFO_hook:48> +vi-gen-applied-string 100-gmrunrc.patch 90-window_placement.patch 80-selectoption.patch 70-cmdline.patch 60-fix_gtkcompletionline.patch 50-empty-history.patch 40-history_string.patch 30-fix-gcc-4.3-build.patch 20-includes.patch 10-escaping.patch
++vi-gen-applied-string:1> [ -z 100-gmrunrc.patch ']'
++vi-gen-applied-string:2> local 'txt=100-gmrunrc.patch'
++vi-gen-applied-string:3> [[ -quilt- == *git* ]]
++vi-gen-applied-string:7> local 'width=70'
++vi-gen-applied-string:8> [ 145 -lt 80 ']'
++vi-gen-applied-string:9> myrepo_rprompt='%70>...> %B100-gmrunrc.patch'
+VCS_INFO_hook:49> case 0 (0)
+VCS_INFO_hook:57> typeset -g +r vcs rrn usercontext maxexports msgs vcs_comm
+VCS_INFO_hook:58> return 0
+VCS_INFO_quilt:63> ((  10  ))
+VCS_INFO_quilt:64> applied_string=100-gmrunrc.patch
+VCS_INFO_quilt:71> hook_com=( )
+VCS_INFO_quilt:72> VCS_INFO_hook gen-unapplied-string /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/debian-changes-0.9.2-2.1
+VCS_INFO_hook:5> local hook static func
+VCS_INFO_hook:6> local -x context hook_name
+VCS_INFO_hook:7> local -xi ret
+VCS_INFO_hook:8> local -a hooks tmp
+VCS_INFO_hook:9> local -i debug
+VCS_INFO_hook:11> ret=0
+VCS_INFO_hook:12> hook_name=gen-unapplied-string
+VCS_INFO_hook:13> shift
+VCS_INFO_hook:14> context=:vcs_info:-quilt-+gen-unapplied-string:default:-all-
+VCS_INFO_hook:15> static=:vcs_info-static_hooks:gen-unapplied-string
+VCS_INFO_hook:17> zstyle -t :vcs_info:-quilt-+gen-unapplied-string:default:-all- debug
+VCS_INFO_hook:17> debug=0
+VCS_INFO_hook:18> ((  debug  ))
+VCS_INFO_hook:24> zstyle -a :vcs_info-static_hooks:gen-unapplied-string hooks hooks
+VCS_INFO_hook:25> ((  debug  ))
+VCS_INFO_hook:28> zstyle -a :vcs_info:-quilt-+gen-unapplied-string:default:-all- hooks tmp
+VCS_INFO_hook:29> ((  debug  ))
+VCS_INFO_hook:32> hooks+=( )
+VCS_INFO_hook:33> ((  0 == 0  ))
+VCS_INFO_hook:33> return 0
+VCS_INFO_quilt:73> unapplied_string=1
+VCS_INFO_quilt:78> ((  10  ))
+VCS_INFO_quilt:79> zstyle -s :vcs_info:-quilt-.quilt-standalone:default:-all- patch-format qstring
+VCS_INFO_quilt:83> hook_com=( applied 100-gmrunrc.patch unapplied 1 applied-n 10 unapplied-n 1 all-n 11 )
+VCS_INFO_quilt:85> VCS_INFO_hook set-patch-format '%F{blue}%n/%a%f'
+VCS_INFO_hook:5> local hook static func
+VCS_INFO_hook:6> local -x context hook_name
+VCS_INFO_hook:7> local -xi ret
+VCS_INFO_hook:8> local -a hooks tmp
+VCS_INFO_hook:9> local -i debug
+VCS_INFO_hook:11> ret=0
+VCS_INFO_hook:12> hook_name=set-patch-format
+VCS_INFO_hook:13> shift
+VCS_INFO_hook:14> context=:vcs_info:-quilt-+set-patch-format:default:-all-
+VCS_INFO_hook:15> static=:vcs_info-static_hooks:set-patch-format
+VCS_INFO_hook:17> zstyle -t :vcs_info:-quilt-+set-patch-format:default:-all- debug
+VCS_INFO_hook:17> debug=0
+VCS_INFO_hook:18> ((  debug  ))
+VCS_INFO_hook:24> zstyle -a :vcs_info-static_hooks:set-patch-format hooks hooks
+VCS_INFO_hook:25> ((  debug  ))
+VCS_INFO_hook:28> zstyle -a :vcs_info:-quilt-+set-patch-format:default:-all- hooks tmp
+VCS_INFO_hook:29> ((  debug  ))
+VCS_INFO_hook:32> hooks+=( )
+VCS_INFO_hook:33> ((  0 == 0  ))
+VCS_INFO_hook:33> return 0
+VCS_INFO_quilt:86> zformat -f qstring '%F{blue}%n/%a%f' p:100-gmrunrc.patch u:1 n:10 c:1 a:11
+VCS_INFO_quilt:91> hook_com=( )
+VCS_INFO_quilt:93> case standalone (standalone)
+VCS_INFO_quilt:95> VCS_INFO_formats '' '' /home/marc/src/from-debian/gmrun-0.9.2 '' '' '' '%F{blue}10/11%f'
+VCS_INFO_formats:5> setopt localoptions noksharrays NO_shwordsplit
+VCS_INFO_formats:6> local msg tmp
+VCS_INFO_formats:7> local -i i
+VCS_INFO_formats:8> local -xA hook_com
+VCS_INFO_formats:12> hook_com=( action '' action_orig '' branch '' branch_orig '' base /home/marc/src/from-debian/gmrun-0.9.2 base_orig /home/marc/src/from-debian/gmrun-0.9.2 staged '' staged_orig '' unstaged '' unstaged_orig '' revision '' revision_orig '' misc '%F{blue}10/11%f' misc_orig '%F{blue}10/11%f' vcs -quilt- vcs_orig -quilt- )
+VCS_INFO_formats:30> hook_com[base-name]=gmrun-0.9.2
+VCS_INFO_formats:31> hook_com[base-name_orig]=''
+VCS_INFO_formats:32> hook_com[subdir]=+VCS_INFO_formats:32> VCS_INFO_reposub /home/marc/src/from-debian/gmrun-0.9.2
+VCS_INFO_reposub:5> setopt localoptions extendedglob NO_shwordsplit
+VCS_INFO_reposub:6> local 'base=/home/marc/src/from-debian/gmrun-0.9.2' tmp
+VCS_INFO_reposub:8> tmp=+VCS_INFO_reposub:8> pwd -P
+VCS_INFO_reposub:8> tmp=/home/marc/src/from-debian/gmrun-0.9.2
+VCS_INFO_reposub:9> [[ /home/marc/src/from-debian/gmrun-0.9.2 == /home/marc/src/from-debian/gmrun-0.9.2/* ]]
+VCS_INFO_reposub:10> printf .
+VCS_INFO_reposub:11> return 1
+VCS_INFO_formats:32> hook_com[subdir]=.
+VCS_INFO_formats:33> hook_com[subdir_orig]=.
+VCS_INFO_formats:35> VCS_INFO_hook post-backend
+VCS_INFO_hook:5> local hook static func
+VCS_INFO_hook:6> local -x context hook_name
+VCS_INFO_hook:7> local -xi ret
+VCS_INFO_hook:8> local -a hooks tmp
+VCS_INFO_hook:9> local -i debug
+VCS_INFO_hook:11> ret=0
+VCS_INFO_hook:12> hook_name=post-backend
+VCS_INFO_hook:13> shift
+VCS_INFO_hook:14> context=:vcs_info:-quilt-+post-backend:default:-all-
+VCS_INFO_hook:15> static=:vcs_info-static_hooks:post-backend
+VCS_INFO_hook:17> zstyle -t :vcs_info:-quilt-+post-backend:default:-all- debug
+VCS_INFO_hook:17> debug=0
+VCS_INFO_hook:18> ((  debug  ))
+VCS_INFO_hook:24> zstyle -a :vcs_info-static_hooks:post-backend hooks hooks
+VCS_INFO_hook:25> ((  debug  ))
+VCS_INFO_hook:28> zstyle -a :vcs_info:-quilt-+post-backend:default:-all- hooks tmp
+VCS_INFO_hook:29> ((  debug  ))
+VCS_INFO_hook:32> hooks+=( )
+VCS_INFO_hook:33> ((  1 == 0  ))
+VCS_INFO_hook:39> typeset -g -r vcs rrn usercontext maxexports msgs vcs_comm
+VCS_INFO_hook:40> hook=post-backend
+VCS_INFO_hook:41> func=+vi-post-backend
+VCS_INFO_hook:42> ((  1 == 0  ))
+VCS_INFO_hook:46> ((  debug  ))
+VCS_INFO_hook:47> true
+VCS_INFO_hook:48> +vi-post-backend
++vi-post-backend:2> local 'subdir=.'
++vi-post-backend:3> local 'base=/home/marc/src/from-debian/gmrun-0.9.2'
++vi-post-backend:4> local -A style
++vi-post-backend:6> [ -z /home/marc/src/from-debian/gmrun-0.9.2 ']'
++vi-post-backend:25> style=++vi-post-backend:25> get-style /home/marc/src/from-debian/gmrun-0.9.2
+get-style:2> local style s 'p=/home/marc/src/from-debian/gmrun-0.9.2'
+get-style:3> local -A hstyle
+get-style:4> zstyle -s :mprompt:/home/marc/src/from-debian/gmrun-0.9.2 style style
+get-style:5> s=color=green
+get-style:6> hstyle+=( color green )
+get-style:8> [ '' '=' bold ']'
+get-style:11> echo color green
+get-style:12> return 0
++vi-post-backend:25> style=( color green )
++vi-post-backend:26> myrepobase=/home/marc/src/from-debian/gmrun-0.9.2
++vi-post-backend:27> base=++vi-post-backend:27> rationalize-path /home/marc/src/from-debian/gmrun-0.9.2
+rationalize-path:2> local new 'p=/home/marc/src/from-debian/gmrun-0.9.2'
+rationalize-path:3> p='~/src/from-debian/gmrun-0.9.2'
+rationalize-path:4> p='~/src/from-debian/gmrun-0.9.2'
+rationalize-path:5> echo '~/src/from-debian/gmrun-0.9.2'
++vi-post-backend:27> base='~/src/from-debian/gmrun-0.9.2'
++vi-post-backend:28> [ . '=' . -o -z . ']'
++vi-post-backend:29> subdir=''
++vi-post-backend:30> mytitle='~/src/from-debian/gmrun-0.9.2'
++vi-post-backend:35> mytitle='#[fg=green]~/src/from-debian/gmrun-0.9.2'
++vi-post-backend:38> mypath='%F{green}~/src/from-debian/gmrun-0.9.2%f%b%F{blue}%f'
+VCS_INFO_hook:49> case 0 (0)
+VCS_INFO_hook:57> typeset -g +r vcs rrn usercontext maxexports msgs vcs_comm
+VCS_INFO_hook:58> return 0
+VCS_INFO_formats:52> [[ -n '' ]]
+VCS_INFO_formats:56> zstyle -a :vcs_info:-quilt-:default:-all- formats msgs
+VCS_INFO_formats:57> ((  1 < 1  ))
+VCS_INFO_formats:60> [[ -n '' ]]
+VCS_INFO_formats:65> [[ -n '' ]]
+VCS_INFO_formats:70> [[ standalone != standalone ]]
+VCS_INFO_formats:75> [[ standalone == standalone ]]
+VCS_INFO_formats:76> hook_com[quilt]='%F{blue}10/11%f'
+VCS_INFO_formats:79> ((  1 > maxexports  ))
+VCS_INFO_formats:80> i=1
+VCS_INFO_formats:81> VCS_INFO_hook set-message 0 ' (%F{blue}%b%f%u%c%m)'
+VCS_INFO_hook:5> local hook static func
+VCS_INFO_hook:6> local -x context hook_name
+VCS_INFO_hook:7> local -xi ret
+VCS_INFO_hook:8> local -a hooks tmp
+VCS_INFO_hook:9> local -i debug
+VCS_INFO_hook:11> ret=0
+VCS_INFO_hook:12> hook_name=set-message
+VCS_INFO_hook:13> shift
+VCS_INFO_hook:14> context=:vcs_info:-quilt-+set-message:default:-all-
+VCS_INFO_hook:15> static=:vcs_info-static_hooks:set-message
+VCS_INFO_hook:17> zstyle -t :vcs_info:-quilt-+set-message:default:-all- debug
+VCS_INFO_hook:17> debug=0
+VCS_INFO_hook:18> ((  debug  ))
+VCS_INFO_hook:24> zstyle -a :vcs_info-static_hooks:set-message hooks hooks
+VCS_INFO_hook:25> ((  debug  ))
+VCS_INFO_hook:28> zstyle -a :vcs_info:-quilt-+set-message:default:-all- hooks tmp
+VCS_INFO_hook:29> ((  debug  ))
+VCS_INFO_hook:32> hooks+=( )
+VCS_INFO_hook:33> ((  0 == 0  ))
+VCS_INFO_hook:33> return 0
+VCS_INFO_formats:82> zformat -f msg ' (%F{blue}%b%f%u%c%m)' a: b: c: i: 'm:%F{blue}10/11%f' r:gmrun-0.9.2 s:-quilt- u: 'Q:%F{blue}10/11%f' R:/home/marc/src/from-debian/gmrun-0.9.2 S:.
+VCS_INFO_formats:94> msgs[$i]=' (%F{blue}%f%F{blue}10/11%f)'
+VCS_INFO_formats:99> hook_com=( )
+VCS_INFO_formats:100> backend_misc=( )
+VCS_INFO_formats:101> return 0
+VCS_INFO_quilt:96> VCS_INFO_set
+VCS_INFO_set:5> setopt localoptions noksharrays NO_shwordsplit
+VCS_INFO_set:6> local -i i j
+VCS_INFO_set:8> [[ '' == --nvcs ]]
+VCS_INFO_set:17> ((  1 - 1 < 0  ))
+VCS_INFO_set:18> i=0
+VCS_INFO_set:19> ((  j = i + 1  ))
+VCS_INFO_set:20> typeset -gx 'vcs_info_msg_0_= (%F{blue}%f%F{blue}10/11%f)'
+VCS_INFO_set:23> ((  i < maxexports  ))
+VCS_INFO_set:24> j=1
+VCS_INFO_set:25> [[ -n '' ]]
+VCS_INFO_set:24> j=2
+VCS_INFO_set:25> [[ -n '' ]]
+VCS_INFO_set:28> return 0
+VCS_INFO_quilt:105> VCS_INFO_hook post-quilt standalone /home/marc/src/from-debian/gmrun-0.9.2/debian/patches /home/marc/src/from-debian/gmrun-0.9.2/.pc
+VCS_INFO_hook:5> local hook static func
+VCS_INFO_hook:6> local -x context hook_name
+VCS_INFO_hook:7> local -xi ret
+VCS_INFO_hook:8> local -a hooks tmp
+VCS_INFO_hook:9> local -i debug
+VCS_INFO_hook:11> ret=0
+VCS_INFO_hook:12> hook_name=post-quilt
+VCS_INFO_hook:13> shift
+VCS_INFO_hook:14> context=:vcs_info:-quilt-+post-quilt:default:-all-
+VCS_INFO_hook:15> static=:vcs_info-static_hooks:post-quilt
+VCS_INFO_hook:17> zstyle -t :vcs_info:-quilt-+post-quilt:default:-all- debug
+VCS_INFO_hook:17> debug=0
+VCS_INFO_hook:18> ((  debug  ))
+VCS_INFO_hook:24> zstyle -a :vcs_info-static_hooks:post-quilt hooks hooks
+VCS_INFO_hook:25> ((  debug  ))
+VCS_INFO_hook:28> zstyle -a :vcs_info:-quilt-+post-quilt:default:-all- hooks tmp
+VCS_INFO_hook:29> ((  debug  ))
+VCS_INFO_hook:32> hooks+=( )
+VCS_INFO_hook:33> ((  0 == 0  ))
+VCS_INFO_hook:33> return 0
+vcs_info:75> return 0
~/src/from-debian/gmrun-0.9.2 (10/11) cd src                                                                                   100-gmrunrc.patch
+vcs_info:1> emulate -L zsh
+vcs_info:2> setopt extendedglob NO_warn_create_global
+vcs_info:4> [[ -r . ]]
+vcs_info:6> local pat
+vcs_info:7> local -i found retval
+vcs_info:8> local -a enabled disabled dps
+vcs_info:9> local -x usercontext vcs rrn quiltmode LC_MESSAGES
+vcs_info:10> local -ix maxexports
+vcs_info:11> local -ax msgs
+vcs_info:12> local -Ax vcs_comm hook_com backend_misc user_data
+vcs_info:14> LC_MESSAGES=C
+vcs_info:15> [[ -n '' ]]
+vcs_info:20> vcs=-init-
+vcs_info:20> rrn=-all-
+vcs_info:20> quiltmode=addon
+vcs_info:21> usercontext=default
+vcs_info:23> VCS_INFO_hook start-up
+VCS_INFO_hook:5> local hook static func
+VCS_INFO_hook:6> local -x context hook_name
+VCS_INFO_hook:7> local -xi ret
+VCS_INFO_hook:8> local -a hooks tmp
+VCS_INFO_hook:9> local -i debug
+VCS_INFO_hook:11> ret=0
+VCS_INFO_hook:12> hook_name=start-up
+VCS_INFO_hook:13> shift
+VCS_INFO_hook:14> context=:vcs_info:-init-+start-up:default:-all-
+VCS_INFO_hook:15> static=:vcs_info-static_hooks:start-up
+VCS_INFO_hook:17> zstyle -t :vcs_info:-init-+start-up:default:-all- debug
+VCS_INFO_hook:17> debug=0
+VCS_INFO_hook:18> ((  debug  ))
+VCS_INFO_hook:24> zstyle -a :vcs_info-static_hooks:start-up hooks hooks
+VCS_INFO_hook:25> ((  debug  ))
+VCS_INFO_hook:28> zstyle -a :vcs_info:-init-+start-up:default:-all- hooks tmp
+VCS_INFO_hook:29> ((  debug  ))
+VCS_INFO_hook:32> hooks+=( )
+VCS_INFO_hook:33> ((  0 == 0  ))
+VCS_INFO_hook:33> return 0
+vcs_info:24> retval=0
+vcs_info:25> ((  retval == 1  ))
+vcs_info:27> ((  retval == 2  ))
+vcs_info:35> zstyle -a :vcs_info:-init-:default:-all- enable enabled
+vcs_info:36> ((  4 == 0  ))
+vcs_info:38> [[ -n '' ]]
+vcs_info:43> [[ -n '' ]]
+vcs_info:48> zstyle -a :vcs_info:-init-:default:-all- disable-patterns dps
+vcs_info:57> VCS_INFO_maxexports
+VCS_INFO_maxexports:5> setopt localoptions NO_shwordsplit
+VCS_INFO_maxexports:7> zstyle -s :vcs_info:-init-:default:-all- max-exports maxexports
+VCS_INFO_maxexports:7> maxexports=2
+VCS_INFO_maxexports:8> [[ 2 != <-> ]]
+VCS_INFO_maxexports:8> ((  maxexports < 1  ))
+VCS_INFO_maxexports:13> return 0
+vcs_info:59> ((  found = 0  ))
+vcs_info:60> vcs=git
+vcs_info:61> [[ -n '' ]]
+vcs_info:62> ((  1 == 0  ))
+vcs_info:67> vcs_comm=( )
+vcs_info:68> VCS_INFO_get_cmd
+VCS_INFO_get_cmd:4> local cmd
+VCS_INFO_get_cmd:5> zstyle -s :vcs_info:git:default:-all- command cmd
+VCS_INFO_get_cmd:6> vcs_comm[cmd]=git
+vcs_info:69> VCS_INFO_detect_git
+VCS_INFO_detect_git:5> setopt localoptions NO_shwordsplit
+VCS_INFO_detect_git:7> [[ '' == --flavours ]]
+VCS_INFO_detect_git:9> VCS_INFO_check_com git
+VCS_INFO_check_com:5> setopt localoptions NO_shwordsplit
+VCS_INFO_check_com:7> case git (/*)
+VCS_INFO_check_com:7> case git (*)
+VCS_INFO_check_com:12> ((  1  ))
+VCS_INFO_check_com:12> return 0
+VCS_INFO_detect_git:9> git rev-parse --is-inside-work-tree
+VCS_INFO_detect_git:15> return 1
+vcs_info:60> vcs=svn
+vcs_info:61> [[ -n '' ]]
+vcs_info:62> ((  1 == 0  ))
+vcs_info:67> vcs_comm=( )
+vcs_info:68> VCS_INFO_get_cmd
+VCS_INFO_get_cmd:4> local cmd
+VCS_INFO_get_cmd:5> zstyle -s :vcs_info:svn:default:-all- command cmd
+VCS_INFO_get_cmd:6> vcs_comm[cmd]=svn
+vcs_info:69> VCS_INFO_detect_svn
+VCS_INFO_detect_svn:5> setopt localoptions NO_shwordsplit
+VCS_INFO_detect_svn:7> [[ '' == --flavours ]]
+VCS_INFO_detect_svn:9> VCS_INFO_check_com svn
+VCS_INFO_check_com:5> setopt localoptions NO_shwordsplit
+VCS_INFO_check_com:7> case svn (/*)
+VCS_INFO_check_com:7> case svn (*)
+VCS_INFO_check_com:12> ((  1  ))
+VCS_INFO_check_com:12> return 0
+VCS_INFO_detect_svn:10> vcs_comm[detect_need_file]='entries format wc.db'
+VCS_INFO_detect_svn:11> VCS_INFO_bydir_detect .svn
+VCS_INFO_bydir_detect:5> setopt localoptions NO_shwordsplit
+VCS_INFO_bydir_detect:6> local 'dirname=.svn'
+VCS_INFO_bydir_detect:7> local 'basedir=.' realbasedir file
+VCS_INFO_bydir_detect:9> realbasedir=+VCS_INFO_bydir_detect:9> VCS_INFO_realpath .
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q .
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:9> realbasedir=/home/marc/src/from-debian/gmrun-0.9.2/src
+VCS_INFO_bydir_detect:10> [[ /home/marc/src/from-debian/gmrun-0.9.2/src != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc/src/from-debian/gmrun-0.9.2/src ]]
+VCS_INFO_bydir_detect:12> [[ -n 'entries format wc.db' ]]
+VCS_INFO_bydir_detect:13> [[ -d ./.svn ]]
+VCS_INFO_bydir_detect:22> basedir=./..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/home/marc/src/from-debian/gmrun-0.9.2
+VCS_INFO_bydir_detect:10> [[ /home/marc/src/from-debian/gmrun-0.9.2 != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc/src/from-debian/gmrun-0.9.2 ]]
+VCS_INFO_bydir_detect:12> [[ -n 'entries format wc.db' ]]
+VCS_INFO_bydir_detect:13> [[ -d ./../.svn ]]
+VCS_INFO_bydir_detect:22> basedir=./../..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./../..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./../..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/home/marc/src/from-debian
+VCS_INFO_bydir_detect:10> [[ /home/marc/src/from-debian != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc/src/from-debian ]]
+VCS_INFO_bydir_detect:12> [[ -n 'entries format wc.db' ]]
+VCS_INFO_bydir_detect:13> [[ -d ./../../.svn ]]
+VCS_INFO_bydir_detect:22> basedir=./../../..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./../../..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./../../..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/home/marc/src
+VCS_INFO_bydir_detect:10> [[ /home/marc/src != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc/src ]]
+VCS_INFO_bydir_detect:12> [[ -n 'entries format wc.db' ]]
+VCS_INFO_bydir_detect:13> [[ -d ./../../../.svn ]]
+VCS_INFO_bydir_detect:22> basedir=./../../../..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./../../../..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./../../../..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/home/marc
+VCS_INFO_bydir_detect:10> [[ /home/marc != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc ]]
+VCS_INFO_bydir_detect:12> [[ -n 'entries format wc.db' ]]
+VCS_INFO_bydir_detect:13> [[ -d ./../../../../.svn ]]
+VCS_INFO_bydir_detect:22> basedir=./../../../../..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./../../../../..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./../../../../..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/home
+VCS_INFO_bydir_detect:10> [[ /home != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home ]]
+VCS_INFO_bydir_detect:12> [[ -n 'entries format wc.db' ]]
+VCS_INFO_bydir_detect:13> [[ -d ./../../../../../.svn ]]
+VCS_INFO_bydir_detect:22> basedir=./../../../../../..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./../../../../../..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./../../../../../..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/
+VCS_INFO_bydir_detect:10> [[ / != / ]]
+VCS_INFO_bydir_detect:26> [[ / == / ]]
+VCS_INFO_bydir_detect:26> return 1
+VCS_INFO_detect_svn:11> return 1
+vcs_info:60> vcs=bzr
+vcs_info:61> [[ -n '' ]]
+vcs_info:62> ((  1 == 0  ))
+vcs_info:67> vcs_comm=( )
+vcs_info:68> VCS_INFO_get_cmd
+VCS_INFO_get_cmd:4> local cmd
+VCS_INFO_get_cmd:5> zstyle -s :vcs_info:bzr:default:-all- command cmd
+VCS_INFO_get_cmd:6> vcs_comm[cmd]=bzr
+vcs_info:69> VCS_INFO_detect_bzr
+VCS_INFO_detect_bzr:5> setopt localoptions NO_shwordsplit
+VCS_INFO_detect_bzr:7> [[ '' == --flavours ]]
+VCS_INFO_detect_bzr:9> VCS_INFO_check_com bzr
+VCS_INFO_check_com:5> setopt localoptions NO_shwordsplit
+VCS_INFO_check_com:7> case bzr (/*)
+VCS_INFO_check_com:7> case bzr (*)
+VCS_INFO_check_com:12> ((  1  ))
+VCS_INFO_check_com:12> return 0
+VCS_INFO_detect_bzr:10> vcs_comm[detect_need_file]=branch/format
+VCS_INFO_detect_bzr:11> VCS_INFO_bydir_detect .bzr
+VCS_INFO_bydir_detect:5> setopt localoptions NO_shwordsplit
+VCS_INFO_bydir_detect:6> local 'dirname=.bzr'
+VCS_INFO_bydir_detect:7> local 'basedir=.' realbasedir file
+VCS_INFO_bydir_detect:9> realbasedir=+VCS_INFO_bydir_detect:9> VCS_INFO_realpath .
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q .
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:9> realbasedir=/home/marc/src/from-debian/gmrun-0.9.2/src
+VCS_INFO_bydir_detect:10> [[ /home/marc/src/from-debian/gmrun-0.9.2/src != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc/src/from-debian/gmrun-0.9.2/src ]]
+VCS_INFO_bydir_detect:12> [[ -n branch/format ]]
+VCS_INFO_bydir_detect:13> [[ -d ./.bzr ]]
+VCS_INFO_bydir_detect:22> basedir=./..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/home/marc/src/from-debian/gmrun-0.9.2
+VCS_INFO_bydir_detect:10> [[ /home/marc/src/from-debian/gmrun-0.9.2 != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc/src/from-debian/gmrun-0.9.2 ]]
+VCS_INFO_bydir_detect:12> [[ -n branch/format ]]
+VCS_INFO_bydir_detect:13> [[ -d ./../.bzr ]]
+VCS_INFO_bydir_detect:22> basedir=./../..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./../..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./../..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/home/marc/src/from-debian
+VCS_INFO_bydir_detect:10> [[ /home/marc/src/from-debian != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc/src/from-debian ]]
+VCS_INFO_bydir_detect:12> [[ -n branch/format ]]
+VCS_INFO_bydir_detect:13> [[ -d ./../../.bzr ]]
+VCS_INFO_bydir_detect:22> basedir=./../../..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./../../..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./../../..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/home/marc/src
+VCS_INFO_bydir_detect:10> [[ /home/marc/src != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc/src ]]
+VCS_INFO_bydir_detect:12> [[ -n branch/format ]]
+VCS_INFO_bydir_detect:13> [[ -d ./../../../.bzr ]]
+VCS_INFO_bydir_detect:22> basedir=./../../../..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./../../../..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./../../../..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/home/marc
+VCS_INFO_bydir_detect:10> [[ /home/marc != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc ]]
+VCS_INFO_bydir_detect:12> [[ -n branch/format ]]
+VCS_INFO_bydir_detect:13> [[ -d ./../../../../.bzr ]]
+VCS_INFO_bydir_detect:22> basedir=./../../../../..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./../../../../..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./../../../../..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/home
+VCS_INFO_bydir_detect:10> [[ /home != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home ]]
+VCS_INFO_bydir_detect:12> [[ -n branch/format ]]
+VCS_INFO_bydir_detect:13> [[ -d ./../../../../../.bzr ]]
+VCS_INFO_bydir_detect:22> basedir=./../../../../../..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./../../../../../..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./../../../../../..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/
+VCS_INFO_bydir_detect:10> [[ / != / ]]
+VCS_INFO_bydir_detect:26> [[ / == / ]]
+VCS_INFO_bydir_detect:26> return 1
+VCS_INFO_detect_bzr:12> return 1
+vcs_info:60> vcs=hg
+vcs_info:61> [[ -n '' ]]
+vcs_info:62> ((  1 == 0  ))
+vcs_info:67> vcs_comm=( )
+vcs_info:68> VCS_INFO_get_cmd
+VCS_INFO_get_cmd:4> local cmd
+VCS_INFO_get_cmd:5> zstyle -s :vcs_info:hg:default:-all- command cmd
+VCS_INFO_get_cmd:6> vcs_comm[cmd]=hg
+vcs_info:69> VCS_INFO_detect_hg
+VCS_INFO_detect_hg:5> setopt localoptions NO_shwordsplit
+VCS_INFO_detect_hg:7> [[ '' == --flavours ]]
+VCS_INFO_detect_hg:9> VCS_INFO_check_com hg
+VCS_INFO_check_com:5> setopt localoptions NO_shwordsplit
+VCS_INFO_check_com:7> case hg (/*)
+VCS_INFO_check_com:7> case hg (*)
+VCS_INFO_check_com:12> ((  1  ))
+VCS_INFO_check_com:12> return 0
+VCS_INFO_detect_hg:10> vcs_comm[detect_need_file]='store data sharedpath'
+VCS_INFO_detect_hg:11> VCS_INFO_bydir_detect .hg
+VCS_INFO_bydir_detect:5> setopt localoptions NO_shwordsplit
+VCS_INFO_bydir_detect:6> local 'dirname=.hg'
+VCS_INFO_bydir_detect:7> local 'basedir=.' realbasedir file
+VCS_INFO_bydir_detect:9> realbasedir=+VCS_INFO_bydir_detect:9> VCS_INFO_realpath .
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q .
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:9> realbasedir=/home/marc/src/from-debian/gmrun-0.9.2/src
+VCS_INFO_bydir_detect:10> [[ /home/marc/src/from-debian/gmrun-0.9.2/src != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc/src/from-debian/gmrun-0.9.2/src ]]
+VCS_INFO_bydir_detect:12> [[ -n 'store data sharedpath' ]]
+VCS_INFO_bydir_detect:13> [[ -d ./.hg ]]
+VCS_INFO_bydir_detect:22> basedir=./..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/home/marc/src/from-debian/gmrun-0.9.2
+VCS_INFO_bydir_detect:10> [[ /home/marc/src/from-debian/gmrun-0.9.2 != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc/src/from-debian/gmrun-0.9.2 ]]
+VCS_INFO_bydir_detect:12> [[ -n 'store data sharedpath' ]]
+VCS_INFO_bydir_detect:13> [[ -d ./../.hg ]]
+VCS_INFO_bydir_detect:22> basedir=./../..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./../..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./../..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/home/marc/src/from-debian
+VCS_INFO_bydir_detect:10> [[ /home/marc/src/from-debian != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc/src/from-debian ]]
+VCS_INFO_bydir_detect:12> [[ -n 'store data sharedpath' ]]
+VCS_INFO_bydir_detect:13> [[ -d ./../../.hg ]]
+VCS_INFO_bydir_detect:22> basedir=./../../..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./../../..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./../../..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/home/marc/src
+VCS_INFO_bydir_detect:10> [[ /home/marc/src != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc/src ]]
+VCS_INFO_bydir_detect:12> [[ -n 'store data sharedpath' ]]
+VCS_INFO_bydir_detect:13> [[ -d ./../../../.hg ]]
+VCS_INFO_bydir_detect:22> basedir=./../../../..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./../../../..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./../../../..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/home/marc
+VCS_INFO_bydir_detect:10> [[ /home/marc != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc ]]
+VCS_INFO_bydir_detect:12> [[ -n 'store data sharedpath' ]]
+VCS_INFO_bydir_detect:13> [[ -d ./../../../../.hg ]]
+VCS_INFO_bydir_detect:22> basedir=./../../../../..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./../../../../..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./../../../../..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/home
+VCS_INFO_bydir_detect:10> [[ /home != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home ]]
+VCS_INFO_bydir_detect:12> [[ -n 'store data sharedpath' ]]
+VCS_INFO_bydir_detect:13> [[ -d ./../../../../../.hg ]]
+VCS_INFO_bydir_detect:22> basedir=./../../../../../..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./../../../../../..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./../../../../../..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/
+VCS_INFO_bydir_detect:10> [[ / != / ]]
+VCS_INFO_bydir_detect:26> [[ / == / ]]
+VCS_INFO_bydir_detect:26> return 1
+VCS_INFO_detect_hg:11> return 1
+vcs_info:72> ((  found == 0  ))
+vcs_info:73> vcs=-quilt-
+vcs_info:73> quiltmode=standalone
+vcs_info:74> VCS_INFO_quilt standalone
+VCS_INFO_quilt:1> emulate -L zsh
+VCS_INFO_quilt:2> setopt extendedglob
+VCS_INFO_quilt:3> local 'mode=standalone'
+VCS_INFO_quilt:4> local patches pc tmp qstring root
+VCS_INFO_quilt:5> local -i ret
+VCS_INFO_quilt:6> local -x context
+VCS_INFO_quilt:7> local -a applied unapplied all applied_string unapplied_string quiltcommand
+VCS_INFO_quilt:8> local -Ax hook_com
+VCS_INFO_quilt:10> context=:vcs_info:-quilt-.quilt-standalone:default:-all-
+VCS_INFO_quilt:11> zstyle -t :vcs_info:-quilt-.quilt-standalone:default:-all- use-quilt
+VCS_INFO_quilt:13> case standalone (standalone)
+VCS_INFO_quilt:15> VCS_INFO_quilt-standalone-detect
+VCS_INFO_quilt-standalone-detect:1> emulate -L zsh
+VCS_INFO_quilt-standalone-detect:2> setopt extendedglob
+VCS_INFO_quilt-standalone-detect:3> local param
+VCS_INFO_quilt-standalone-detect:4> local -i ret
+VCS_INFO_quilt-standalone-detect:6> zstyle -s :vcs_info:-quilt-.quilt-standalone:default:-all- quilt-standalone param
+VCS_INFO_quilt-standalone-detect:7> [[ always == never ]]
+VCS_INFO_quilt-standalone-detect:8> [[ always == always ]]
+VCS_INFO_quilt-standalone-detect:8> return 0
+VCS_INFO_quilt:25> zstyle -s :vcs_info:-quilt-.quilt-standalone:default:-all- quilt-patch-dir patches
+VCS_INFO_quilt:25> patches=debian/patches
+VCS_INFO_quilt:26> [[ debian/patches != /* ]]
+VCS_INFO_quilt:27> tmp=debian/patches
+VCS_INFO_quilt:28> patches=+VCS_INFO_quilt:28> VCS_INFO_quilt-dirfind debian/patches
+VCS_INFO_quilt-dirfind:5> emulate -L zsh
+VCS_INFO_quilt-dirfind:6> setopt extendedglob
+VCS_INFO_quilt-dirfind:7> local 'dir=debian/patches' 'file='
+VCS_INFO_quilt-dirfind:7> shift 1
+VCS_INFO_quilt-dirfind:8> local ret oldfile olddir
+VCS_INFO_quilt-dirfind:10> olddir=''
+VCS_INFO_quilt-dirfind:11> vcs_comm[basedir]=''
+VCS_INFO_quilt-dirfind:12> oldfile='store data sharedpath'
+VCS_INFO_quilt-dirfind:13> vcs_comm[detect_need_file]=''
+VCS_INFO_quilt-dirfind:14> VCS_INFO_bydir_detect debian/patches
+VCS_INFO_bydir_detect:5> setopt localoptions NO_shwordsplit
+VCS_INFO_bydir_detect:6> local 'dirname=debian/patches'
+VCS_INFO_bydir_detect:7> local 'basedir=.' realbasedir file
+VCS_INFO_bydir_detect:9> realbasedir=+VCS_INFO_bydir_detect:9> VCS_INFO_realpath .
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q .
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:9> realbasedir=/home/marc/src/from-debian/gmrun-0.9.2/src
+VCS_INFO_bydir_detect:10> [[ /home/marc/src/from-debian/gmrun-0.9.2/src != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc/src/from-debian/gmrun-0.9.2/src ]]
+VCS_INFO_bydir_detect:12> [[ -n '' ]]
+VCS_INFO_bydir_detect:19> [[ -d ./debian/patches ]]
+VCS_INFO_bydir_detect:22> basedir=./..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/home/marc/src/from-debian/gmrun-0.9.2
+VCS_INFO_bydir_detect:10> [[ /home/marc/src/from-debian/gmrun-0.9.2 != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc/src/from-debian/gmrun-0.9.2 ]]
+VCS_INFO_bydir_detect:12> [[ -n '' ]]
+VCS_INFO_bydir_detect:19> [[ -d ./../debian/patches ]]
+VCS_INFO_bydir_detect:19> break
+VCS_INFO_bydir_detect:26> [[ /home/marc/src/from-debian/gmrun-0.9.2 == / ]]
+VCS_INFO_bydir_detect:27> vcs_comm[basedir]=/home/marc/src/from-debian/gmrun-0.9.2
+VCS_INFO_bydir_detect:28> return 0
+VCS_INFO_quilt-dirfind:15> ret=0
+VCS_INFO_quilt-dirfind:16> vcs_comm[detect_need_file]='store data sharedpath'
+VCS_INFO_quilt-dirfind:17> printf %s /home/marc/src/from-debian/gmrun-0.9.2
+VCS_INFO_quilt-dirfind:18> vcs_comm[basedir]=''
+VCS_INFO_quilt-dirfind:19> return 0
+VCS_INFO_quilt:28> patches=/home/marc/src/from-debian/gmrun-0.9.2
+VCS_INFO_quilt:29> ret=0
+VCS_INFO_quilt:30> ((  ret  ))
+VCS_INFO_quilt:31> patches=/home/marc/src/from-debian/gmrun-0.9.2/debian/patches
+VCS_INFO_quilt:36> pc=+VCS_INFO_quilt:36> VCS_INFO_quilt-dirfind .pc .version
+VCS_INFO_quilt-dirfind:5> emulate -L zsh
+VCS_INFO_quilt-dirfind:6> setopt extendedglob
+VCS_INFO_quilt-dirfind:7> local 'dir=.pc' 'file=.version'
+VCS_INFO_quilt-dirfind:7> shift 2
+VCS_INFO_quilt-dirfind:8> local ret oldfile olddir
+VCS_INFO_quilt-dirfind:10> olddir=''
+VCS_INFO_quilt-dirfind:11> vcs_comm[basedir]=''
+VCS_INFO_quilt-dirfind:12> oldfile='store data sharedpath'
+VCS_INFO_quilt-dirfind:13> vcs_comm[detect_need_file]=.version
+VCS_INFO_quilt-dirfind:14> VCS_INFO_bydir_detect .pc
+VCS_INFO_bydir_detect:5> setopt localoptions NO_shwordsplit
+VCS_INFO_bydir_detect:6> local 'dirname=.pc'
+VCS_INFO_bydir_detect:7> local 'basedir=.' realbasedir file
+VCS_INFO_bydir_detect:9> realbasedir=+VCS_INFO_bydir_detect:9> VCS_INFO_realpath .
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q .
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:9> realbasedir=/home/marc/src/from-debian/gmrun-0.9.2/src
+VCS_INFO_bydir_detect:10> [[ /home/marc/src/from-debian/gmrun-0.9.2/src != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc/src/from-debian/gmrun-0.9.2/src ]]
+VCS_INFO_bydir_detect:12> [[ -n .version ]]
+VCS_INFO_bydir_detect:13> [[ -d ./.pc ]]
+VCS_INFO_bydir_detect:22> basedir=./..
+VCS_INFO_bydir_detect:23> realbasedir=+VCS_INFO_bydir_detect:23> VCS_INFO_realpath ./..
+VCS_INFO_realpath:5> setopt localoptions NO_shwordsplit chaselinks
+VCS_INFO_realpath:7> cd -q ./..
+VCS_INFO_realpath:7> pwd
+VCS_INFO_bydir_detect:23> realbasedir=/home/marc/src/from-debian/gmrun-0.9.2
+VCS_INFO_bydir_detect:10> [[ /home/marc/src/from-debian/gmrun-0.9.2 != / ]]
+VCS_INFO_bydir_detect:11> [[ -r /home/marc/src/from-debian/gmrun-0.9.2 ]]
+VCS_INFO_bydir_detect:12> [[ -n .version ]]
+VCS_INFO_bydir_detect:13> [[ -d ./../.pc ]]
+VCS_INFO_bydir_detect:14> file=.version
+VCS_INFO_bydir_detect:15> [[ -e ./../.pc/.version ]]
+VCS_INFO_bydir_detect:15> break 2
+VCS_INFO_bydir_detect:26> [[ /home/marc/src/from-debian/gmrun-0.9.2 == / ]]
+VCS_INFO_bydir_detect:27> vcs_comm[basedir]=/home/marc/src/from-debian/gmrun-0.9.2
+VCS_INFO_bydir_detect:28> return 0
+VCS_INFO_quilt-dirfind:15> ret=0
+VCS_INFO_quilt-dirfind:16> vcs_comm[detect_need_file]='store data sharedpath'
+VCS_INFO_quilt-dirfind:17> printf %s /home/marc/src/from-debian/gmrun-0.9.2
+VCS_INFO_quilt-dirfind:18> vcs_comm[basedir]=''
+VCS_INFO_quilt-dirfind:19> return 0
+VCS_INFO_quilt:36> pc=/home/marc/src/from-debian/gmrun-0.9.2
+VCS_INFO_quilt:37> ret=0
+VCS_INFO_quilt:38> ((  ret == 0  ))
+VCS_INFO_quilt:39> [[ standalone == standalone ]]
+VCS_INFO_quilt:39> root=/home/marc/src/from-debian/gmrun-0.9.2
+VCS_INFO_quilt:40> pc=/home/marc/src/from-debian/gmrun-0.9.2/.pc
+VCS_INFO_quilt:41> [[ -e /home/marc/src/from-debian/gmrun-0.9.2/.pc/applied-patches ]]
+VCS_INFO_quilt:42> applied=( 10-escaping.patch 20-includes.patch 30-fix-gcc-4.3-build.patch 40-history_string.patch 50-empty-history.patch 60-fix_gtkcompletionline.patch 70-cmdline.patch 80-selectoption.patch 90-window_placement.patch 100-gmrunrc.patch )
+VCS_INFO_quilt:44> applied=( 10-escaping.patch 20-includes.patch 30-fix-gcc-4.3-build.patch 40-history_string.patch 50-empty-history.patch 60-fix_gtkcompletionline.patch 70-cmdline.patch 80-selectoption.patch 90-window_placement.patch 100-gmrunrc.patch )
+VCS_INFO_quilt:45> applied=( 100-gmrunrc.patch 90-window_placement.patch 80-selectoption.patch 70-cmdline.patch 60-fix_gtkcompletionline.patch 50-empty-history.patch 40-history_string.patch 30-fix-gcc-4.3-build.patch 20-includes.patch 10-escaping.patch )
+VCS_INFO_quilt:50> zstyle -t :vcs_info:-quilt-.quilt-standalone:default:-all- get-unapplied
+VCS_INFO_quilt:53> zstyle -s :vcs_info:-quilt-.quilt-standalone:default:-all- quiltcommand quiltcommand
+VCS_INFO_quilt:53> quiltcommand=quilt
+VCS_INFO_quilt:54> unapplied=+VCS_INFO_quilt:54> QUILT_PATCHES=/home/marc/src/from-debian/gmrun-0.9.2/debian/patches quilt --quiltrc /dev/null unapplied
+VCS_INFO_quilt:54> unapplied=( /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/10-escaping.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/20-includes.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/30-fix-gcc-4.3-build.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/40-history_string.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/50-empty-history.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/60-fix_gtkcompletionline.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/70-cmdline.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/80-selectoption.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/90-window_placement.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/100-gmrunrc.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/debian-changes-0.9.2-2.1 )
+VCS_INFO_quilt:55> unapplied=( /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/10-escaping.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/20-includes.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/30-fix-gcc-4.3-build.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/40-history_string.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/50-empty-history.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/60-fix_gtkcompletionline.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/70-cmdline.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/80-selectoption.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/90-window_placement.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/100-gmrunrc.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/debian-changes-0.9.2-2.1 )
+VCS_INFO_quilt:60> all=( 10-escaping.patch 20-includes.patch 30-fix-gcc-4.3-build.patch 40-history_string.patch 50-empty-history.patch 60-fix_gtkcompletionline.patch 70-cmdline.patch 80-selectoption.patch 90-window_placement.patch 100-gmrunrc.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/10-escaping.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/20-includes.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/30-fix-gcc-4.3-build.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/40-history_string.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/50-empty-history.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/60-fix_gtkcompletionline.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/70-cmdline.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/80-selectoption.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/90-window_placement.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/100-gmrunrc.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/debian-changes-0.9.2-2.1 )
+VCS_INFO_quilt:62> VCS_INFO_hook gen-applied-string 100-gmrunrc.patch 90-window_placement.patch 80-selectoption.patch 70-cmdline.patch 60-fix_gtkcompletionline.patch 50-empty-history.patch 40-history_string.patch 30-fix-gcc-4.3-build.patch 20-includes.patch 10-escaping.patch
+VCS_INFO_hook:5> local hook static func
+VCS_INFO_hook:6> local -x context hook_name
+VCS_INFO_hook:7> local -xi ret
+VCS_INFO_hook:8> local -a hooks tmp
+VCS_INFO_hook:9> local -i debug
+VCS_INFO_hook:11> ret=0
+VCS_INFO_hook:12> hook_name=gen-applied-string
+VCS_INFO_hook:13> shift
+VCS_INFO_hook:14> context=:vcs_info:-quilt-+gen-applied-string:default:-all-
+VCS_INFO_hook:15> static=:vcs_info-static_hooks:gen-applied-string
+VCS_INFO_hook:17> zstyle -t :vcs_info:-quilt-+gen-applied-string:default:-all- debug
+VCS_INFO_hook:17> debug=0
+VCS_INFO_hook:18> ((  debug  ))
+VCS_INFO_hook:24> zstyle -a :vcs_info-static_hooks:gen-applied-string hooks hooks
+VCS_INFO_hook:25> ((  debug  ))
+VCS_INFO_hook:28> zstyle -a :vcs_info:-quilt-+gen-applied-string:default:-all- hooks tmp
+VCS_INFO_hook:29> ((  debug  ))
+VCS_INFO_hook:32> hooks+=( )
+VCS_INFO_hook:33> ((  1 == 0  ))
+VCS_INFO_hook:39> typeset -g -r vcs rrn usercontext maxexports msgs vcs_comm
+VCS_INFO_hook:40> hook=gen-applied-string
+VCS_INFO_hook:41> func=+vi-gen-applied-string
+VCS_INFO_hook:42> ((  1 == 0  ))
+VCS_INFO_hook:46> ((  debug  ))
+VCS_INFO_hook:47> true
+VCS_INFO_hook:48> +vi-gen-applied-string 100-gmrunrc.patch 90-window_placement.patch 80-selectoption.patch 70-cmdline.patch 60-fix_gtkcompletionline.patch 50-empty-history.patch 40-history_string.patch 30-fix-gcc-4.3-build.patch 20-includes.patch 10-escaping.patch
++vi-gen-applied-string:1> [ -z 100-gmrunrc.patch ']'
++vi-gen-applied-string:2> local 'txt=100-gmrunrc.patch'
++vi-gen-applied-string:3> [[ -quilt- == *git* ]]
++vi-gen-applied-string:7> local 'width=70'
++vi-gen-applied-string:8> [ 145 -lt 80 ']'
++vi-gen-applied-string:9> myrepo_rprompt='%70>...> %B100-gmrunrc.patch'
+VCS_INFO_hook:49> case 0 (0)
+VCS_INFO_hook:57> typeset -g +r vcs rrn usercontext maxexports msgs vcs_comm
+VCS_INFO_hook:58> return 0
+VCS_INFO_quilt:63> ((  10  ))
+VCS_INFO_quilt:64> applied_string=100-gmrunrc.patch
+VCS_INFO_quilt:71> hook_com=( )
+VCS_INFO_quilt:72> VCS_INFO_hook gen-unapplied-string /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/10-escaping.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/20-includes.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/30-fix-gcc-4.3-build.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/40-history_string.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/50-empty-history.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/60-fix_gtkcompletionline.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/70-cmdline.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/80-selectoption.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/90-window_placement.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/100-gmrunrc.patch /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/debian-changes-0.9.2-2.1
+VCS_INFO_hook:5> local hook static func
+VCS_INFO_hook:6> local -x context hook_name
+VCS_INFO_hook:7> local -xi ret
+VCS_INFO_hook:8> local -a hooks tmp
+VCS_INFO_hook:9> local -i debug
+VCS_INFO_hook:11> ret=0
+VCS_INFO_hook:12> hook_name=gen-unapplied-string
+VCS_INFO_hook:13> shift
+VCS_INFO_hook:14> context=:vcs_info:-quilt-+gen-unapplied-string:default:-all-
+VCS_INFO_hook:15> static=:vcs_info-static_hooks:gen-unapplied-string
+VCS_INFO_hook:17> zstyle -t :vcs_info:-quilt-+gen-unapplied-string:default:-all- debug
+VCS_INFO_hook:17> debug=0
+VCS_INFO_hook:18> ((  debug  ))
+VCS_INFO_hook:24> zstyle -a :vcs_info-static_hooks:gen-unapplied-string hooks hooks
+VCS_INFO_hook:25> ((  debug  ))
+VCS_INFO_hook:28> zstyle -a :vcs_info:-quilt-+gen-unapplied-string:default:-all- hooks tmp
+VCS_INFO_hook:29> ((  debug  ))
+VCS_INFO_hook:32> hooks+=( )
+VCS_INFO_hook:33> ((  0 == 0  ))
+VCS_INFO_hook:33> return 0
+VCS_INFO_quilt:73> unapplied_string=11
+VCS_INFO_quilt:78> ((  10  ))
+VCS_INFO_quilt:79> zstyle -s :vcs_info:-quilt-.quilt-standalone:default:-all- patch-format qstring
+VCS_INFO_quilt:83> hook_com=( applied 100-gmrunrc.patch unapplied 11 applied-n 10 unapplied-n 11 all-n 21 )
+VCS_INFO_quilt:85> VCS_INFO_hook set-patch-format '%F{blue}%n/%a%f'
+VCS_INFO_hook:5> local hook static func
+VCS_INFO_hook:6> local -x context hook_name
+VCS_INFO_hook:7> local -xi ret
+VCS_INFO_hook:8> local -a hooks tmp
+VCS_INFO_hook:9> local -i debug
+VCS_INFO_hook:11> ret=0
+VCS_INFO_hook:12> hook_name=set-patch-format
+VCS_INFO_hook:13> shift
+VCS_INFO_hook:14> context=:vcs_info:-quilt-+set-patch-format:default:-all-
+VCS_INFO_hook:15> static=:vcs_info-static_hooks:set-patch-format
+VCS_INFO_hook:17> zstyle -t :vcs_info:-quilt-+set-patch-format:default:-all- debug
+VCS_INFO_hook:17> debug=0
+VCS_INFO_hook:18> ((  debug  ))
+VCS_INFO_hook:24> zstyle -a :vcs_info-static_hooks:set-patch-format hooks hooks
+VCS_INFO_hook:25> ((  debug  ))
+VCS_INFO_hook:28> zstyle -a :vcs_info:-quilt-+set-patch-format:default:-all- hooks tmp
+VCS_INFO_hook:29> ((  debug  ))
+VCS_INFO_hook:32> hooks+=( )
+VCS_INFO_hook:33> ((  0 == 0  ))
+VCS_INFO_hook:33> return 0
+VCS_INFO_quilt:86> zformat -f qstring '%F{blue}%n/%a%f' p:100-gmrunrc.patch u:11 n:10 c:11 a:21
+VCS_INFO_quilt:91> hook_com=( )
+VCS_INFO_quilt:93> case standalone (standalone)
+VCS_INFO_quilt:95> VCS_INFO_formats '' '' /home/marc/src/from-debian/gmrun-0.9.2 '' '' '' '%F{blue}10/21%f'
+VCS_INFO_formats:5> setopt localoptions noksharrays NO_shwordsplit
+VCS_INFO_formats:6> local msg tmp
+VCS_INFO_formats:7> local -i i
+VCS_INFO_formats:8> local -xA hook_com
+VCS_INFO_formats:12> hook_com=( action '' action_orig '' branch '' branch_orig '' base /home/marc/src/from-debian/gmrun-0.9.2 base_orig /home/marc/src/from-debian/gmrun-0.9.2 staged '' staged_orig '' unstaged '' unstaged_orig '' revision '' revision_orig '' misc '%F{blue}10/21%f' misc_orig '%F{blue}10/21%f' vcs -quilt- vcs_orig -quilt- )
+VCS_INFO_formats:30> hook_com[base-name]=gmrun-0.9.2
+VCS_INFO_formats:31> hook_com[base-name_orig]=''
+VCS_INFO_formats:32> hook_com[subdir]=+VCS_INFO_formats:32> VCS_INFO_reposub /home/marc/src/from-debian/gmrun-0.9.2
+VCS_INFO_reposub:5> setopt localoptions extendedglob NO_shwordsplit
+VCS_INFO_reposub:6> local 'base=/home/marc/src/from-debian/gmrun-0.9.2' tmp
+VCS_INFO_reposub:8> tmp=+VCS_INFO_reposub:8> pwd -P
+VCS_INFO_reposub:8> tmp=/home/marc/src/from-debian/gmrun-0.9.2/src
+VCS_INFO_reposub:9> [[ /home/marc/src/from-debian/gmrun-0.9.2/src == /home/marc/src/from-debian/gmrun-0.9.2/* ]]
+VCS_INFO_reposub:13> printf %s src
+VCS_INFO_reposub:14> return 0
+VCS_INFO_formats:32> hook_com[subdir]=src
+VCS_INFO_formats:33> hook_com[subdir_orig]=src
+VCS_INFO_formats:35> VCS_INFO_hook post-backend
+VCS_INFO_hook:5> local hook static func
+VCS_INFO_hook:6> local -x context hook_name
+VCS_INFO_hook:7> local -xi ret
+VCS_INFO_hook:8> local -a hooks tmp
+VCS_INFO_hook:9> local -i debug
+VCS_INFO_hook:11> ret=0
+VCS_INFO_hook:12> hook_name=post-backend
+VCS_INFO_hook:13> shift
+VCS_INFO_hook:14> context=:vcs_info:-quilt-+post-backend:default:-all-
+VCS_INFO_hook:15> static=:vcs_info-static_hooks:post-backend
+VCS_INFO_hook:17> zstyle -t :vcs_info:-quilt-+post-backend:default:-all- debug
+VCS_INFO_hook:17> debug=0
+VCS_INFO_hook:18> ((  debug  ))
+VCS_INFO_hook:24> zstyle -a :vcs_info-static_hooks:post-backend hooks hooks
+VCS_INFO_hook:25> ((  debug  ))
+VCS_INFO_hook:28> zstyle -a :vcs_info:-quilt-+post-backend:default:-all- hooks tmp
+VCS_INFO_hook:29> ((  debug  ))
+VCS_INFO_hook:32> hooks+=( )
+VCS_INFO_hook:33> ((  1 == 0  ))
+VCS_INFO_hook:39> typeset -g -r vcs rrn usercontext maxexports msgs vcs_comm
+VCS_INFO_hook:40> hook=post-backend
+VCS_INFO_hook:41> func=+vi-post-backend
+VCS_INFO_hook:42> ((  1 == 0  ))
+VCS_INFO_hook:46> ((  debug  ))
+VCS_INFO_hook:47> true
+VCS_INFO_hook:48> +vi-post-backend
++vi-post-backend:2> local 'subdir=src'
++vi-post-backend:3> local 'base=/home/marc/src/from-debian/gmrun-0.9.2'
++vi-post-backend:4> local -A style
++vi-post-backend:6> [ -z /home/marc/src/from-debian/gmrun-0.9.2 ']'
++vi-post-backend:25> style=++vi-post-backend:25> get-style /home/marc/src/from-debian/gmrun-0.9.2
+get-style:2> local style s 'p=/home/marc/src/from-debian/gmrun-0.9.2'
+get-style:3> local -A hstyle
+get-style:4> zstyle -s :mprompt:/home/marc/src/from-debian/gmrun-0.9.2 style style
+get-style:5> s=color=green
+get-style:6> hstyle+=( color green )
+get-style:8> [ '' '=' bold ']'
+get-style:11> echo color green
+get-style:12> return 0
++vi-post-backend:25> style=( color green )
++vi-post-backend:26> myrepobase=/home/marc/src/from-debian/gmrun-0.9.2
++vi-post-backend:27> base=++vi-post-backend:27> rationalize-path /home/marc/src/from-debian/gmrun-0.9.2
+rationalize-path:2> local new 'p=/home/marc/src/from-debian/gmrun-0.9.2'
+rationalize-path:3> p='~/src/from-debian/gmrun-0.9.2'
+rationalize-path:4> p='~/src/from-debian/gmrun-0.9.2'
+rationalize-path:5> echo '~/src/from-debian/gmrun-0.9.2'
++vi-post-backend:27> base='~/src/from-debian/gmrun-0.9.2'
++vi-post-backend:28> [ src '=' . -o -z src ']'
++vi-post-backend:32> base='~/src/from-debian/gmrun-0.9.2/'
++vi-post-backend:33> mytitle=++vi-post-backend:33> basename '~/src/from-debian/gmrun-0.9.2/'
++vi-post-backend:33> mytitle=gmrun-0.9.2/src
++vi-post-backend:35> mytitle='#[fg=green]gmrun-0.9.2/src'
++vi-post-backend:38> mypath='%F{green}~/src/from-debian/gmrun-0.9.2/%f%b%F{blue}src%f'
+VCS_INFO_hook:49> case 0 (0)
+VCS_INFO_hook:57> typeset -g +r vcs rrn usercontext maxexports msgs vcs_comm
+VCS_INFO_hook:58> return 0
+VCS_INFO_formats:52> [[ -n '' ]]
+VCS_INFO_formats:56> zstyle -a :vcs_info:-quilt-:default:-all- formats msgs
+VCS_INFO_formats:57> ((  1 < 1  ))
+VCS_INFO_formats:60> [[ -n '' ]]
+VCS_INFO_formats:65> [[ -n '' ]]
+VCS_INFO_formats:70> [[ standalone != standalone ]]
+VCS_INFO_formats:75> [[ standalone == standalone ]]
+VCS_INFO_formats:76> hook_com[quilt]='%F{blue}10/21%f'
+VCS_INFO_formats:79> ((  1 > maxexports  ))
+VCS_INFO_formats:80> i=1
+VCS_INFO_formats:81> VCS_INFO_hook set-message 0 ' (%F{blue}%b%f%u%c%m)'
+VCS_INFO_hook:5> local hook static func
+VCS_INFO_hook:6> local -x context hook_name
+VCS_INFO_hook:7> local -xi ret
+VCS_INFO_hook:8> local -a hooks tmp
+VCS_INFO_hook:9> local -i debug
+VCS_INFO_hook:11> ret=0
+VCS_INFO_hook:12> hook_name=set-message
+VCS_INFO_hook:13> shift
+VCS_INFO_hook:14> context=:vcs_info:-quilt-+set-message:default:-all-
+VCS_INFO_hook:15> static=:vcs_info-static_hooks:set-message
+VCS_INFO_hook:17> zstyle -t :vcs_info:-quilt-+set-message:default:-all- debug
+VCS_INFO_hook:17> debug=0
+VCS_INFO_hook:18> ((  debug  ))
+VCS_INFO_hook:24> zstyle -a :vcs_info-static_hooks:set-message hooks hooks
+VCS_INFO_hook:25> ((  debug  ))
+VCS_INFO_hook:28> zstyle -a :vcs_info:-quilt-+set-message:default:-all- hooks tmp
+VCS_INFO_hook:29> ((  debug  ))
+VCS_INFO_hook:32> hooks+=( )
+VCS_INFO_hook:33> ((  0 == 0  ))
+VCS_INFO_hook:33> return 0
+VCS_INFO_formats:82> zformat -f msg ' (%F{blue}%b%f%u%c%m)' a: b: c: i: 'm:%F{blue}10/21%f' r:gmrun-0.9.2 s:-quilt- u: 'Q:%F{blue}10/21%f' R:/home/marc/src/from-debian/gmrun-0.9.2 S:src
+VCS_INFO_formats:94> msgs[$i]=' (%F{blue}%f%F{blue}10/21%f)'
+VCS_INFO_formats:99> hook_com=( )
+VCS_INFO_formats:100> backend_misc=( )
+VCS_INFO_formats:101> return 0
+VCS_INFO_quilt:96> VCS_INFO_set
+VCS_INFO_set:5> setopt localoptions noksharrays NO_shwordsplit
+VCS_INFO_set:6> local -i i j
+VCS_INFO_set:8> [[ '' == --nvcs ]]
+VCS_INFO_set:17> ((  1 - 1 < 0  ))
+VCS_INFO_set:18> i=0
+VCS_INFO_set:19> ((  j = i + 1  ))
+VCS_INFO_set:20> typeset -gx 'vcs_info_msg_0_= (%F{blue}%f%F{blue}10/21%f)'
+VCS_INFO_set:23> ((  i < maxexports  ))
+VCS_INFO_set:24> j=1
+VCS_INFO_set:25> [[ -n '' ]]
+VCS_INFO_set:24> j=2
+VCS_INFO_set:25> [[ -n '' ]]
+VCS_INFO_set:28> return 0
+VCS_INFO_quilt:105> VCS_INFO_hook post-quilt standalone /home/marc/src/from-debian/gmrun-0.9.2/debian/patches /home/marc/src/from-debian/gmrun-0.9.2/.pc
+VCS_INFO_hook:5> local hook static func
+VCS_INFO_hook:6> local -x context hook_name
+VCS_INFO_hook:7> local -xi ret
+VCS_INFO_hook:8> local -a hooks tmp
+VCS_INFO_hook:9> local -i debug
+VCS_INFO_hook:11> ret=0
+VCS_INFO_hook:12> hook_name=post-quilt
+VCS_INFO_hook:13> shift
+VCS_INFO_hook:14> context=:vcs_info:-quilt-+post-quilt:default:-all-
+VCS_INFO_hook:15> static=:vcs_info-static_hooks:post-quilt
+VCS_INFO_hook:17> zstyle -t :vcs_info:-quilt-+post-quilt:default:-all- debug
+VCS_INFO_hook:17> debug=0
+VCS_INFO_hook:18> ((  debug  ))
+VCS_INFO_hook:24> zstyle -a :vcs_info-static_hooks:post-quilt hooks hooks
+VCS_INFO_hook:25> ((  debug  ))
+VCS_INFO_hook:28> zstyle -a :vcs_info:-quilt-+post-quilt:default:-all- hooks tmp
+VCS_INFO_hook:29> ((  debug  ))
+VCS_INFO_hook:32> hooks+=( )
+VCS_INFO_hook:33> ((  0 == 0  ))
+VCS_INFO_hook:33> return 0
+vcs_info:75> return 0
~/src/from-debian/gmrun-0.9.2/src (10/21)  

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 6/9] vcs_info quilt: fix unapplied detection on sub-directory
  2014-10-16  4:59         ` Marc Finet
@ 2014-10-16  8:17           ` Frank Terbeck
  2014-11-08 10:46             ` Marc Finet
  2014-11-11 10:07             ` Marc Finet
  0 siblings, 2 replies; 37+ messages in thread
From: Frank Terbeck @ 2014-10-16  8:17 UTC (permalink / raw)
  To: Marc Finet; +Cc: zsh-workers

Marc Finet wrote:
> On Thu, Oct 09, 2014 at 06:03:44PM +0200, Frank Terbeck wrote:
[...]
>> I am unsure about what's going on precisely. Could you do this:
>> 
>>     functions -t vcs_info
>> 
>> And retry your test cases? That will produce long traces of what's going
>> on, and might give ideas as to what's amiss.
> You'll find the trace attached. By the way, how do you deactivate
> tracing ? functions -T vcs_info removes a lot of traces (the VCS_INFO*) but
> keeps traces from vcs_info().

Thanks. I'll take a look as soon as I can.

To disable tracing you'd do this:

    functions +t vcs_info

-T is a slightly different form of tracing. It's disabled via +T.

>> I think $QUILT_PATCHES needs to be set to the correct directory
>> including "patches/". Without, it only works, because the directory is
>> searched recursively.
>> 
>> I don't know why the patches are reported as applied and unapplied off
>> hand. :-/
>> 
>> The applied patches are read from .pc/applied-patches, the list of
>> unapplied patches is retrieved by calling "quilt unapplied".
> This is where the problem occurs, applied uses relative path, while
> unapplied lists absolute path, because QUILT_PATCHES is set to an
> absolute path. e.g.
>     ~/src/from-debian/gmrun-0.9.2# QUILT_PATCHES=$(pwd)/debian/patches quilt applied
>     /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/10-escaping.patch
>     ...
>     /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/80-selectoption.pat
>     ~/src/from-debian/gmrun-0.9.2# quilt applied
>     debian/patches/10-escaping.patch
>     debian/patches/20-includes.patch
>     debian/patches/30-fix-gcc-4.3-build.patch
>     debian/patches/40-history_string.patch
>     debian/patches/50-empty-history.patch
>     debian/patches/60-fix_gtkcompletionline.patch
>
> So applied and unapplied lists are considered differents. The
> .pc/applied-patches file contains only relative paths.

I see. That could be fixed, I guess. Either by making the unapplied list
absolute, or by trimming off the "repository's" root-directory from the
absolute paths before comparing.

>> > So I do not understand the role of quilt-patch-dir as for me it takes
>> > the role of QUILT_PATCHES except the missing '/patches'. Moreover changing
>> > to sub-directory in cases 1, 3 and 5 makes applied patch detection failing
>> > because:
>> 
>> The ‘quilt-patch-dir’ style *sets* QUILT_PATCHES if set. The system
>> also sets QUILT_PATCHES to an absolute path-name, which should make it
>> work in subdirectories as well.
> I do not see where the QUILT_PATCHES variable is set (I mean exported to
> the shell for further quilt commands using this 'detected' value). Maybe
> your hook sets it according to the documentation: "Note: you can use
> vcs_info to keep the value of $QUILT_PATCHES correct all the time via the
> post-quilt hook"

Quilt is only called directly once in vcs_info's quilt code, if I'm not
mistaken. And that's here:

[...]
zstyle -s "${context}" quiltcommand quiltcommand || quiltcommand='quilt'
unapplied=( ${(f)"$(QUILT_PATCHES=$patches $quiltcommand --quiltrc /dev/null unapplied 2> /dev/null)"} )
[...]

I don't have any hooks for quilt behaviour set anymore. But given, that
the hook is called like this:

VCS_INFO_hook 'post-quilt' ${mode} ${patches} ${pc:-\\-nopc-}

You could likely set such a hook like this:

function +vi-quilt-patches() {
    if [[ -n $2 ]]; then
        typeset -gx "QUILT_PATCHES=$2"
    fi
}

zstyle ':vcs_info:*+post-quilt:*:*' hooks quilt-patches

To have $QUILT_PATCHES match vcs_info's idea of the patch directory.


Regards, Frank

-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 6/9] vcs_info quilt: fix unapplied detection on sub-directory
  2014-10-16  8:17           ` Frank Terbeck
@ 2014-11-08 10:46             ` Marc Finet
  2014-11-11 10:07             ` Marc Finet
  1 sibling, 0 replies; 37+ messages in thread
From: Marc Finet @ 2014-11-08 10:46 UTC (permalink / raw)
  To: Frank Terbeck; +Cc: zsh-workers

On Thu, Oct 16, 2014 at 10:17:56AM +0200, Frank Terbeck wrote:
> Marc Finet wrote:
> > This is where the problem occurs, applied uses relative path, while
> > unapplied lists absolute path, because QUILT_PATCHES is set to an
> > absolute path. e.g.
> >     ~/src/from-debian/gmrun-0.9.2# QUILT_PATCHES=$(pwd)/debian/patches quilt applied
> >     /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/10-escaping.patch
> >     ...
> >     /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/80-selectoption.pat
> >     ~/src/from-debian/gmrun-0.9.2# quilt applied
> >     debian/patches/10-escaping.patch
> >     debian/patches/20-includes.patch
> >     debian/patches/30-fix-gcc-4.3-build.patch
> >     debian/patches/40-history_string.patch
> >     debian/patches/50-empty-history.patch
> >     debian/patches/60-fix_gtkcompletionline.patch
> >
> > So applied and unapplied lists are considered differents. The
> > .pc/applied-patches file contains only relative paths.
> 
> I see. That could be fixed, I guess. Either by making the unapplied list
> absolute, or by trimming off the "repository's" root-directory from the
> absolute paths before comparing.
I still do not see the point of specifying an absolute path for
QUILT_PATCHES (or quilt-patch-dir) since relative path work with quilt
(it automatically looks for upper directories if needed). Worse,
specifying absolute path in QUILT_PATCHES makes quilt unable to create
the .pc in the root since there is no root to deduce; on relative path,
root is the path where the QUILT_PATCHES path is found.  Anyway, the
following patch fixes all the cases, i.e. specifying path (both absolute
or "relative") in QUILT_PATCHES or quilt-patch-dir.

> >> > So I do not understand the role of quilt-patch-dir as for me it takes
> >> > the role of QUILT_PATCHES except the missing '/patches'. Moreover changing
> >> > to sub-directory in cases 1, 3 and 5 makes applied patch detection failing
> >> > because:
> >> 
> >> The ‘quilt-patch-dir’ style *sets* QUILT_PATCHES if set. The system
> >> also sets QUILT_PATCHES to an absolute path-name, which should make it
> >> work in subdirectories as well.
> > I do not see where the QUILT_PATCHES variable is set (I mean exported to
> > the shell for further quilt commands using this 'detected' value). Maybe
> > your hook sets it according to the documentation: "Note: you can use
> > vcs_info to keep the value of $QUILT_PATCHES correct all the time via the
> > post-quilt hook"
> 
> Quilt is only called directly once in vcs_info's quilt code, if I'm not
> mistaken. And that's here:
> 
> [...]
> zstyle -s "${context}" quiltcommand quiltcommand || quiltcommand='quilt'
> unapplied=( ${(f)"$(QUILT_PATCHES=$patches $quiltcommand --quiltrc /dev/null unapplied 2> /dev/null)"} )
> [...]
> 
> I don't have any hooks for quilt behaviour set anymore. But given, that
> the hook is called like this:
> 
> VCS_INFO_hook 'post-quilt' ${mode} ${patches} ${pc:-\\-nopc-}
> 
> You could likely set such a hook like this:
> 
> function +vi-quilt-patches() {
>     if [[ -n $2 ]]; then
>         typeset -gx "QUILT_PATCHES=$2"
>     fi
> }
> 
> zstyle ':vcs_info:*+post-quilt:*:*' hooks quilt-patches
> 
> To have $QUILT_PATCHES match vcs_info's idea of the patch directory.
Ok, we agree on that then, I thought that some other part was doing this
automagically.

Thanks,

Marc


diff --git a/Functions/VCS_Info/VCS_INFO_quilt b/Functions/VCS_Info/VCS_INFO_quilt
index 258a08a..49abc87 100644
--- a/Functions/VCS_Info/VCS_INFO_quilt
+++ b/Functions/VCS_Info/VCS_INFO_quilt
@@ -84,7 +84,7 @@ function VCS_INFO_quilt() {
     emulate -L zsh
     setopt extendedglob
     local mode="$1"
-    local patches pc tmp qstring root
+    local patches pc qstring root abs_patches
     local -i ret
     local -x context
     local -a applied unapplied all applied_string unapplied_string quiltcommand
@@ -107,13 +107,21 @@ function VCS_INFO_quilt() {
 
     zstyle -s "${context}" quilt-patch-dir patches || patches="${QUILT_PATCHES}"
     if [[ "${patches}" != /* ]]; then
-        tmp=${patches:-patches}
-        patches="$(VCS_INFO_quilt-dirfind "${tmp}")"
+        patches=${patches:-patches}
+        abs_patches="$(VCS_INFO_quilt-dirfind "${patches}")"
         ret=$?
         (( ret )) && return ${ret}
-        patches=${patches}/${tmp}
     else
         [[ -d ${patches} ]] || return 1
+        abs_patches=${patches}
+        # find root
+        patches="$(VCS_INFO_realpath ${abs_patches})"
+        root="$(VCS_INFO_realpath .)"
+        while [[ "${patches}" != ${root}/* ]]; do
+            root="$(VCS_INFO_realpath ${root}/..)"
+            [[ "${root}" = "/" ]] && return 1
+        done
+        patches="${patches#$root/}"
     fi
 
     pc="$(VCS_INFO_quilt-dirfind .pc .version)"
@@ -185,6 +193,6 @@ function VCS_INFO_quilt() {
         ;;
     esac
 
-    VCS_INFO_hook 'post-quilt' ${mode} ${patches} ${pc:-\\-nopc-}
+    VCS_INFO_hook 'post-quilt' ${mode} ${abs_patches} ${pc:-\\-nopc-}
 }
 VCS_INFO_quilt "$@"


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 6/9] vcs_info quilt: fix unapplied detection on sub-directory
  2014-10-16  8:17           ` Frank Terbeck
  2014-11-08 10:46             ` Marc Finet
@ 2014-11-11 10:07             ` Marc Finet
  2015-01-02 11:03               ` Frank Terbeck
  1 sibling, 1 reply; 37+ messages in thread
From: Marc Finet @ 2014-11-11 10:07 UTC (permalink / raw)
  To: Frank Terbeck; +Cc: zsh-workers

Sorry for lack of reactivity ;|.

On Thu, Oct 16, 2014 at 10:17:56AM +0200, Frank Terbeck wrote:
> Marc Finet wrote:
> > This is where the problem occurs, applied uses relative path, while
> > unapplied lists absolute path, because QUILT_PATCHES is set to an
> > absolute path. e.g.
> >     ~/src/from-debian/gmrun-0.9.2# QUILT_PATCHES=$(pwd)/debian/patches quilt applied
> >     /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/10-escaping.patch
> >     ...
> >     /home/marc/src/from-debian/gmrun-0.9.2/debian/patches/80-selectoption.pat
> >     ~/src/from-debian/gmrun-0.9.2# quilt applied
> >     debian/patches/10-escaping.patch
> >     debian/patches/20-includes.patch
> >     debian/patches/30-fix-gcc-4.3-build.patch
> >     debian/patches/40-history_string.patch
> >     debian/patches/50-empty-history.patch
> >     debian/patches/60-fix_gtkcompletionline.patch
> >
> > So applied and unapplied lists are considered differents. The
> > .pc/applied-patches file contains only relative paths.
> 
> I see. That could be fixed, I guess. Either by making the unapplied list
> absolute, or by trimming off the "repository's" root-directory from the
> absolute paths before comparing.
I do not see the point of specifying an absolute path for
QUILT_PATCHES (or quilt-patch-dir) since relative path work with quilt
(it automatically looks for upper directories if needed). Worse,
specifying absolute path in QUILT_PATCHES makes quilt unable to create
the .pc in the root since there is no root to deduce; on relative path,
root is the path where the QUILT_PATCHES path is found.  Anyway, the
following patch fixes all the cases, i.e. specifying path (both absolute
or "relative") in QUILT_PATCHES or quilt-patch-dir.

> >> > So I do not understand the role of quilt-patch-dir as for me it takes
> >> > the role of QUILT_PATCHES except the missing '/patches'. Moreover changing
> >> > to sub-directory in cases 1, 3 and 5 makes applied patch detection failing
> >> > because:
> >> 
> >> The ‘quilt-patch-dir’ style *sets* QUILT_PATCHES if set. The system
> >> also sets QUILT_PATCHES to an absolute path-name, which should make it
> >> work in subdirectories as well.
> > I do not see where the QUILT_PATCHES variable is set (I mean exported to
> > the shell for further quilt commands using this 'detected' value). Maybe
> > your hook sets it according to the documentation: "Note: you can use
> > vcs_info to keep the value of $QUILT_PATCHES correct all the time via the
> > post-quilt hook"
> 
> Quilt is only called directly once in vcs_info's quilt code, if I'm not
> mistaken. And that's here:
> 
> [...]
> zstyle -s "${context}" quiltcommand quiltcommand || quiltcommand='quilt'
> unapplied=( ${(f)"$(QUILT_PATCHES=$patches $quiltcommand --quiltrc /dev/null unapplied 2> /dev/null)"} )
> [...]
> 
> I don't have any hooks for quilt behaviour set anymore. But given, that
> the hook is called like this:
> 
> VCS_INFO_hook 'post-quilt' ${mode} ${patches} ${pc:-\\-nopc-}
> 
> You could likely set such a hook like this:
> 
> function +vi-quilt-patches() {
>     if [[ -n $2 ]]; then
>         typeset -gx "QUILT_PATCHES=$2"
>     fi
> }
> 
> zstyle ':vcs_info:*+post-quilt:*:*' hooks quilt-patches
> 
> To have $QUILT_PATCHES match vcs_info's idea of the patch directory.
Ok, we agree on that then, I thought that some other part was doing this
automagically.

Thanks,

Marc


diff --git a/Functions/VCS_Info/VCS_INFO_quilt b/Functions/VCS_Info/VCS_INFO_quilt
index 258a08a..49abc87 100644
--- a/Functions/VCS_Info/VCS_INFO_quilt
+++ b/Functions/VCS_Info/VCS_INFO_quilt
@@ -84,7 +84,7 @@ function VCS_INFO_quilt() {
     emulate -L zsh
     setopt extendedglob
     local mode="$1"
-    local patches pc tmp qstring root
+    local patches pc qstring root abs_patches
     local -i ret
     local -x context
     local -a applied unapplied all applied_string unapplied_string quiltcommand
@@ -107,13 +107,21 @@ function VCS_INFO_quilt() {
 
     zstyle -s "${context}" quilt-patch-dir patches || patches="${QUILT_PATCHES}"
     if [[ "${patches}" != /* ]]; then
-        tmp=${patches:-patches}
-        patches="$(VCS_INFO_quilt-dirfind "${tmp}")"
+        patches=${patches:-patches}
+        abs_patches="$(VCS_INFO_quilt-dirfind "${patches}")"
         ret=$?
         (( ret )) && return ${ret}
-        patches=${patches}/${tmp}
     else
         [[ -d ${patches} ]] || return 1
+        abs_patches=${patches}
+        # find root
+        patches="$(VCS_INFO_realpath ${abs_patches})"
+        root="$(VCS_INFO_realpath .)"
+        while [[ "${patches}" != ${root}/* ]]; do
+            root="$(VCS_INFO_realpath ${root}/..)"
+            [[ "${root}" = "/" ]] && return 1
+        done
+        patches="${patches#$root/}"
     fi
 
     pc="$(VCS_INFO_quilt-dirfind .pc .version)"
@@ -185,6 +193,6 @@ function VCS_INFO_quilt() {
         ;;
     esac
 
-    VCS_INFO_hook 'post-quilt' ${mode} ${patches} ${pc:-\\-nopc-}
+    VCS_INFO_hook 'post-quilt' ${mode} ${abs_patches} ${pc:-\\-nopc-}
 }
 VCS_INFO_quilt "$@"


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 6/9] vcs_info quilt: fix unapplied detection on sub-directory
  2014-11-11 10:07             ` Marc Finet
@ 2015-01-02 11:03               ` Frank Terbeck
  0 siblings, 0 replies; 37+ messages in thread
From: Frank Terbeck @ 2015-01-02 11:03 UTC (permalink / raw)
  To: Marc Finet; +Cc: zsh-workers

Marc Finet wrote:
> Sorry for lack of reactivity ;|.

Sorry about that. I've been a fair bit busy the last months, getting my
masters thesis out the door and starting a new job. I'm slowly trying to
catch up with my backlog now.

> On Thu, Oct 16, 2014 at 10:17:56AM +0200, Frank Terbeck wrote:
>> Marc Finet wrote:
[...]
>> > So applied and unapplied lists are considered differents. The
>> > .pc/applied-patches file contains only relative paths.
>> 
>> I see. That could be fixed, I guess. Either by making the unapplied list
>> absolute, or by trimming off the "repository's" root-directory from the
>> absolute paths before comparing.
> I do not see the point of specifying an absolute path for
> QUILT_PATCHES (or quilt-patch-dir) since relative path work with quilt
> (it automatically looks for upper directories if needed). Worse,
> specifying absolute path in QUILT_PATCHES makes quilt unable to create
> the .pc in the root since there is no root to deduce; on relative path,
> root is the path where the QUILT_PATCHES path is found.  Anyway, the
> following patch fixes all the cases, i.e. specifying path (both absolute
> or "relative") in QUILT_PATCHES or quilt-patch-dir.

My idea about absolute directory names with $QUILT_PATCHES was to keep
the patch directories in a separate place that was unrelated to the
location of the source code.

I guess you're running with this patch enabled now, right? If this
current version works for you, I'd like to push it to the central
repository now.


Regards, Frank


^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2015-01-02 11:22 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-12 21:30 Misc patches for git completion and vcs_info Marc Finet
2014-09-12 21:30 ` [PATCH 1/9] vcs_info examples: fix typo Marc Finet
2014-09-14  9:33   ` Frank Terbeck
2014-09-12 21:30 ` [PATCH 2/9] completion git: support aliases when \n exist Marc Finet
2014-09-12 21:30 ` [PATCH 3/9] vcs_info git: detect revert or cherry-pick with multiple commits Marc Finet
2014-09-14  9:36   ` Frank Terbeck
2014-09-15  6:22     ` Phil Pennock
2014-09-12 21:30 ` [PATCH 4/9] vcs_info git: set rrn before using it Marc Finet
2014-09-14  9:33   ` Frank Terbeck
2014-09-16 20:07     ` Marc Finet
2014-09-16 20:41       ` Frank Terbeck
2014-09-16 20:57         ` Marc Finet
2014-09-16 21:23           ` Frank Terbeck
2014-09-12 21:30 ` [PATCH 5/9] vcs_info quilt: fix standalone detection Marc Finet
2014-09-14  9:42   ` Frank Terbeck
2014-09-16 20:19     ` Marc Finet
2014-09-12 21:30 ` [PATCH 6/9] vcs_info quilt: fix unapplied detection on sub-directory Marc Finet
2014-09-14  9:47   ` Frank Terbeck
2014-09-16 20:25     ` Marc Finet
2014-10-08 22:36     ` Marc Finet
2014-10-09 16:03       ` Frank Terbeck
2014-10-16  4:59         ` Marc Finet
2014-10-16  8:17           ` Frank Terbeck
2014-11-08 10:46             ` Marc Finet
2014-11-11 10:07             ` Marc Finet
2015-01-02 11:03               ` Frank Terbeck
2014-09-12 21:30 ` [PATCH 7/9] vcs_info git: fix applied-string name Marc Finet
2014-09-14  9:49   ` Frank Terbeck
2014-09-12 21:30 ` [PATCH 8/9] vcs_info git: consider patches for rebase Marc Finet
2014-09-14 10:08   ` Frank Terbeck
2014-09-14 10:13     ` Frank Terbeck
2014-09-16 20:07       ` Marc Finet
2014-09-12 21:30 ` [PATCH 9/9] completion git: fix send-email --confirm values Marc Finet
2014-09-14 10:11   ` Frank Terbeck
2014-09-12 23:50 ` Misc patches for git completion and vcs_info Bart Schaefer
2014-09-13  7:35   ` Marc Finet
2014-09-13 12:23 ` Frank Terbeck

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).