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

Andreas Pakulat apaku at gmx.de
Sun Jun 8 21:54:33 UTC 2008


On 08.06.08 23:15:07, Evgeniy Ivanov wrote:
> 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.

Right, however you should implement IBasicVersionControl and then we
should see what should be moved away from there. I don't particularly
want to see two different classes with almost, but not quite, the same
API. If you don't need the repository parameter, just ignore it.

Does anybody know if DVCS support adding a file outside of the
repository? Like the following:

$HOME/myrepo/ is a repository (lets say has .<yourdvcs> in it)
$HOME/foo/bar.cpp is a file I want to add, can I just do
<yourdvcs> add $HOME/foo/bar.cpp in $HOME/myrepo? 

If there's a DVCS that supports this, then the parameter is needed for
DVCS as well, just not for git.

> 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.

See above, IBasicVersionControl is a subset of what all VCS systems
(centralized and distributed) support and should be implemented by all
VCS plugins, possibly ignoring some parameters if they don't make sense.
So far it seems we need to create a ICentralizedVersionControl interface
and move some methods to that, so lets find out which methods that are.

Andreas

-- 
You have no real enemies.




More information about the KDevelop-devel mailing list