I am building an Eclipse Plug-in that connects to the CVS Repository and associates file authorship to a normal call graph.
I found another plug-in, CVSGrapher (
CVSGrapher Homepage), that does something similar in connecting to a CVS repository and connecting authorship to revisions.
After running the CVSGrapher plug-in and looking at the source code, it seemed like the following was how it did it but I could not be sure:
(in a much shortened form) This is from the CvsGraphEditor.java file.
import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
IResource resource = (IResource) getEditorInput().getAdapter(IResource.class);
if (resource instanceof IFile)
{
IFile file = (IFile) resource;
if (teamProvider != null)
{
try
{ _remoteFile = (ICVSRemoteFile)CVSWorkspaceRoot.getRemoteResourceFor(file);
...// close try, etc.
private ILogEntry[] _entries = _remoteFile.getLogEntries(monitor);
And from there _entries gets converted it into an Array of log entries from which it is possible to call (entries.)getAuthor(); on each of them or whatever data you wanted to pull (I think?) ...
If there is a more simple, straight-forward way to
1) connect to a CVS repository
and
2) get the file authorship information for all/each of the files
I would really appreciate knowing. Thank you very much.
[ June 07, 2004: Message edited by: Jonathan Night ]
[ June 07, 2004: Message edited by: Jonathan Night ]