From c1b9dd8355a2cfb77b9cb7d8efde95fa760d61ed Mon Sep 17 00:00:00 2001 From: irengrig Date: Tue, 12 Feb 2013 14:01:55 +0400 Subject: [PATCH] Subversion: format 1.6, force-VFS-refresh for .svn and .svn/entries can be done asynchronously, just the fact of refresh is important (to make entries changes be visible for VFS listener) - fix hunging tests --- .../idea/svn/SvnChangeProviderContext.java | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/SvnChangeProviderContext.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/SvnChangeProviderContext.java index 06cbd4af2aec..a9bfd234985e 100644 --- a/plugins/svn4idea/src/org/jetbrains/idea/svn/SvnChangeProviderContext.java +++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/SvnChangeProviderContext.java @@ -307,21 +307,17 @@ class SvnChangeProviderContext implements StatusReceiver { if (parentPath == null) { return; } - File svnSubdirectory = new File(parentPath.getIOFile(), SvnUtil.SVN_ADMIN_DIR_NAME); - LocalFileSystem localFileSystem = LocalFileSystem.getInstance(); - VirtualFile file = localFileSystem.refreshAndFindFileByIoFile(svnSubdirectory); - if (file != null) { - localFileSystem.refreshAndFindFileByIoFile(new File(svnSubdirectory, SvnUtil.ENTRIES_FILE_NAME)); - } + refreshDotSvnAndEntries(parentPath); if (filePath.isDirectory()) { - svnSubdirectory = new File(filePath.getPath(), SvnUtil.SVN_ADMIN_DIR_NAME); - file = localFileSystem.refreshAndFindFileByIoFile(svnSubdirectory); - if (file != null) { - localFileSystem.refreshAndFindFileByIoFile(new File(svnSubdirectory, SvnUtil.ENTRIES_FILE_NAME)); - } + refreshDotSvnAndEntries(filePath); } } + private static void refreshDotSvnAndEntries(FilePath filePath) { + final File svn = new File(filePath.getPath(), SvnUtil.SVN_ADMIN_DIR_NAME); + LocalFileSystem.getInstance().refreshIoFiles(Arrays.asList(svn, new File(svn, SvnUtil.ENTRIES_FILE_NAME)), true, false, null); + } + // seems here we can only have a tree conflict; which can be marked on either path (?) // .. ok try to merge states Change createMovedChange(final ContentRevision before, final ContentRevision after, final SVNStatus copiedStatus,