VCS Interfaces, round 3
Andreas Pakulat
apaku at gmx.de
Fri May 4 13:36:08 UTC 2007
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.
> For example, the caller want to invoke
> virtual VcsJob diff( const QVariant& localOrRepoLocationSrc,
> const QVariant& localOrRepoLocationDst,
> const Revision& srcRevision,
> const Revision& dstRevision,
> VcsDiffMode ) = 0;
>
> then how the reposLocation Dst can be retrieved? If the qvariant
> is QString("/home/kdev/blah.c"), does it mean to fetch remote diff of given
> local file??
The remote repository location needs to be complete. The example here is
not a complete repository location for svn or cvs. Thats why we use a
QString here and not a KUrl. Local locations should always be a KUrl.
Andreas
--
Do nothing unless you must, and when you must act -- hesitate.
More information about the KDevelop-devel
mailing list