[KDev4] vcs integration

Robert Gruber R.Gruber at gmx.net
Tue Mar 27 07:16:14 UTC 2007


Mon, 26 Mar 2007 18:22:59 +0200
> On 26.03.07 15:34:46, Robert Gruber wrote:
> > while having a look at the vcs exension interface the following
> questions came 
> > to my mind.
> > 
> > As we can have multiple projects opened at a time, it may happen that
> files 
> > >from different projects will be passed to a VCS-plugin. 
> > *) How can I find out which file belongs to which project?
> > *) And what if the project use different VCS plugins?
> > 
> > I'll have to call the cvs client from a location inside of the local
> working 
> > copy and pass all files relative to that directory.
> 
> IIRC all IProjectFileManager's have way to find the relative path for a
> given URL.

Maybe you can give me a little hint ;)
All I found was this: 
KUrl IProject::relativeUrl(const KUrl& absoluteUrl)

But this still leaves the problem, that I don't have an IProject object. So at the moment I don't think that passing only KUrl will be enough (at least not for CVS).


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


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

I don't think this should be "hard wired". I think it should work just like in KDevelop3, where the user could descide if the new files should also be added the the vcs. Maybe a checkbox in in the "Add file to project" dialog or a Yes/No questionbox afterwards, something like that...


Robert

-- 
"Feel free" - 5 GB Mailbox, 50 FreeSMS/Monat ...
Jetzt GMX ProMail testen: www.gmx.net/de/go/mailfooter/promail-out




More information about the KDevelop-devel mailing list