<commit_before>package org.jetbrains.idea.svn.checkin;

import com.intellij.openapi.vcs.VcsException;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.idea.svn.api.BaseSvnClient;
import org.jetbrains.idea.svn.commandLine.CommandUtil;
import org.jetbrains.idea.svn.commandLine.CommitEventHandler;
import org.jetbrains.idea.svn.commandLine.SvnCommandName;
import org.jetbrains.idea.svn.commandLine.SvnCommitRunner;
import org.tmatesoft.svn.core.SVNDepth;
import org.tmatesoft.svn.core.SVNURL;
import org.tmatesoft.svn.core.wc.ISVNCommitHandler;
import org.tmatesoft.svn.core.wc2.SvnTarget;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

/**
 * @author <NAME>.
 */
public class CmdImportClient extends BaseSvnClient implements ImportClient {

  @Override
  public long doImport(@NotNull File path,
                       @NotNull SVNURL url,
                       @Nullable SVNDepth depth,
                       @NotNull String message,
                       boolean noIgnore,
                       @Nullable CommitEventHandler handler,
                       @Nullable ISVNCommitHandler commitHandler) throws VcsException {
    // TODO: ISVNFileFilter from ISVNCommitHandler is not currently implemented

    List<String> parameters = new ArrayList<String>();

    CommandUtil.put(parameters, path);
    CommandUtil.put(parameters, SvnTarget.fromURL(url));
    CommandUtil.put(parameters, depth);
    CommandUtil.put(parameters, noIgnore, "--no-ignore");
    parameters.add("--message");
    parameters.add(message);

    SvnCommitRunner.CommandListener listener = new SvnCommitRunner.CommandListener(handler);
    listener.setBaseDirectory(path);

    CommandUtil.execute(myVcs, SvnTarget.fromURL(url), SvnCommandName.importFolder, parameters, listener);

    return listener.getCommittedRevision();
  }
}<commit_msg>svn: Fixed "Import" when path/url contains '@' symbol<commit_after>package org.jetbrains.idea.svn.checkin;

import com.intellij.openapi.vcs.VcsException;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.idea.svn.api.BaseSvnClient;
import org.jetbrains.idea.svn.commandLine.CommandUtil;
import org.jetbrains.idea.svn.commandLine.CommitEventHandler;
import org.jetbrains.idea.svn.commandLine.SvnCommandName;
import org.jetbrains.idea.svn.commandLine.SvnCommitRunner;
import org.tmatesoft.svn.core.SVNDepth;
import org.tmatesoft.svn.core.SVNURL;
import org.tmatesoft.svn.core.wc.ISVNCommitHandler;
import org.tmatesoft.svn.core.wc2.SvnTarget;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

/**
 * @author <NAME>.
 */
public class CmdImportClient extends BaseSvnClient implements ImportClient {

  @Override
  public long doImport(@NotNull File path,
                       @NotNull SVNURL url,
                       @Nullable SVNDepth depth,
                       @NotNull String message,
                       boolean noIgnore,
                       @Nullable CommitEventHandler handler,
                       @Nullable ISVNCommitHandler commitHandler) throws VcsException {
    // TODO: ISVNFileFilter from ISVNCommitHandler is not currently implemented

    List<String> parameters = new ArrayList<String>();

    CommandUtil.put(parameters, path, false);
    CommandUtil.put(parameters, SvnTarget.fromURL(url), false);
    CommandUtil.put(parameters, depth);
    CommandUtil.put(parameters, noIgnore, "--no-ignore");
    parameters.add("--message");
    parameters.add(message);

    SvnCommitRunner.CommandListener listener = new SvnCommitRunner.CommandListener(handler);
    listener.setBaseDirectory(path);

    CommandUtil.execute(myVcs, SvnTarget.fromURL(url), SvnCommandName.importFolder, parameters, listener);

    return listener.getCommittedRevision();
  }
}
{'fraction_non_alphanumeric': 0.10020714655618851, 'fraction_numerical': 0.0005178663904712584, 'mean_word_length': 3.7632552404438964, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7591625', 'n_tokens_mistral': 1152, 'n_tokens_neox': 1125, 'n_words': 210}