VCS Interface classes

Andreas Pakulat apaku at gmx.de
Mon Apr 30 21:35:33 UTC 2007


On 30.04.07 14:39:30, Matthew Woehlke wrote:
> Andreas Pakulat wrote:
> > On 30.04.07 12:24:48, Matthew Woehlke wrote:
> > svn diff -r PREV:COMMITTED foo.c
> > 
> > and see the changes that the last commit did to foo.c.
> 
> The book says: "The most recent revision prior to, or equal to, BASE, in 
> which an item changed." IOW, as per previous e-mail, I don't think we 
> should support svn's "BASE", and should treat "BASE" as svn's 
> "COMMITTED". I think what it's saying is if I check out r57 and the last 
> change to foo.c was made by r42, then BASE(foo.c) is 57 and 
> COMMITTED(foo.c) is 42. Note that for passing to diff, BASE==COMMITTED 
> by definition of COMMITTED, it is really itemRevision()* where this matters.
>
> (* note: I'm suggesting this change from latestRevision(); if I 
> understood correctly, calling this on a local file gives the BASE 
> revision not the HEAD revision, therefore I think 'latest' is misleading.)

Agreed.

> > Not 100% following here, but IMHO that means we should have something
> > like this:
> > 
> > class Revision
> > {
> > 	enum RevisionType {
> > 		Number,
> 
> Does this consider that IIRC a cvs version "number" is e.g. "1.2.15"?

Uhm, well its just a flag, what really is inside the QVariant is
determined by whoever builds the revision. I mean for Number we can say:
Try "int" fall back to "QString".

> > Or don't we need Branch/Tag as Revision kind of Parameter? I think for
> > CVS thats needed, for SVN branch/tag would mean another repo location,
> > how is it with perforce?
> 
> I'm not sure how branch works with svn, I guess it is the revision of 
> the file in e.g. /trunk when the branch was done?

I was thinking that svn would just ignore this, i.e. it would use solely
the url, same for tag. If a VCS does need an identifier, like CVS does
then its in the Revision. If a VCS doesn't need an identifier for
identifiying a branch then it just ignores the Revision parameter. Or is
that too much "magic" behind the scenes?

Andreas

-- 
This will be a memorable month -- no matter how hard you try to forget it.




More information about the KDevelop-devel mailing list