Package hudson.scm

Class LegacyConvertor

java.lang.Object
hudson.scm.LegacyConvertor

public class LegacyConvertor extends Object
Used to convert legacy configuration into the new repository structure. These methods should only need to be used by the main CVSSCM class, but have been separated out from there to reduce the volume of legacy code in there
Author:
Michael Clarke
  • Method Details

    • convertLegacyConfigToRepositoryStructure

      public List<CvsRepository> convertLegacyConfigToRepositoryStructure(String cvsRoot, String allModules, String branch, boolean isBranchActuallyTag, String excludedRegions, boolean useHeadIfNotFound, CVSRepositoryBrowser browser)
    • getPassword

      public String getPassword(String cvsRoot)
      Tries to retrieve the current password from the CVS pass file (if it's been set)
      Parameters:
      cvsRoot - the CVS Root to look for a password for
      Returns:
      the decrypted password if found or null on no match or problems reading file
    • findPassword

      public String findPassword(String cvsRoot, File passFile) throws IOException
      Treats the given file as a .cvspass file and retrieves the encoded password for the requested CVS root the file.
      Parameters:
      cvsRoot - the CVS root to search file file for
      passFile - the file to treat as a CVS pass file
      Returns:
      the encoded password is found, null otherwise
      Throws:
      IOException - on failure reading file
    • convertModulesToList

      public String[] convertModulesToList(String modules)
    • convertExcludedRegionsToList

      public List<ExcludedRegion> convertExcludedRegionsToList(String excludedRegions)
    • getInstance

      public static LegacyConvertor getInstance()