[VCS] VcsRevision

Andreas Pakulat apaku at gmx.de
Thu May 24 16:57:35 UTC 2007


On 24.05.07 10:47:33, Matthew Woehlke wrote:
> Andreas Pakulat wrote:
> > On 21.05.07 11:39:38, Matthew Woehlke wrote:
> >> Maybe we should instead take both limits at once, with default 
> >> parameters for each (make the revision limit a pointer I guess, default 
> >> = NULL)?
> > 
> > No, also the VcsRevision is not a limit, its more like "from" and "to".
> > And having them in 2 separate methods makes it more clear that they mean
> > different things. One is for fetching the last N items in the history
> > starting at revision, the other one fetches all history items between
> > two revisions.
> 
> My concern is just that if the VCS doesn't support 'from,to' in log(), 
> you are stuck waiting on it to fetch 'everything'. Hmm... on second 
> thought, any objection to requiring it to be kind-of like showLog()? Use 
> a reasonable limit internally if the VCS does not support 'from,to' and 
> keep making limited calls until the 'to' revision is reached, then truncate.

I don't care at the moment how the plugin achieves "from,to", thats an
implementation detail. If that is slow because it fetches the whole
history of a file, thats unfortunate but unavoidable. Also I think
you're too concerned here, unless you've got a really crappy VCS system
getting the full log of a certain file or dir shouldn't be that bad. As
an example:


And I consider that a really huge repository log.

> >> log() should be ok now (see above). Is diff() ok as-is, or am I missing 
> >> a use case?
> > 
> > No, I think diff is ok too. We might need to document that dstPath
> > doesn't need to be given, if 2 revisions are given. Or do we force users
> > to provide the same path for both (path == repo or local path).
> 
> I was assuming you always provided all parameters, even if that means 
> passing the same arg twice. I guess we could also document that empty 
> dstPath means 'use srcPath'.

Hmm, what about an overload that takes only 1 path but two revisions?
Thats better than documenting a special case or having to provide 2
paths that are the same, which is a special case that the user needs to
know about...

Andreas

-- 
You will pay for your sins.  If you have already paid, please disregard
this message.




More information about the KDevelop-devel mailing list