Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Connecting to CVS Repository
Connecting to CVS Repository [message #250332] Mon, 07 June 2004 23:46 Go to next message
Eclipse UserFriend
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.
ILogEntry[] provides cvs log infos [message #250363 is a reply to message #250332] Tue, 08 June 2004 03:57 Go to previous messageGo to next message
Eclipse UserFriend
ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor((IFile)file);
ILogEntry[] entries = file.getLogEntries(monitor);

ILogEntry[] provides everything you need! It provides the cvs log infos.
What do you mean with "connect to a repository"? If you work on local
resources which are shared they already have cvs sync infos and you can
get everything you need with various operations of ICVSFile or other
remote handles.

Jens :-)


Jonathan wrote:

> 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 #250417 is a reply to message #250363] Tue, 08 June 2004 07:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jlaird.uci.edu

Thanks for the help Jens!

About the 1) connect to a CVS repository I guess I meant somehow
communicating with it to have it send you the logentries. If I need more
help I'll be sure to let you know. I'll try to play around with the
ILogEntry[] to see if I can get it to work.

-Jonathan

"Jens" <Jens.Bensing.ext@heidelberg.com> wrote in message
news:ca3ri2$8rv$1@eclipse.org...
> ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor((IFile)file);
> ILogEntry[] entries = file.getLogEntries(monitor);
>
> ILogEntry[] provides everything you need! It provides the cvs log infos.
> What do you mean with "connect to a repository"? If you work on local
> resources which are shared they already have cvs sync infos and you can
> get everything you need with various operations of ICVSFile or other
> remote handles.
>
> Jens :-)
>
>
> Jonathan wrote:
>
> > 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 #250881 is a reply to message #250363] Wed, 09 June 2004 07:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kapland.uci.edu

I think what he wants to do is work with resources that are not local. Like
connect to a cvs repository, and scan the files in that cvs repository
remotely and gather the information that way. Sorta like eclipse does all
this behind the scenes. Can that work?

"Jens" <Jens.Bensing.ext@heidelberg.com> wrote in message
news:ca3ri2$8rv$1@eclipse.org...
> ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor((IFile)file);
> ILogEntry[] entries = file.getLogEntries(monitor);
>
> ILogEntry[] provides everything you need! It provides the cvs log infos.
> What do you mean with "connect to a repository"? If you work on local
> resources which are shared they already have cvs sync infos and you can
> get everything you need with various operations of ICVSFile or other
> remote handles.
>
> Jens :-)
>
>
> Jonathan wrote:
>
> > 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 #251239 is a reply to message #250363] Wed, 09 June 2004 18:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jlaird.uci.edu

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
Re: ILogEntry[] provides cvs log infos [message #252605 is a reply to message #251239] Tue, 15 June 2004 03:34 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: ILogEntry[] provides cvs log infos [message #252774 is a reply to message #252605] Tue, 15 June 2004 12:31 Go to previous message
Eclipse UserFriend
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
>>
>
>
Previous Topic:how to run TagOperation() not in the background
Next Topic:CVS comment in UTF-8?
Goto Forum:
  


Current Time: Wed May 14 12:39:52 EDT 2025

Powered by FUDForum. Page generated in 0.05081 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top