[PATCH] graphlog: fix output when both a limit and a path are provided
Nicolas Dumazet
nicdumz at gmail.com
Tue Dec 15 18:44:35 CST 2009
2009/12/13 Martin Geisler <mg at lazybytes.net>:
> What about counting down to limit instead of down to 0? I tried
> modifying the code to do that, but after fiddling with it for an
> embarrassingly long time I gave up :-)
>
> It just seems to me that we can do it simpler since filerev is
> decremented by one in each iteration, so we should not need a separate
> count variable...
Actually, I dont think that this is possible.
We have 3 constraints:
1) stop < rev <= start (-r argument)
2) filerev >= 0 (when walking through the revs, file must exist)
3) count <= limit
It is clear that 1) cannot be extended to include limit.
But 2) cannot either, because of the fact that filerev is decremented
does not necessarily means that a revision is yielded. It is
especially true when the file has existing changesets after the
provided range (a,b): we first walk through the filerevs in b:tip, and
filerev is decremented while no csets are yielded.
Or am I missing an other, easy way?
(sending as a follow-up the current patch)
--
Nicolas Dumazet — NicDumZ
More information about the Mercurial-devel
mailing list