We are using Mercurial/HG and we have the exact same problem.
Just switching settings in VCS helps temporary but this is no solution :-(
Our error seems to start when we switched to a new agent. The agent just can't resolve the xml-log. Perhaps there are som foreign chars in the xml-file? Like my swedish ÅÄÖ :-)
But still, the xml from hg log --style=xml is valid and works.
The Mercurial library is updated in the agents environment...