REMINDER: Final review of VCS interfaces

Andreas Pakulat apaku at gmx.de
Tue May 29 16:27:56 UTC 2007


On 29.05.07 12:15:29, dukju ahn wrote:
> 2007/5/29, Matthew Woehlke <mw_triad at users.sourceforge.net>:
> > Ok, one comment on annotate()... it isn't clear what type of revision is
> > returned (GlobalNumber or FileNumber) or if it is possible to try to
> > retrieve both. What about this simple change (below)? Note that date is
> > now fetched by asking for the Date type of revision. This should also
> > make things easier in the case that a VCS's annotate() only returns a
> > subset of the possible information.
> 
> > Index: vcshelpers.h
> > ===================================================================
> > --- vcshelpers.h        (revision 669527)
> > +++ vcshelpers.h        (working copy)
> > -    /**
> > -     * @param linenum the number of the line, counting from 0
> > -     * @return the date of the last change on the specified line
> > -     */
> > -    QDateTime date( int linenum );
> >   };
> 
> VcsRevision may contain only one type of information. It is impossible that
> each plugin should provides datetime, number simultanuously for revision.
> RevisionType revisionType() const; returns only one kind between date, number
> or special.
> So VcsAnnotation should provide date() method.

Uhm, one can easily store two VcsRevision objects inside the
VcsAnnotation and thus return the proper one when asked for the
revisions, so date() is indeed uneeded if we have revision with 2
parameters. Depending on the capabilities of the plugin you might get an
invalid revision if you ask for a type that doesn't exist.

Andreas

-- 
Your boyfriend takes chocolate from strangers.




More information about the KDevelop-devel mailing list