VCS Interfaces, round 3

dukju ahn dukjuahn at gmail.com
Fri May 4 13:05:21 UTC 2007


> /**
>  * 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.

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




More information about the KDevelop-devel mailing list