Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [subversive-dev] History of a file

Hello Fabian, 

In general I would say no, but in some cases it is possible: you can map
from SVNRepositoryFile to IFile only in case if corresponding file exists in
one of projects in workspace. In that case you should found first to which
project relates concrete SVNRepositoryFile then get the IFile instance which
corresponds to required repository resource (if exists) and use
IFileHistoryProvider.

So, regarding to complexity of mapping from repository resource to local, I
think it will be best to use GetLogMessagesOperation in your case.

Best regards,
Alexander Gurov
Subversive Team

-----Original Message-----
From: Fabian Schmidt [mailto:fabian.schmidt.85@xxxxxxxxxxxxxx] 
Sent: Saturday, March 15, 2008 7:00 AM
To: Alexander Gurov
Subject: RE: [subversive-dev] History of a file

Hi Alexander,

that helps me a lot. The only Problem remaining is, that i have a
SVNRepositoryFile and the Eclipse API wants to work with IFile. Is there a
possibility to convert a SVNRepositoryFile to an IFile?

Kind Regards
Fabian
On Fri, 2008-03-14 at 11:04 +0200, Alexander Gurov wrote:
> Yes, the reason is that you use an old Subversive version. Newest 
> version is available for download at http://www.eclipse.org/subversive
> 
> But in any case LogMessage returned by old version and SVNLogEntry 
> returned by new version are the same entities. The only one reason of 
> the difference in class names is refactoring of SVN-related API 
> correspondingly to Eclipse.org coding guidlines and legal restrictions.
> 
> Also please note that Eclipse Team Services contains API that allows 
> to fetch resource history in generic way. Such API consists of interfaces:
> IFileHistoryProvider
> IFileHistory
> IFileRevision
> and Subversive implements these interfaces. So, if information 
> provided by these interfaces is sufficient for your targets please use 
> such interfaces in order to remove unnecessary API dependencies. You 
> can access IFileHistoryProvider by calling 
> RepositoryProvider.getFileHistoryProvider()
> method.
> 
> Best regards,
> Alexander Gurov
> Subversive Team
> 
> 
> -----Original Message-----
> From: subversive-dev-bounces@xxxxxxxxxxx
> [mailto:subversive-dev-bounces@xxxxxxxxxxx] On Behalf Of Fabian 
> Schmidt
> Sent: Friday, March 14, 2008 3:31 AM
> To: Developers mailing list
> Subject: RE: [subversive-dev] History of a file
> 
> Hi Alexander,
> 
> I just tried the code you sent me. But the function log.getMessages() 
> returns LogMessage[] not SVNLogEntry[]. I'm using Version Subversive
> 1.1.9 as Part of FastTrack 1.1.5.
> 
> Kind Regards
> Fabian
> On Thu, 2008-03-13 at 10:48 +0200, Alexander Gurov wrote:
> > Dear Fabian,
> > 
> > You can get revisions in the following way:
> > 
> > SVNRepositoryFile file = ...;
> > GetLogMessagesOperation logOp = new GetLogMessagesOperation(file, 
> > false /*stop on copy*/); 
> > ProgressMonitorUtility.doTaskExternal(logOp,
> > new NullProgressMonitor()); SVNLogEntry []revs = 
> > logOp.getMessages();
> > 
> > 
> > Best regards,
> > Alexander Gurov
> > Subversive Team
> > 
> > -----Original Message-----
> > From: subversive-dev-bounces@xxxxxxxxxxx
> > [mailto:subversive-dev-bounces@xxxxxxxxxxx] On Behalf Of Fabian
> > Sent: Monday, March 10, 2008 11:16 AM
> > To: subversive-dev@xxxxxxxxxxx
> > Subject: [subversive-dev] History of a file
> > 
> > Hi, out there, i need a programmatic way to get a list of all 
> > revision which contain a specific file (given as SVNRepositoryFile)
> > 
> > would be great if somebody may help me with this.
> > 
> > Fabian
> > _______________________________________________
> > subversive-dev mailing list
> > subversive-dev@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/subversive-dev
> > 
> > 
> > 
> > 
> > _______________________________________________
> > subversive-dev mailing list
> > subversive-dev@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/subversive-dev
> 



Back to the top