[VCS] diff on dirs?

Andreas Pakulat apaku at gmx.de
Tue Oct 9 15:55:28 UTC 2007


On 09.10.07 10:32:39, Matthew Woehlke wrote:
> Andreas Pakulat wrote:
> > Possible solutions:
> > 
> > a) Always use QString, this is a breakup with other parts of the
> > platform API which use KUrl
> > b) A new Location type that has operator < or a qHash function and
> > allows to retrieve either a string or a url and also knows how it was
> > constructed (i.e. wether it is a repo or local location)
> > c) Only use QString in VcsDiff and store the information wether thats
> > repo location or local locations in the VcsDiff object as well
> > 
> > Personally I'd prefer b) I think, with changing all QVariant's to
> > Location in the API's but leaving KUrl/QString API's as they are now.
> 
> b) sounds nice, you could make Location have 'isLocal', 'localPath', 
> 'remotePath' and such if that seems useful.

I already implemented that after Matt said he likes the version and yes
the class has localUrl(), repositoryLocation() (I thought path is a bad
thing here as we're not limiting how a repository describe's its
structure) and also locationType() to return either LocalLocation or
RepositoryLocation.

There is a small implementation issue right now which I have to fix
before comitting :)

> > Oh and of course the name of the Location type is subject to discussion
> > as well, if somebody has a better idea...
> 
> "VcsLocation"? Or are we not using "Vcs" in class names these days? (Or 
> is it namespaced? If it's going to be namespaced, "Location" seems fine.)

Hehe, yes I meant to write VcsLocation as all other classes are
Vcs-prefixed. Though I right now wonder wether it would be better to use
a nested namespace, i.e. 

KDevelop::Vcs::Location instead of KDevelop::VcsLocation

Personally I don't care, unless of course one way is significant
drawbacks (or the other has significant gains).

Andreas

-- 
It may or may not be worthwhile, but it still has to be done.




More information about the KDevelop-devel mailing list