List Info

Thread: Re: vcs integration - KUrl of a file is not enough to know the file's project!




Re: vcs integration - KUrl of a file is not enough to know the file's project!
user name
2007-03-30 16:01:32
> > > > > > 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

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

Re: vcs integration - KUrl of a file is not enough to know the file's project!
user name
2007-03-30 17:01:09
On 30.03.07 17:01:32, Kuba Ober wrote:
> > > > > 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.

Why is that a problem? If the file exists and is part of
your project
than its absolutely correct for isProjectFile to return true
and thus a
project item is returned for that file.

If OTOH you want something like project == changeset, then
your
projectmanager needs to return false when given a url that
is not part
of the changeset, but I thought you wanted it the other way
around.

Now when the aegis-vcs-part gets the projectfile it can
check wether its
part of the changeset or if its part of another change set
and act
accordingly (i.e. don't allow update/commit/remove/whatever
fits for
aegis).

Andreas

-- 
Bank error in your favor.  Collect $200.

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )