Skip to content

Instantly share code, notes, and snippets.

@samaxes
Created May 30, 2013 00:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samaxes/5674973 to your computer and use it in GitHub Desktop.
Save samaxes/5674973 to your computer and use it in GitHub Desktop.
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());
}
}
@samaxes
Copy link
Author

samaxes commented May 30, 2013

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:

  1. Copy the project’s Subversion repository to help speed up the migration process using SourceForge backup tool: rsync.
  2. Use this Gist to extract the list of users from the backup repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment