VCS Interfaces, round 3
Matthew Woehlke
mw_triad at users.sourceforge.net
Fri May 4 16:24:46 UTC 2007
Andreas Pakulat wrote:
> On 04.05.07 10:17:40, dukju ahn wrote:
>> For example, subversion takes 2~3 extra flags that are very useful
>> (such as limit the number of log,
>
> That will be included in the interface as its really useful.
Hmm, do you really think it is necessary? Even on a huge project I don't
think retrieval takes that long (unless you have a /really/ slow
connection), the issue is usually displaying it. And I don't see a
problem there, we aren't talking about a console window. :-)
But I guess I don't see a problem, a VCS that can't limit the result
(um... like I don't think perforce does it, at least it doesn't seem to
do it /correctly/ even though it claims it can) can either artificially
strip the results or (my preference) simply ignore the limit. IOW the
limit would be advisory.
...which still leaves the question of how do you specify the limit? And
can all VCS's return incremental results? (perforce looks OK here, I was
worried it might not be.)
Come to think about it, it would be ideal if VcsJob provided a way to
return results incrementally. Support would be optional, but if
available it would allow e.g. filling in a UI as information is
retrieved rather than having to wait for everything before anything can
be displayed. (This brings up another point; a VcsJob should be
cancelable :-).)
I realized just now, log() should take a VcsRevision also (should it
not?), especially if it takes a limit, that way incremental searches are
possible. Before I change it (or, you're welcome to do it yourself of
course), what's the word on having two versions of log()?
Another question: shouldn't the interface provide default parameter
values where appropriate? For example:
virtual VcsJob diff( const QVariant& localOrRepoLocationSrc,
const QVariant& localOrRepoLocationDst,
const VcsRev& srcRevision = VcsRev::Working,
const VcsRev& dstRevision = VcsRev::Base,
VcsDiffMode = VcsDiffMode::DiffDontCare ) = 0;
(s/VcsRev/VcsRevision/ ...abbreviated to prevent wrapping. I also just
fixed the headers in svn, they still had Revision... oops :-).)
--
Matthew
Current geek index: 62%
More information about the KDevelop-devel
mailing list