private void testMoveURL2URL(String srcPath, String targetFileName) throws Exception { createAndCommitParentFolders(srcPath); File file = createFile(srcPath); add(file); commit(file); File filemove = createFile(renameFile(srcPath, targetFileName)); filemove .delete(); // we're operating with repository directly, cannot leave unversioned files lying // on disk (they would be committed in the next round) ISVNClientAdapter c = getNbClient(); c.move(getFileUrl(file), getFileUrl(filemove), "move", SVNRevision.HEAD); ISVNInfo info = null; SVNClientException ex = null; try { getInfo(getFileUrl(file)); } catch (SVNClientException e) { ex = e; } assertNull(info); assertNotNull(ex); info = getInfo(getFileUrl(filemove)); assertNotNull(info); assertEquals(getFileUrl(filemove), TestUtilities.decode(info.getUrl())); assertNotifiedFiles(new File[] {}); }
private void testMoveFile2File(String srcPath, String targetFileName) throws Exception { createAndCommitParentFolders(srcPath); File file = createFile(srcPath); add(file); commit(file); File filemove = new File(getWC(), renameFile(srcPath, targetFileName)); ISVNClientAdapter c = getNbClient(); c.move(file, filemove, true); assertTrue(filemove.exists()); assertStatus(SVNStatusKind.ADDED, filemove); if (isSvnkit()) { // no notification about target, instead "Copying target_path" comes into logMessage() assertNotifiedFiles(new File[] {file}); } else { assertNotifiedFiles(new File[] {file, filemove}); } }