SVNURL sourceURL = null;
SVNURL sourceURL2 = null;
File target = null;
SVNMergeRangeList remainingRanges = null;
boolean updateWCMergeInfo = true;
SVNCopySource copySource = null;
try {
String sourceLine = reader.readLine();
if (sourceLine == null) {
return null;
}
sourceURL = SVNURL.parseURIEncoded(sourceLine);
sourceURL2 = SVNURL.parseURIEncoded(reader.readLine());
target = new File(reader.readLine());
String mergeRangesRepresentation = reader.readLine();
if (mergeRangesRepresentation != null && mergeRangesRepresentation.length() != 0) {
SVNMergeRange[] ranges = SVNMergeInfoUtil.parseRevisionList(new StringBuffer(mergeRangesRepresentation), target.getPath());
remainingRanges = new SVNMergeRangeList(ranges);
}
updateWCMergeInfo = Boolean.TRUE.toString().equals(reader.readLine());
String path = reader.readLine();
SVNRevision pegRevision = SVNRevision.parse(reader.readLine());
SVNRevision revision = SVNRevision.parse(reader.readLine());
reader.readLine();
if (path.length() == 0) {
copySource = null;
} else if (SVNPathUtil.isURL(path)) {
copySource = new SVNCopySource(pegRevision, revision, SVNURL.parseURIEncoded(path));
} else {
copySource = new SVNCopySource(pegRevision, revision, new File(path));
}
} catch (IOException e) {
SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.IO_ERROR, e), SVNLogType.DEFAULT);
}
return new SVNMergeTask(sourceURL, sourceURL2, target, remainingRanges, updateWCMergeInfo, copySource);