VCS Interface classes

Andreas Pakulat apaku at gmx.de
Mon Apr 30 08:07:47 UTC 2007


On 30.04.07 09:34:40, Jakob Petsovits wrote:
> On Monday, 30. April 2007, Andreas Pakulat wrote:
> > I present to you our new VCS interface classes (that I finally managed
> > to write up, based on the enourmus thread some time ago).
> * ibasicversioncontrolh.h has an "h" too much, both in its filename and the 
> header guard.

Ooops :)

> * I think isValidDirectory() should be named isWorkingCopy(), because on 
> reading this name you instantly know what is asked for.
> ("what does valid mean here?")

Well, WorkingCopy seemed to be too svn-ish...

> * edit() is also not quite what the method is doing, how about setEditable()?

IMHO setEditable is not really proper, for me it always means setting a
flag, which is not the case here. This may mean to fetch a file from the
repository to make it editable. 

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

> Also, any particular reason why the parameter is restricted to local copies?

Well, repositoryRevision should really just check the revision of a
local file in the repository, so I don't see the need to have a
repository location here. 

> * commit(): I think the first parameter should be a list of locations, instead 
> of only one location. Think of stuff like svn commit file1.h file2.h while 
> you've got a load of other locally modified files in the same directory.

Ooops, right. Well, it was late yesterday ;)

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

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

Andreas

-- 
You may be infinitely smaller than some things, but you're infinitely
larger than others.




More information about the KDevelop-devel mailing list