docs: static void cleanUpWorkingDir(final Logger logger,
                                    final File userDir,
                                    final SVNURL svnUrl,
                                    final SVNClientManager userClientManager) throws SVNException, IOException {
          Preconditions.checkNotNull(userDir, "user dir should not be null");
          if(userDir.exists()) {
              Preconditions.checkArgument(userDir.isDirectory(), "user dir (%s) should be a directory if it exists", userDir.getAbsolutePath());
              Files.touch(userDir);
          } else {
              if(!userDir.mkdir()) {
                  throw new IOException("Could not create directory " + userDir);
              }
          }
  
          final SVNUpdateClient updateClient = userClientManager.getUpdateClient();
          if (SVNWCUtil.isVersionedDirectory(userDir)) {
              final SVNStatusClient statusClient = userClientManager.getStatusClient();
              final SVNStatus status = statusClient.doStatus(userDir, false);
              final SVNStatusType contentStatus = status.getContentsStatus();
              logger.info("(svn) status for " + userDir + " is " + contentStatus);
              if (contentStatus == SVNStatusType.STATUS_NORMAL) {
                  long elapsed = -System.currentTimeMillis();
                  if (logger.isDebugEnabled()) {
                      logger.debug("(svn) current r" + status.getRevision().getNumber() +  " svn update " + svnUrl + " into " + userDir);
                  }
                  long workingDirRevision = updateClient.doUpdate(userDir, SVNRevision.HEAD, SVNDepth.INFINITY, false, false);
                  elapsed += System.currentTimeMillis();
                  logger.info(String.format("Updated working directory (%s) to revision %d in %d ms", userDir.getAbsolutePath(), workingDirRevision, elapsed));
              } else {
                  logger.warn(String.format("Working directory (%s) is in a bad state: %s Cleaning up and checking out fresh.", userDir.getAbsolutePath(), contentStatus));
                  if (logger.isDebugEnabled()) {
                      logger.debug(String.format("Deleting working directory contents (%s)", userDir.getAbsolutePath()));
                  }
                  deleteDirectoryContents(userDir);
                  long elapsed = -System.currentTimeMillis();
                  if (logger.isDebugEnabled()) {
                      logger.debug("(svn) svn co " + svnUrl + " into " + userDir);
                  }
                  long workingDirRevision = updateClient.doCheckout(svnUrl, userDir, null, SVNRevision.HEAD, SVNDepth.INFINITY, false);
                  elapsed += System.currentTimeMillis();
                  logger.info(String.format("Checked out working directory (%s) to revision %d in %d ms", userDir.getAbsolutePath(), workingDirRevision, elapsed));
              }
          } else {
              long elapsed = -System.currentTimeMillis();
              if (logger.isDebugEnabled()) {
                  logger.debug("(svn) svn co " + svnUrl + " into " + userDir);
              }
              long workingDirRevision = updateClient.doCheckout(svnUrl, userDir, null, SVNRevision.HEAD, SVNDepth.INFINITY, false);
              elapsed += System.currentTimeMillis();
              logger.info(String.format("Checked out working directory (%s) to revision %d in %d ms", userDir.getAbsolutePath(), workingDirRevision, elapsed));
          }
      }