VCS Interface classes

Andreas Pakulat apaku at gmx.de
Mon Apr 30 13:21:02 UTC 2007


On 30.04.07 14:29:50, Jakob Petsovits wrote:
> On Monday, 30. April 2007, Andreas Pakulat wrote:
> > > * repositoryRevision() vs. localRevision() - what is the difference here?
> >
> > Simple: repositoryRevision() will give you the revision of that file on
> > the repository, local will give you the local revision (i.e. svn info
> > foobar, for example). This is the same after update() or commit() but
> > might be different in other times.
> 
> Obviously doesn't apply to SVN and CVS (everything except the checksum stays 
> the same), but if you say it's necessary for other VCSs, I'll believe you :)

No, the repositoryRevision can differ from the localRevision if somebody
else does something to the same file (without the local file being
updated). I think this is more or less just convenience for scripts
which can this way easily find out wether the file is up-to-date or not
(without having to execute a full status on the parent dir).

> > > * The above essentially also applies to diff(), but I'm not sure if it's
> > > a good thing to make the parameters more complicated for such an edge
> > > case.
> >
> > A list will be possible for most of the operations, i.e.
> > add,remove,diff,update,log.
> 
> Oh cool, I totally forgot about those. Then again, everything but commit is 
> less tragic because one composite action can easily be emulated by multiple 
> atomic ones.

Yeap, I already changed the interfaces here, basically everywhere where
only a localLocation was used now its a list of locations...

> > > Question: what dstRevision will the method receive if the LocationDst is
> > > a locally modified file inside the working copy? That's important to
> > > document, as it's the primary use case.
> >
> > I don't think dstRevision should be used in that case, dstRevision is
> > meant to be used when specifying a repository location. Maybe we
> > shouldn't do this in 1 method but split those that can take either repo
> > location or local one...
> 
> +1 for object oriented languages' method overloading feature :D
> Like, an extra method for that standard use case:
> virtual void diff( const KUrl& localLocation ) = 0;
> (or the "list" version of that.)
> I'm all for a split.

Yeap  and with the confusion that dukju showed I'll do that later today.

> Had a short look at the other files, and they look fine - except for the 
> distributed interface, I haven't got enough knowledge of how that works.

Yeah, me neither. I once used svk shortly but I really have no idea
wether push/pull is all thats needed and which parameters are needed
there.

Andreas

-- 
Beware of a tall blond man with one black shoe.




More information about the KDevelop-devel mailing list