Export to GitHub

jigomerge - issue #30

jigomerge sometimes fails with XML Document error


Posted on Mar 3, 2014 by Swift Panda

What steps will reproduce the problem? 1. Using SVN 1.7.4 client, checkout to a clean workspace for a main branch. 2. cd to the workspace 2. Run groovy jigomerge-2.2.6.groovy -S <SVN URL to the sub-branch created from main> -a 'Merged revisions,Block revision'

What is the expected output? What do you see instead? Merge should be successful.

I see this instead: 11:01:23 [Fatal Error] :16:1: XML document structures must start and end within the same entity. 11:01:23 Caught: org.xml.sax.SAXParseException: XML document structures must start and end within the same entity. 11:01:23 org.xml.sax.SAXParseException: XML document structures must start and end within the same entity. 11:01:23 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1231) 11:01:23 at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) 11:01:23 at SvnMergeTool.retrieveCommentFromRevisionWithLog(jigomerge-2.2.6.groovy:481) 11:01:23 at SvnMergeTool.mergeSelectiveRevisions(jigomerge-2.2.6.groovy:268) 11:01:23 at SvnMergeTool$mergeSelectiveRevisions.call(Unknown Source) 11:01:23 at SvnMergeTool.main(jigomerge-2.2.6.groovy:698)

What version of the product are you using? On what operating system? Linux 46 bit RHEL 5.6, SVN client version 1.7.4 (svn, version 1.7.4 (r1295709) compiled May 15 2012, 17:43:06), jigomerge 2.2.6

Comment #1

Posted on Jun 24, 2014 by Swift Rhino

I had the same issue with jigomerge-2.2.6.groovy file and I end up updating the executeCommand method as below.... Hope this helps you to fix your issue.

protected def executeCommand(String commandLabel, boolean discardOutput) { def processOutput = [:] if (verbose) { def commandLabelToPrint = commandLabel // dirty hack to delete password from verbose if(commandLabel.contains('--password')){ def passwordMatcher = commandLabelToPrint =~ "(.* )(--password \S* )(.*)" commandLabelToPrint = passwordMatcher[0][1] + passwordMatcher[0][3] } printOut.println '[DEBUG] executing command \'' + commandLabelToPrint + '\'' } def process = commandLabel.execute()

def outBuffer = new ByteArrayOutputStream()
def errBuffer = new ByteArrayOutputStream()

if(discardOutput){
  if (verbose){

// process.consumeProcessOutput(printOut, printOut) process.waitForProcessOutput(printOut, printOut) } else { // discard output, see http://groovy.codehaus.org/groovy-jdk/java/lang/Process.html#consumeProcessOutput() // process.consumeProcessOutput(); process.waitForProcessOutput(); } }else{ // process.consumeProcessOutput(outBuffer, errBuffer) process.waitForProcessOutput(outBuffer, errBuffer) }

// process.waitFor()

if (verbose) {
  if(!discardOutput){
     printOut.println outBuffer.toString()
     printOut.println errBuffer.toString()
  }
  printOut.println '[DEBUG] exit value : ' + process.exitValue()
}
processOutput.exitValue = process.exitValue()
processOutput.inText = outBuffer.toString()
processOutput.inErrText = errBuffer.toString()

return processOutput

}

Status: New

Labels:
Type-Defect Priority-Medium