Connecting to CVS Repository [message #250332] |
Mon, 07 June 2004 23:46  |
Eclipse User |
|
|
|
Originally posted by: jlaird.uci.edu
The goal is to build 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
( http://www.bonevich.com/boneclipse-master/boneclipse-cvsgrap her/), 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.CVSWorkspaceRo ot;
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 it gets converted it into an Arrary 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.
|
|
|
|
|
|
|
|
Re: ILogEntry[] provides cvs log infos [message #252774 is a reply to message #252605] |
Tue, 15 June 2004 12:31  |
Eclipse User |
|
|
|
You could fetch all the log info for a project using the Log or RLog
commands directly. Have a look at the RemoteLogOperation in the CVS UI
plugin (org.eclipse.team.cvs.ui). This operation uses the RLog command
to fetch, in a single command, the comments that are displayed in the
synchronize view when using the Commit Sets layout.
Michael
Jens wrote:
> No, you need to traverse every single file.
>
> Jonathan wrote:
>
>
>>Looking at the CVSGrapher code, it seems that the ILogEntry[] gives the
>>history/cvs log infos for a single file?
>>
>
>>However, how would I go about trying to get the history/cvs log infos for an
>>entire project (every file inside the project)? Would this require getting
>>the directory structure of the folder and somehow making a loop and till I
>>get all the individual log files saved? Or does ILogEntryp[]/ICVSFile and
>>CVSWorkspaceRoot allow for something like
>>getCVSProjectFor((IProject)project);?
>>
>
>>Thanks for the pointers.
>>
>
>> - Jonathan
>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.05081 seconds