VcsRevision creation (again)

Andreas Pakulat apaku at gmx.de
Sat Jun 9 13:38:46 UTC 2007


Hi,

I'm currently working on implementations for the vcshelpers classes and
stumbled over

bool VcsRevision::setRevisionValue();

This won't work, as clients of the Vcs API will always have a
VcsRevision class, not some subclass of it (we can't use pointers) so we
can't override this method.

Currently I see two ways to make this work:

a) leave the function, change the return type to void and let the VcsJob
fail if the revision value and type don't fit together with the other
arguments of the function called or the Vcs system (think filenumber for
svn).
b) leave the creation up to the vcs plugin by providing a factory
function to create vcs revisions

The downside of the 2nd is that the job may still fail because the
create revision may not be suitable for the repository item. So
personally I'm in favor of the first version.

Andreas

-- 
Don't let your mind wander -- it's too little to be let out alone.




More information about the KDevelop-devel mailing list