0
使用p4java在各種機器上同步文件,所以我使用IClient.setRoot()來相應地更改根目錄。但IClient.setRoot()實際上並不改變客戶端對象的根目錄。我在setRoot()調用後立即查看調試器p4java客戶端setRoot不工作
這是連接到服務器後的代碼。
客戶端是IClient,p4Server是IServer。
的道具功能都簡單地拉動了工作區和根目錄
缺少什麼我做setRoot()工作性質的條目。謝謝!
client = p4Server.getClient(prop.getString("perforce.workspace"));
if (client == null) {
logger.error("Failed to fetch workspace: {}", prop.getString("perforce.workspace"));
} else {
File p4Dir = new File(prop.getPath("perforce.scripts.dest"));
if (!p4Dir.exists()) {
p4Dir.mkdirs();
}
client.setRoot(p4Dir.getPath());
logger.debug("Setting p4sync dest root to: {}",p4Dir.getPath());
p4Server.setCurrentClient(client);