use of org.jetbrains.idea.svn.commandLine.SvnExceptionWrapper in project intellij-community by JetBrains.
the class SvnChangeProvider method getChanges.
public void getChanges(@NotNull VcsDirtyScope dirtyScope, @NotNull ChangelistBuilder builder, @NotNull ProgressIndicator progress, @NotNull ChangeListManagerGate addGate) throws VcsException {
final SvnScopeZipper zipper = new SvnScopeZipper(dirtyScope);
zipper.run();
final Map<String, SvnScopeZipper.MyDirNonRecursive> nonRecursiveMap = zipper.getNonRecursiveDirs();
final ISVNStatusFileProvider fileProvider = createFileProvider(nonRecursiveMap);
try {
final SvnChangeProviderContext context = new SvnChangeProviderContext(myVcs, builder, progress);
final NestedCopiesBuilder nestedCopiesBuilder = new NestedCopiesBuilder(myVcs, mySvnFileUrlMapping);
final EventDispatcher<StatusReceiver> statusReceiver = EventDispatcher.create(StatusReceiver.class);
statusReceiver.addListener(context);
statusReceiver.addListener(nestedCopiesBuilder);
final SvnRecursiveStatusWalker walker = new SvnRecursiveStatusWalker(myVcs, statusReceiver.getMulticaster(), progress);
for (FilePath path : zipper.getRecursiveDirs()) {
walker.go(path, Depth.INFINITY);
}
walker.setFileProvider(fileProvider);
for (SvnScopeZipper.MyDirNonRecursive item : nonRecursiveMap.values()) {
walker.go(item.getDir(), Depth.IMMEDIATES);
}
statusReceiver.getMulticaster().finish();
processCopiedAndDeleted(context, dirtyScope);
processUnsaved(dirtyScope, addGate, context);
final Set<NestedCopyInfo> nestedCopies = nestedCopiesBuilder.getCopies();
mySvnFileUrlMapping.acceptNestedData(nestedCopies);
putAdministrative17UnderVfsListener(nestedCopies);
} catch (SvnExceptionWrapper e) {
LOG.info(e);
throw new VcsException(e.getCause());
} catch (SVNException e) {
if (e.getCause() != null) {
throw new VcsException(e.getMessage() + " " + e.getCause().getMessage(), e);
}
throw new VcsException(e);
}
}
Aggregations