I am trying to automate my deployment using phing. I get the below error when I use svnlastrevision task
Execution of target "builddiff" failed for the following reason: /home/ramjee/Work/Projects/it/dev-stack/build.xml:88:1: Failed to parse the output of 'svn info --xml'.
On debugging the issue further I zeroed it on to the following:
The following is a small program to recreate the issue:
$cmd = "/usr/bin/svn info --non-interactive '/home/ramjee/Work/Projects/trunk/src' '--xml'";
exec("$cmd 2>&1",$out,$ret_var);
print_r($out);
When I execute the above
i. With PHP (5.2.17) that is shipped with bitnami lampstack.1.2-5. I get the following result (not expected):
Array
(
[0] => /usr/bin/svn: /home/ramjee/Work/lampstack-1.2-5/common/lib/libsasl2.so.2: no version information available (required by /usr/lib/libldap_r-2.4.so.2)
[1] => /usr/bin/svn: /home/ramjee/Work/lampstack-1.2-5/common/lib/libsasl2.so.2: no version information available (required by /usr/lib/libsvn_ra_svn-1.so.1)
[2] => <?xml version="1.0"?>
[3] => <info>
[4] => <entry
[5] => kind="dir"
[6] => path="/home/ramjee/Work/Projects/trunk/src"
[7] => revision="818">
[8] => <url>svn://abc.abc.abc.abc/data/repositories/src</url>
[9] => <repository>
[10] => <root>svn://abc.abc.abc.abc/data/repositories/</root>
[11] => <uuid>f74a063e-5e8e-11e0-b400-13ff509e0209</uuid>
[12] => </repository>
[13] => <wc-info>
[14] => <schedule>normal</schedule>
[15] => <depth>infinity</depth>
[16] => </wc-info>
[17] => <commit
[18] => revision="802">
[19] => <author>shweta</author>
[20] => <date>2012-01-03T12:07:46.427638Z</date>
[21] => </commit>
[22] => </entry>
[23] => </info>
)
ii. With PHP (5.3.17) which was part of a lampp setup. I get the following result (expected):
Array
(
[0] => <?xml version="1.0"?>
[1] => <info>
[2] => <entry
[3] => kind="dir"
[4] => path="/home/ramjee/Work/Projects/trunk/src"
[5] => revision="818">
[6] => <url>svn://abc.abc.abc.abc/data/repositories/src</url>
[7] => <repository>
[8] => <root>svn://abc.abc.abc.abc/data/repositories/</root>
[9] => <uuid>f74a063e-5e8e-11e0-b400-13ff509e0209</uuid>
[10] => </repository>
[11] => <wc-info>
[12] => <schedule>normal</schedule>
[13] => <depth>infinity</depth>
[14] => </wc-info>
[15] => <commit
[16] => revision="802">
[17] => <author>shweta</author>
[18] => <date>2012-01-03T12:07:46.427638Z</date>
[19] => </commit>
[20] => </entry>
[21] => </info>
)
In the first line we have two unwanted lines which cause the phing task to throw error.
I don't know how to fix this? Any help on this will be very valuable.