VCS Interfaces, round 3
dukju ahn
dukjuahn at gmail.com
Fri May 4 14:13:18 UTC 2007
2007/5/4, Andreas Pakulat <apaku at gmx.de>:
> On 04.05.07 09:05:21, dukju ahn wrote:
> > > /**
> > > * Small container class that has a mapping of
> > > * repository-location -> local location including a recursion flag
> > > *
> > > * Just a convenient API around QMap<KUrl, QPair<KUrl, RecursionMode>>
> > > *
> > > */
> > > class VcsMapping
> > > {
> > > public:
> > > enum MappingFlag
> > > {
> > > Recursive = 1,
> > > NonRecursive = 2
> > > };
> > > Q_DECLARE_FLAGS( MappingFlags, MappingFlag )
> > >
> > > void addMapping( const KUrl& repositoryLocation,
> > > const KUrl& localLocation,
> > > MappingFlags recursion );
> > > void removeMapping( const KUrl& repositoryLocation);
> > > KUrl::List repositoryLocations();
> > > KUrl localLocation( const KUrl& repositoryLocation );
> > > MappingFlags mappingFlags( const KUrl& repositoryLocation ) const;
> > > };
> >
> > The mapping provides remote location-> local location, but where
> > is local->remote conversion. I think local->remote conversion is needed.
>
> Thats the same thing, just the plugin reads it "in reverse", IMHO.
Why don't we be more explicit. According your answer, each plugin should
determine whether the given Kurl& is remote or local. This is very annoying.
Also the name of "KUrl localLocation( const KUrl& repositoryLocation );"
and the comment of class VcsMapping
suggest that only local location will be retreived. The interfaces should
be explicit right?
More information about the KDevelop-devel
mailing list