logger.info(msg + ": " + info);
File demoDir = new File(wcRoot, "demo"),
customDir = new File(wcRoot, "custom");
SVNUpdateClient updateClient = clientManager.getUpdateClient();
updateClient.doCheckout(reposURL, wcRoot, SVNRevision.UNDEFINED, SVNRevision.HEAD, SVNDepth.INFINITY,
false);
logger.info("Checked out working copy to " + wcRoot);
overwriteTree(newDemoTree, demoDir);
/*
for (File f: dirsCreated)
clientManager.getWCClient( ).doAdd( f, false , false , false , false );
for (File f: filesCreated)
clientManager.getWCClient( ).doAdd( f, false , false , false , false );
*/
msg = "Commit of newDMO (in demo tree)";
info = commitClient.doCommit(new File[] { wcRoot }, false, msg, null, null, false,
false, SVNDepth.INFINITY);
//final long revNewDMO = info.getNewRevision();
/*
diffClient.doDiffStatus(reposURL, SVNRevision.create(revOldDemo), reposURL, SVNRevision.create(revNewDMO),
true, true, new ISVNDiffStatusHandler() {
public void handleDiffStatus(SVNDiffStatus arg0) throws SVNException {
if (arg0.getURL().toString().endsWith(".pcode"))
{
logger.info("Diff in NewDMO-OldDMO: " + arg0.getURL());
logger.info("path = " + arg0.getPath());
SVNProperties properties = SVNProperties.wrap(new HashMap());
if (repos.checkPath("/" + arg0.getPath(), revOldDemo) == SVNNodeKind.FILE
&& repos.checkPath("/" + arg0.getPath(), revNewDMO) == SVNNodeKind.FILE)
{
deltaOldDMONewDMO.add(arg0.getURL());
repos.getFile( "/" + arg0.getPath(), revOldDemo, properties, null);
String oldCheckSum = properties.getStringValue(SVNProperty.CHECKSUM);
repos.getFile("/" +arg0.getPath(), revNewDMO, properties, null);
String newCheckSum = properties.getStringValue(SVNProperty.CHECKSUM);
logger.info("Checksums: " + oldCheckSum + " " + newCheckSum);
}
}
}
});
*/
logger.info(msg + ":" + info);
dirsCreated.clear(); filesCreated.clear();
overwriteTree(oldDevTree, customDir);
/*
msg = "Commit of old DEV";
info = commitClient.doCommit(new File[] { wcRoot }, false, msg, null, null, false,
false, SVNDepth.INFINITY);
logger.info(msg + ":" + info);
long revOldDEV = info.getNewRevision();
diffClient.doDiffStatus(reposURL, SVNRevision.create(revNewDMO), reposURL, SVNRevision.create(revOldDEV),
true, true, new ISVNDiffStatusHandler() {
public void handleDiffStatus(SVNDiffStatus arg0) throws SVNException {
if (arg0.getURL().toString().endsWith(".pcode"))
{
logger.fine("Diff in DEV-oldDMO: " + arg0.getURL());
deltaOldDMODev.add(arg0.getURL());
}
}
});
*/
updateClient = clientManager.getUpdateClient();
updateClient.doCheckout(reposURL, wcRoot, SVNRevision.UNDEFINED, SVNRevision.HEAD, SVNDepth.INFINITY,
false);
logger.info("Checked out working copy to " + wcRoot);
File targetOfMerge = (mergeToDMO? demoDir: customDir);
SVNURL sourceOfMerge = (mergeToDMO? customURL : demoURL);