private void processAddedFile(String line, int pos) {
    String addedFilePath = this.currentDir + "/" + line.substring(0, pos);

    this.files.add(new ScmFile(addedFilePath, ScmFileStatus.ADDED));

    if (logger.isInfoEnabled()) {
      logger.info("Added: " + addedFilePath);
    }
  }
  public static int executeCleanUp(
      File workinDirectory, StreamConsumer stdout, StreamConsumer stderr, ScmLogger logger)
      throws CommandLineException {
    Commandline cl = new Commandline();

    cl.setExecutable("svn");

    cl.setWorkingDirectory(workinDirectory.getAbsolutePath());

    if (logger != null) {
      if (logger.isInfoEnabled()) {
        logger.info("Executing: " + SvnCommandLineUtils.cryptPassword(cl));

        if (Os.isFamily(Os.FAMILY_WINDOWS)) {
          logger.info("Working directory: " + cl.getWorkingDirectory().getAbsolutePath());
        }
      }
    }

    return CommandLineUtils.executeCommandLine(cl, stdout, stderr);
  }
  private static int checkIfCleanUpIsNeeded(
      int exitCode,
      Commandline cl,
      StreamConsumer consumer,
      CommandLineUtils.StringStreamConsumer stderr,
      ScmLogger logger)
      throws CommandLineException {
    if (exitCode != 0
        && stderr.getOutput() != null
        && stderr.getOutput().indexOf("'svn cleanup'") > 0
        && stderr.getOutput().indexOf("'svn help cleanup'") > 0) {
      if (logger.isInfoEnabled()) {
        logger.info(
            "Svn command failed due to some locks in working copy. We try to run a 'svn cleanup'.");
      }

      if (executeCleanUp(cl.getWorkingDirectory(), consumer, stderr, logger) == 0) {
        exitCode = CommandLineUtils.executeCommandLine(cl, consumer, stderr);
      }
    }
    return exitCode;
  }