[KDev4] vcs integration - KUrl of a file is not enough to know the file's project!

Kuba Ober kuba at mareimbrium.org
Fri Mar 30 21:01:32 UTC 2007


> > > > > > 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?
> > > >
> > > > One thing just came to my mind.
> > > > Let's assume, that somebody has files in his projectdirectory that
> > > > are not known by the project-manager but still should go into CVS.
> > > > Maybe a README, additional scripts or something like that. Such files
> > > > don't show up in the project-manager and there also is no ProjectItem
> > > > object for them, correct? How can we pass them to the CVS plugin
> > > > then?
> > >
> > > Well, easily: Just ask the projectcontroller for the project that
> > > contains this file.
> >
> > That's a no-go with aegis :(
>
> I don't think so. Lets see:
>
> IProject* ProjectController::projectForFile(KUrl file)
> {
>   foreach(IProject* p, projectlist)
>   {
>     if( p->isProjectFile( file ) )
>       return p;
>   }
>   return 0;
> }

The problem is that in this case p->isProjectFile can be true for several 
projects in Aegis. The reason is that all baseline files are shared, and they 
don't exist in project's change directory. They typically sit on an nfs or 
samba mount.

Cheers, Kuba




More information about the KDevelop-devel mailing list