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

Evgeniy Ivanov powerfox at kde.ru
Sun Jun 8 19:15:07 UTC 2008


Andreas Pakulat wrote:
> On 07.06.08 19:29:36, Evgeniy Ivanov wrote:
>   
>> There are two ways to add DVCS plugins in KDevelop: add the code for 
>> IDistributedBasicVersionControl (clone in some places 10 lines with 
>> 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.
>>     
>
> Sorry but I don't understand this at all. Can you please provide a patch
> for 1 and 2? Also which interface would be implemented by svn/cvs
> IVersionControl or IBasicVersionControl?
>
> Note: You can implement multiple interfaces at once, just do
> multi-inheritance.
>   
http://repo.or.cz/w/kdevelopdvcssupport.git?a=blob;f=vcs/interfaces/idistributedversioncontrol.h;h=b3435008759754a31959d461aadd42347256d144;hb=my
iDistributedVersionControl's interface is differ than iBasic's. See add 
function, for example: I don't need repository argument, like in CVS.
For first approuch see my previous letter with patch.
The idea for second is to move name(), createImportMetaWidget() and 
maybe some more functions to another class. And both 
idistributedversioncontrol and ibasic can inherite from this class. As I 
understand only these functions are used in KDevelop to initialize VCS 
plugins.




-- 
Best Regards,
Evgeniy






More information about the KDevelop-devel mailing list