Created
May 30, 2013 00:25
-
-
Save samaxes/5674973 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.nio.charset.Charset; | |
import java.nio.file.DirectoryStream; | |
import java.nio.file.FileSystems; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.util.concurrent.ConcurrentHashMap; | |
import java.util.concurrent.ConcurrentMap; | |
public class FindSVNCommitters { | |
private static ConcurrentMap<String, Object> committers = new ConcurrentHashMap<>(); | |
public static void main(String[] args) { | |
try (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(FileSystems.getDefault().getPath( | |
"/path_to_repo/db/revprops"))) { | |
for (Path path : directoryStream) { | |
if (!path.toString().endsWith("\\0")) { | |
String committer = Files.readAllLines(path, Charset.forName("UTF-8")).get(3); | |
committers.putIfAbsent(committer, path.toString()); | |
} | |
} | |
} catch (IOException e) { | |
e.printStackTrace(); | |
} | |
listcommitters(); | |
} | |
private static void listcommitters() { | |
for (String committer : committers.keySet()) { | |
System.out.println(committer); | |
} | |
System.out.println("Total: " + committers.size()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When migrating a SourceForge Subversion repository to GitHub you need an
authors
file to be used by svn2git or git-svn.This file maps the authors in your Subversion repository to the corresponding ones in Git.
To get the complete list of users who committed code to the project’s Subversion repository do: