// export import version history and node
ByteArrayOutputStream out = new ByteArrayOutputStream();
session.exportSystemView("/parent/wc1", out, false, false, true);
ByteArrayOutputStream vhout = new ByteArrayOutputStream();
session.exportSystemView(wc1.getVersionHistory().getPath(), vhout, false, false, true);
// prepare data for version import
String versionHistory = wc1.getProperty("jcr:versionHistory").getValue().getString();
String baseVersion = wc1.getProperty("jcr:baseVersion").getValue().getString();