zsh-workers
 help / color / mirror / code / Atom feed
From: "François Gannaz" <francois.gannaz@free.fr>
To: zsh-workers@zsh.org
Subject: vcs_info and locales
Date: Sat, 24 Apr 2010 23:40:17 +0200	[thread overview]
Message-ID: <20100424234017.776ae0ea@coriolan> (raw)

Hi

As I installed my zsh prompt on another computer, vcs_info stopped working for
svn repositories, it didn't print the branch nor the revision. It was just
because I had a french locale, and so vcs_info could not parse the output of
"svn info". The locale had no effect on hg/git, but I didn't fully test them.

So I suggest either to fix the documentation or (better) fix the code.

In the documentation, for the example in the quickstart:
- precmd () { vcs_info }
+ precmd () { LC_ALL=C vcs_info }

In the code:

--- VCS_Info/Backends/VCS_INFO_get_data_svn	2010-02-21 20:48:23.000000000 +0100
+++ VCS_INFO_get_data_svn	2010-04-24 23:28:03.000000000 +0200
@@ -10,10 +10,10 @@
 
 svnbase=".";
 svninfo=()
-${vcs_comm[cmd]} info --non-interactive | while IFS=: read a b; do svninfo[${a// /_}]="${b## #}"; done
+LC_ALL=C ${vcs_comm[cmd]} info --non-interactive | while IFS=: read a b; do svninfo[${a// /_}]="${b## #}"; done
 while [[ -d "${svnbase}/../.svn" ]]; do
     parentinfo=()
-    ${vcs_comm[cmd]} info --non-interactive "${svnbase}/.." | while IFS=: read a b; do parentinfo[${a// /_}]="${b## #}"; done
+    LC_ALL=C ${vcs_comm[cmd]} info --non-interactive "${svnbase}/.." | while IFS=: read a b; do parentinfo[${a// /_}]="${b## #}"; done
     [[ ${parentinfo[Repository_UUID]} != ${svninfo[Repository_UUID]} ]] && break
     svninfo=(${(kv)parentinfo})
     svnbase="${svnbase}/.."

BTW, changing the command with:
	zstyle ':vcs_info:svn:*:-all-' command "LC_ALL=C svn"
didn't work at all, and I don't understand why.

Regards
--
François


             reply	other threads:[~2010-04-24 21:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-24 21:40 François Gannaz [this message]
2010-04-25  8:38 ` Frank Terbeck
2010-04-25 10:36   ` François Gannaz
2010-04-25 13:19   ` Phil Pennock
2010-04-25 14:09     ` Frank Terbeck
2010-04-25 14:29       ` Frank Terbeck
2010-05-19 10:07       ` Richard Hartmann
2010-05-19 11:50         ` François Gannaz
2010-05-19 12:03           ` Richard Hartmann
2010-04-25 19:09     ` François Gannaz
2010-04-26  0:29       ` Phil Pennock
2010-04-26  6:36         ` Frank Terbeck
2010-04-26  8:56           ` François Gannaz
2010-04-26 19:07             ` Frank Terbeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100424234017.776ae0ea@coriolan \
    --to=francois.gannaz@free.fr \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).