From: Joey Hess Date: Wed, 19 Aug 2009 18:05:59 +0000 (-0400) Subject: po: Fixed to run rcs_add ralative to srcdir. X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/commitdiff_plain/9b799ccc851afc70b5b068e088f095e14005bda8 po: Fixed to run rcs_add ralative to srcdir. --- diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index aa3d72b90..414906999 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -414,7 +414,7 @@ sub change (@) { } if (@pofiles) { refreshpofiles($masterfile, @pofiles); - map { IkiWiki::rcs_add($_) } @pofiles if $config{rcs}; + map { s/^\Q$config{srcdir}\E\/*//; IkiWiki::rcs_add($_) } @pofiles if $config{rcs}; $updated_po_files=1; } } diff --git a/debian/changelog b/debian/changelog index ddf69f284..4bb450a55 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,7 @@ ikiwiki (3.141593) UNRELEASED; urgency=low pages from the basewiki. * Updated French program translation from Philippe Batailler. Closes: #542036 + * po: Fixed to run rcs_add ralative to srcdir. -- Joey Hess Wed, 12 Aug 2009 12:25:30 -0400 diff --git a/doc/bugs/po_plugin_cannot_add_po_files_into_git.mdwn b/doc/bugs/po_plugin_cannot_add_po_files_into_git.mdwn index f87457080..6fadff07e 100644 --- a/doc/bugs/po_plugin_cannot_add_po_files_into_git.mdwn +++ b/doc/bugs/po_plugin_cannot_add_po_files_into_git.mdwn @@ -5,3 +5,10 @@ I have set absolute path for srcdir = '/path/to/repo/doc/'. The root of my git r I have no problem when I use an relative path like srcdir = '.'. I have an other issue with the po plugin when I set the srcdir to './doc/' (provided that my config file is in /path/to/repo). In this case the po plugin try to add 'doc/doc/index.fr.po' which does not exists (seems like the srcdir path is prepended twice). + +> You should never use a relative srcdir path with ikiwiki. +> +> I wonder what version of git you have there, since it works ok with the +> version I have here. But, the po plugin is definitly doing the wrong +> thing; it's telling git to add the po file with the full scrdir path +> rather than relative to its root. Fixed that. [[done]] --[[Joey]]