[VCS] VcsRevision

Matthew Woehlke mw_triad at users.sourceforge.net
Mon May 21 14:26:24 UTC 2007


Andreas Pakulat wrote:
> currently VcsRevision can have at least 5 types: date, filenumber,
> globalnumber, special or range. 
> 
> In the thread that started about merging iatomic there was mentioning
> about having repo path (and possibly also local file paths) inside
> VcsRevision. 
> 
> One question is wether a VcsRevision can be constructed by a user of our
> API's. If so there would be the need to set such paths, if not the path
> can be something that is completely internal to the revision - or at
> least only accessible to the plugins.
> 
> So, how are VcsRevisions constructed? Is always an interface method
> used? Can somebody see a use-case that needs constructing VcsRevision
> directly?

Wow, you actually did an excellent job covering what I was expecting to 
say in response already :-), so I'll just throw out my own thoughts if 
anyone wants to disagree.

I assume one can create a date or special. Maybe a GlobalNumber. I was 
assuming that one can't create a FileNumber but would always get it from 
the plugin, but I guess that does seem inconvenient. (An easy answer is 
to construct it via '<repoPath>#<number>' passed as a QString.) Hmm, 
setRevisionValue probably should return a bool. I think the problem with 
building a number (either kind) is you have to know if "number" means 
655326 as in svn/perforce or "3.5.6.107" as in (IIRC?) CVS.

Creating a range is IMO not relevant, we already have setSourceRevision 
and setTargetRevision, so the answer is 'yes' as long as you have 
VcsRevisions to feed those. (Hmm, what happens though if you try to set 
one of those to a range? Should it return false, silently use an invalid 
revision instead, something else...?)

Actually, what is the use-case for a range, is it just merge()? (Also, 
doesn't the target of a merge have to be a local path? And then what 
does dstRevision mean? Did we have this conversation before and I am 
forgetting? :-))

-- 
Matthew
Excessive obscurity: -5





More information about the KDevelop-devel mailing list