public int compare(final ProjectInfo p1, final ProjectInfo p2) {
return p1.id.compareTo(p2.id);
}
});
final GitCloneDialog dialog = new GitCloneDialog(project);
// Add predefined repositories to history
for (int i = availableProjects.size() - 1; i >= 0; i--) {
dialog.prependToHistory(gerritSettings.getHost() + '/' + Url.decode(availableProjects.get(i).id));
}
dialog.show();
if (!dialog.isOK()) {
return;
}
dialog.rememberSettings();
final VirtualFile destinationParent = localFileSystem.findFileByIoFile(new File(dialog.getParentDirectory()));
if (destinationParent == null) {
return;
}
final String sourceRepositoryURL = dialog.getSourceRepositoryURL();
final String directoryName = dialog.getDirectoryName();
final String parentDirectory = dialog.getParentDirectory();
Git git = ServiceManager.getService(Git.class);
Listener listenerWrapper = addCommitMsgHookListener(listener, directoryName, parentDirectory, project);