package com.perforce.cvs.parser; import java.io.File; import java.util.ArrayList; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class RcsFileFinder { private Logger logger = LoggerFactory.getLogger(RcsFileFinder.class); private int count = 0; List<File> files = new ArrayList<File>(); public RcsFileFinder(String path) { findFiles(path); } private void findFiles(String path) { File base = new File(path); if (!base.exists()) { logger.warn("CVSROOT does not exist: " + path); return; } File[] list = base.listFiles(); for (File f : list) { if (f.isDirectory()) { if (!"CVSROOT".equals(f.getName())) { findFiles(f.getAbsolutePath()); } } else { if (f.getName().endsWith(",v")) { files.add(f); logger.debug("file: " + f.getAbsolutePath()); count++; System.out.print("Found: " + count + "\r"); } } } } public List<File> getFiles() { return files; } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#8 | 13920 | Paul Allen | copy part 2 (no errors) | ||
#7 | 12418 | Paul Allen | CVS: When scanning for RCS files, store listing and close handle before recursion. | ||
#6 | 12386 | Paul Allen |
CVS: Prevent CVSROOT dir from being added. - includes test case064 |
||
#5 | 12339 | Paul Allen |
Performance improvements for the early stages of the CVS list building: - Building branch list - Building revision list |
||
#4 | 12334 | Paul Allen | Bug Fix: Close newDirectoryStream resource. | ||
#3 | 12260 | Paul Allen |
CVS: Rename badly encoded paths. First try CP1252, if that fails use a URI encoded path. If a URI encoded path is used then it will be decode to UTF8. |
||
#2 | 11186 | Paul Allen |
Support standard command line arguments. Important change please note... @rjackson @nmorse The change was needed to extend the current features like --info and --user for CVS and future SCM support. Please check the documentation and CLI usage for the new usage. - CVS support for --users - Unit tests for CLI arguments Example: standard usage. java -jar p4convert.jar --config=myFile.cfg Example: generate a CVS configuration file. java -jar p4convert.jar --type=CVS --default Example: report Subversion repository usage. java -jar p4convert.jar --type=SVN --repo=/path/to/repo.dump --info |
||
#1 | 9807 | Paul Allen | Initial import of p4-convert (from change 894340) |