about summary refs log tree commit diff
path: root/Functions
diff options
context:
space:
mode:
authorFrank Terbeck <bewater@users.sourceforge.net>2012-09-28 22:07:29 +0000
committerFrank Terbeck <bewater@users.sourceforge.net>2012-09-28 22:07:29 +0000
commitfeb6169bcd8920ccda0ee20b8089d9f3ca8010ba (patch)
tree83936ff1a68eb8a0064ad711ec15a94cb6426da4 /Functions
parent1ca9f9d5d0e2a84809e99de62e5f4b7a1f809ab2 (diff)
downloadzsh-feb6169bcd8920ccda0ee20b8089d9f3ca8010ba.tar.gz
zsh-feb6169bcd8920ccda0ee20b8089d9f3ca8010ba.tar.xz
zsh-feb6169bcd8920ccda0ee20b8089d9f3ca8010ba.zip
Seth House: 30702: contrib.yo, VCS_INFO_get_data_hg: Removed --debug flag from the hg vcs_info backend
Diffstat (limited to 'Functions')
-rw-r--r--Functions/VCS_Info/Backends/VCS_INFO_get_data_hg9
1 files changed, 6 insertions, 3 deletions
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg b/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
index 48e385c97..cedaf5676 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
@@ -37,12 +37,15 @@ VCS_INFO_adjust
 # Calling the 'hg' program is quite a bit too slow for prompts.
 # Disabled by default anyway, so no harm done.
 if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" get-revision ; then
-    # Calling hexdump is (much) faster than hg but doesn't get the local rev
     if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" use-simple \
             && ( VCS_INFO_check_com hexdump ) && [[ -r ${dirstatefile} ]] ; then
+        # Calling hexdump is (much) faster than hg but doesn't get the local rev
         r_csetid=$(hexdump -n 20 -e '1/1 "%02x"' ${dirstatefile})
     else
-        hgid_args=( --debug id -i -n -b )
+        # Settling for a short (but unique!) hash because getting the full
+        # 40-char hash in addition to all the other info we want isn't
+        # available in a single hg invocation
+        hgid_args=( id -i -n -b )
 
         # Looking for changes is a tad bit slower since the dirstate cache must
         # first be refreshed before being read
@@ -119,7 +122,7 @@ if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" get-bookmarks \
         && [[ -r "${bmfile}" ]] && [[ -n "$r_csetid" ]] ; then
     while read -r i_bmhash i_bmname ; do
         # Compare hash in bookmarks file with changeset id
-        [[ $r_csetid == $i_bmhash ]] && hgbmarks+=( $i_bmname )
+        [[ $i_bmhash == $r_csetid* ]] && hgbmarks+=( $i_bmname )
     done < ${bmfile}
 
     if VCS_INFO_hook 'gen-hg-bookmark-string' "${hgbmarks[@]}"; then