VCS Interface classes

Andreas Pakulat apaku at gmx.de
Mon Apr 30 18:15:01 UTC 2007


On 30.04.07 12:04:36, Matthew Woehlke wrote:
> Andreas Pakulat wrote:
> > 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.
> 
> Should repositoryVersion() return the very latest global version of the 
> repo, or the latest change that affected the file in question? I want to 
> say the latter?

Agreed.

> Anyway, I guess I am also confused; why is the difference not simply 
> whether you gave a repo path vs. a url (i.e. one function)? (But I guess 
> this needs the url->repo path function?)

Thats exactly the only reason - the missing repoPathFromUrl(), which
will probably get added to the basic iface. Then I propose to change to

latestRevision( QVariant, Revision::type );

QVariant is used to make it easier to check wether its a QString or KUrl
(i.e. repo path or local url). And type may be number or date, so you
can fetch a date if you want.

> I also realized something unfortunate, but probably unavoidable... it is 
> really hard to get the repo version of a directory with perforce. All I 
> can figure out to do is get the file version of every file in the 
> specified path and compare that to the log() of that path, working 
> backwards until you find the revision at which point going further back 
> would mean reverting to an earlier version of some file in that path.

Uhm, latestRevision may return an empty Revision object (i.e. type ==
invalid or something like that), so you can do that for directories.

Andreas

-- 
Just because the message may never be received does not mean it is
not worth sending.




More information about the KDevelop-devel mailing list