Split IBasicVersionControl into IBasicVersionControl (for (D)VCS) and IVersionControl (for VCS)

Andreas Pakulat apaku at gmx.de
Sun Jun 8 22:03:03 UTC 2008

On 08.06.08 22:58:58, Evgeniy Ivanov wrote:
> Matt Rogers wrote:
>> On Saturday 07 June 2008 10:29:36 Evgeniy Ivanov wrote:
>>> changes for IDistributed) or to
>>> split IBasicVersionControl into IBasicVersionControl (for (D)VCS) and
>>> IVersionControl (for VCS), so in some places IBasicVersionControl may be
>>> used both  for VCS and DVCS plugins.
>>> First approach will not brake current SVN/Perforce/CVS plugins, but we
>>> will have about 2-3 ugly functions. Using second we have to do minor
>>> changes to VCS plugins, but the code will be looked cute.
>> IBasicVersionControl  should the base class for 
>> IDistributedVersionControl. What's wrong with doing it that way?
> If I don't mistake some functions of IBasicVersionControl will be pure  
> within IDistributedVersionControl. For example: import, edit, unedit,  
> maybe localRevision and resolve.

edit/unedit indeed make mostly sense for centralized vcs systems. 

About import(): Isn't that simply doing a git init in the source

localRevision indeed also doesn't make sense for dvcs, so should also be
moved to ICentralizedVersionControl.

resolve, hmm I haven't used git that much, but isn't there conflicts
when merging as well? resolve() really is just a way to tell the plugin
system it should open up an editor to resolve any conflicts from

Besides: You don't need to do anything inside these methods, just return
an invalid job and you're done. Which means you don't support these

> Maybe I didn't inspect where and how all things from  
> IBasicVersionControl are used, but as I saw only name(),  
> createImportMetadataWidget() are important for KDevelop's  VCS plugin  
> system.

Right, because currently all the vcs plugins we have just add their
actions which are directly connected to their own slots. However at some
point in the near future the "common" actions are going to be moved to a
more central place and then they'll need to work with
IBasicVersionControl, so each VCS plugin needs to implement that

>      QList<KDevelop::IPlugin*> vcsplugins = controller->allPluginsForExtension (
>              "org.kdevelop.IBasicVersionControl", QStringList() );
> +    QList<KDevelop::IPlugin*> dvcsplugins = controller->allPluginsForExtension (
> +            "org.kdevelop.IDistributedVersionControl", QStringList() );

And this is not needed if you implement IBasicVersionControl.


You're currently going through a difficult transition period called "Life."

More information about the KDevelop-devel mailing list