VCS interface
Andreas Pakulat
apaku at gmx.de
Fri Jul 11 17:53:54 UTC 2008
On 11.07.08 21:35:20, Evgeniy Ivanov wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Andreas Pakulat wrote:
> > On 11.07.08 16:45:12, Aleix wrote:
> >> Hi list,
> >> I am looking at the KDevelop4 VCS interface and I'm not really seeing how
> >> can this be used.
> >>
> >> There is a quite rich interface but it is not being used because the only
> >> way I see it is being called is from the Context Menus inside the plugin
> >> itself. I would understand this inteface if the menus were actually shared
> >> between all the plugins but they're being replicated around... maybe I'm
> >> missing something.
> >>
> >> Shouldn't the basicversioncontrol class create the menu and enqueue the job
> >> itself? that way we would have a ready interface for all the possible VCS
> >> without having to define it, otherwise having such an interface is a jail
> >> for the plugin developer...
> >
> > Yes the menu-creation and enqueuing of the job should move to a more
> > core component. But not IBasicVersionControl. That class is a pure
> > interface and should stay that way. I'm not sure how much can be moved
> > though, a plugin may need to provide its own implementation of
> > VcsLocation (or at least fill it in itself)...
> >
> > I'm not sure what exactly you mean with the last sentence above, however
> > the vcs interfaces are mostly there to be called from other plugins (yes
> > there's no example right now, but there will be sooner or later).
>
> That is the thing I wanted to discuss these days, but wasn't able.
> See
> http://repo.or.cz/w/kdevelopdvcssupport.git?a=tree;f=vcs/dvcs;h=0530aed0e78690acd33851fdfa997a07eadf70cb;hb=master
> I would like to do something like this with derived of IBasicVC:
> 1. remove svnjob and cvsjob and use DVCSjob->DVCSjobBase.
> 2. Add an ivcsexecutor, likeidvcsexecutor.h, rename all <vcs>proxy to
> <vcs>executor.
> 3. As you can see DVCSplugin implements all things (the most part) from
> IBasicVersion (inluding menus, basic functionality). So the main deal is
> to implement (move IBasicVC related things) to VCSplugin. The code of
> <vcs>plugin would benefit much.
>
> If nobody against I will do it. It shouldn't take much time.
I'm against that until I see actual benefit. I suggest you try to port
the svn plugin to that architecture and show a patch for that. What you
want to do is fine when one just wants to implement a GUI frontend for
the CLI of a version control system. However thats something you
actually want to do only if there's no other way. Working with a proper
API is a lot easier when it comes to more than just
add/remove/commit/update.
Andreas
--
Your lucky color has faded.
More information about the KDevelop-devel
mailing list