[KDev4] vcs integration

dukju ahn dukjuahn at gmail.com
Mon Mar 26 17:16:49 UTC 2007


> > I though the best thing
> > would be to use the project directory as working directory and
> > transform all
> > given URLs to a path relative to that location. So at least for cvs, I need
> > to have some sort of access to the projects the files belongs to.

Well, subversion needs full file/dir path, since it is not run by command-line.
When using svn lib, there is no concept of current dir.
Also, as others said, we will let any scripts can use vcs-plugins.
In that case, absolute path might be more easier to handle.

> > Maybe we shouldn't pass a list of KUrls but rather a list of objects
> >  from the
> > ProjectFileItem class to the vcs plugins?!?!

> I didn't yet look at the API but you are absolutely correct. In fact I
> think we should discuss wether we want both, i.e. KUrl +
> ProjectBaseItem*. I'm not sure we need KUrl, so I'd like to see people's
> opinions on that part, are there any use cases anybody can think of?

Although we can retrieve KUrl from ProjectFileItem, I think
such direct linkage lowers flexibility. Maybe in the future, VCS plugins
can be used not by project manager, by another component in KDevelop.
For example, as adymo and Andreas said, KDevelop will let any scripts
to access VCS.

For these reasons, I think KUrl should be maintained.

> This is also the only way to connect filemanger and vcs-plugin, i.e.
> IFileManager::fileAdded(ProjectBaseItem*) signal should be connected to
> VCS::addFile(ProjectBaseItem*) slot (this means pretty much all API
> needs to be a slot).

It is dangerous if filemanager/projectmanager are directly linked to VCS.

For instance, some people may want to add files just to project,
but not to VCS.
If whenever we add files to project, VCS plugins will be always
automatically invoked.
Usually, people frequently change working copy.
But it is only the final, and one time, step to add files to VCS.




More information about the KDevelop-devel mailing list