Пример #1
0
 public SVNStatusClient createStatusClient() {
   SVNStatusClient client = new SVNStatusClient(getPool(), myConfiguration.getOptions(myProject));
   client
       .getOperationsFactory()
       .setAuthenticationManager(myConfiguration.getAuthenticationManager(this));
   client.setIgnoreExternals(false);
   return client;
 }
 private static SVNStatus getExternalItemStatus(final SvnVcs vcs, final File file) {
   final SVNStatusClient statusClient = vcs.createStatusClient();
   try {
     if (file.isDirectory()) {
       return statusClient.doStatus(file, false);
     } else {
       final File parent = file.getParentFile();
       if (parent != null) {
         statusClient.setFilesProvider(
             new ISVNStatusFileProvider() {
               public Map getChildrenFiles(File parent) {
                 return Collections.singletonMap(file.getAbsolutePath(), file);
               }
             });
         final Ref<SVNStatus> refStatus = new Ref<SVNStatus>();
         statusClient.doStatus(
             parent,
             SVNRevision.WORKING,
             SVNDepth.FILES,
             false,
             true,
             false,
             false,
             new ISVNStatusHandler() {
               public void handleStatus(final SVNStatus status) throws SVNException {
                 if (file.equals(status.getFile())) {
                   refStatus.set(status);
                 }
               }
             },
             null);
         return refStatus.get();
       }
     }
   } catch (SVNException e) {
     //
   }
   return null;
 }