zsh-workers
 help / color / mirror / code / Atom feed
* vcs_info and locales
@ 2010-04-24 21:40 François Gannaz
  2010-04-25  8:38 ` Frank Terbeck
  0 siblings, 1 reply; 14+ messages in thread
From: François Gannaz @ 2010-04-24 21:40 UTC (permalink / raw)
  To: zsh-workers

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


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

end of thread, other threads:[~2010-05-19 12:03 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-24 21:40 vcs_info and locales François Gannaz
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

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).