[VCS] Merging IAtomic* into IBasic*
Andreas Pakulat
apaku at gmx.de
Thu May 10 19:39:00 UTC 2007
On 10.05.07 13:00:13, Matthew Woehlke wrote:
> Andreas Pakulat wrote:
> > On 10.05.07 10:10:22, Matthew Woehlke wrote:
> >> Just to clarify:
> >> repositoryRevision gets the most recent revision committed to the /whole
> >> repository/ (like the "Last Changed Rev" in 'svn info'). So if I am
> >> understanding you correctly, there is no such thing in CVS. Note that
> >> repositoryRevision does *not* take a repo path. I think you would use
> >> log() to get the information you are talking about.
> >
> > Did you look at repositoryRevision lately? It does take a path and IMHO
> > its not what you want it to be. It tells you the last revision when the
> > given path was changed. What would use-case do you have for knowing the
> > latest global revision number?
>
> Hmm, so it does, in which case I am mis-remembering. Given that it is in
> IAtomicBrowsableVC I think I must have meant for it to work as described
> above, since as it is currently written, it does indeed belong in
> IBrowsableVC. That being the case, do you think it's worth keeping
> repositoryRevision when it's just a simplified log()?
Its not a simplified log. repositoryRevision returns just the exact
revision for HEAD (it shouldn't be just head but the number). log()
returns what has changed for a given revision.
> I guess the only obvious use case is to facilitate getting a list of
> changes by means other than calling log() on the repository root.
My use case is simply letting a script determine wether the local copy
of a file is up-to-date or not. So it would do something like:
rev1 = localRevision(localpath)
remotepath = remotePathFromLocal(localpath) (this is missing atm, IIRC)
rev2 = repositoryRevision(remotepath)
if( rev1 < rev2 ) then do something fancy, like rm -rf /home
> This brings up two other questions... Should we have a repositoryRoot()
> function?
What for? How do you determine that? In svn the repository root could be
/ (with trunk,branches,tags) or
/foobar (with trunk/branches/tags in it)
depending on how you use your repo. For CVS the root is pretty clear but
doesn't give you anything useful, because you work on modules there.
> Should there be a way to compare VcsRevision's? (The obvious
> use-case for the latter is to determine if a file is up to date or needs
> to be updated.)
You can guess my answer from the above use-case, yes they should be
comparable.
Andreas
--
You can create your own opportunities this week. Blackmail a senior executive.
More information about the KDevelop-devel
mailing list