monitor.beginTask(null, resourceFiles.length); OperationManager.getInstance().beginOperation(svnClient, new OperationProgressNotifyListener(monitor));
pm.beginTask(null, resourceFiles.length); OperationManager.getInstance().beginOperation(svnClient, new OperationProgressNotifyListener(pm));
	public void run(IProgressMonitor monitor) throws SVNException {        final ISVNClientAdapter svnClient = root.getRepository().getSVNClient();                // Prepare the parents list        // we will Auto-commit parents if they are not already commited        List parentsList = new ArrayList();        for (int i=0; i<resources.length; i++) {            IResource currentResource = resources[i];            IContainer parent = currentResource.getParent();            ISVNLocalResource svnParentResource = SVNWorkspaceRoot.getSVNResourceFor(parent);            while (parent.getType() != IResource.ROOT &&                    parent.getType() != IResource.PROJECT &&                    !svnParentResource.hasRemote()) {            	if (!inCommitList(parent))            		parentsList.add(parent);                parent = parent.getParent();                svnParentResource = svnParentResource.getParent();            }        }                // convert parents and resources to an array of File        final File[] parents = new File[parentsList.size()];        for (int i = 0; i < parentsList.size();i++)            parents[i] = ((IResource)parentsList.get(i)).getLocation().toFile();                    final File[] resourceFiles = new File[resources.length];        for (int i = 0; i < resources.length;i++)            resourceFiles[i] = resources[i].getLocation().toFile();                 SVNProviderPlugin.run(new ISVNRunnable() {            public void run(final IProgressMonitor monitor) throws SVNException {                try {                    monitor.beginTask(null, resourceFiles.length);                    OperationManager.getInstance().beginOperation(svnClient, new OperationProgressNotifyListener(monitor));                                        // we commit the parents (not recursively)                    if (parents.length > 0)                        svnClient.commit(parents,message,false,false);                                        // then the resources the user has requested to commit                    svnClient.commit(resourceFiles,message,depth == IResource.DEPTH_INFINITE,keepLocks);                } catch (SVNClientException e) {                    throw SVNException.wrapException(e);                } finally {                    OperationManager.getInstance().endOperation();                    monitor.done();                }            }        }, Policy.monitorFor(monitor));	}