VCS Interfaces, round 3

Andreas Pakulat apaku at gmx.de
Fri May 4 18:13:44 UTC 2007


On 04.05.07 11:03:24, Matthew Woehlke wrote:
> dukju ahn wrote:
> > 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??
> 
> perforce sure seems to think that's valid. Hmm, ok, so that means giving 
> a version other than WORKING (or for svn, BASE) means you want to diff 
> against repositoryLocation(<file>) rather than <file> (assuming <file> 
> is a local file). Makes sense to me... objections?

I don't think I follow here. If the caller puts QString("..") into the
Dst then its a repo path, no matter what the revision indicates. If the
revision indicates something that only makes sense on a local file then
the plugin may return an error. If the caller wants to diff against a
local file in Dst then he needs to put a KUrl there.

> To answer your question (and also the one in your follow-up, and to try 
> and clarify what Andreas said in his reply), a QString is always a repo 
> path and a KUrl is always a local path. So unless "/home/kdev/blah.c" is 
> a valid repo path, then what you have written above is invalid. :-)

Exactly.

> Hmm, I understand where BASE comes from, but I am starting to think HAVE 
> would be more obvious. Thoughts?

To be honest I think BASE means more to me than HAVE, BASE == the base
version of the file I'm working on, i.e. the file without my
modifications. Of course I'm biased by svn/cvs, and if perforce uses
HAVE you're biased too Matthew ;)

WORKING communicates clearly I think and HEAD as well, what about
UNMODIFIED instead of BASE or HAVE, does that communicate better?
(Although its then an invention of KDevelop and needs to be "translated"
by each plugin).

Andreas

-- 
Your own qualities will help prevent your advancement in the world.




More information about the KDevelop-devel mailing list