Re: [viewvc-users] RSS.ezt has incorrect value of [commits.limited_files]

"C. Michael Pilato" <[email protected]>
Newsgroups gmane.comp.version-control.cvs.viewcvs.user
Organization CollabNet, Inc.
Message-ID <4D24D1B5.2090103__37284.5130660155$1294258626$gmane$org@collab.net>
On 01/05/2011 02:35 PM, Arin Lipman wrote:

> I added the limit_changes=100 to my URL, but that didn't make a
> difference.  Let me make sure that we both are talking about the same
> scenario:
> 
> Commit 1: 1 files modified
> Commit 2: 11 files modified
> 
> rss_row_limit=10
> 
> in the RSS XML output, I'm seeing values of:
> Commit 1: 
>   num_allowed=1
>   len(commit_files)=1
>   max_files=100
> 
> Commit 2:
>   num_allowed=9
>   len(commit_files)=9
>   max_files=100
> 
> I briefly looked at the SQL, and the where statement is on the files,
> not the commits (perhaps by design), so I'm not sure how the code would
> know (without a second SQL query) the total number of files changed.

ViewVC's interactions with the commits database -- specifically in the area
of artificially limiting the information returned from queries -- is
non-ideal and confusing at best, and outright misleading and wrong otherwise.

rss_row_limit controls the total number of row returned by the whole of the
query operation.  This is handled at a deep level (down at the SQL query
level), and is intended only to prevent folks from triggering unbounded
queries against a server, aka "denial of service entry points" :-).  As you
can see, the total number of returned file changes is 10: 1 for Commit 1,
and 9 for Commit 2[1].

'limit_changes' is used to control how file changes per commit grouping
ViewVC will display.  So, of those 10 changes returned from the database,
you've stated that you want no more than 100 of them per commit grouping.
Of course, with one commit group of 1 file, and another reporting 9 files,
you've not triggered the requested threshold, and therefore the "did we
artificially limit the number of reported changes?" variable, aka
commits.limited_file, always answers False.

Try it again with limit_changes=5.  You should see it set to True for your
Commit 2 grouping.

-- C-Mike

[1]  If authz rules are in place, you might very well see far fewer actual
results.  ViewVC would still get a maximum of 10 back from the database, but
then it might trim out some (or all) of those due to insufficient access
rights.  It's ... confusing.

-- 
C. Michael Pilato <[email protected]>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

------------------------------------------------------
http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4255&dsMessageId=2696165

To unsubscribe from this discussion, e-mail: [[email protected]].
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk0k0bUACgkQokEGqRcG/W4d/gCgyTytod4YplDM83l3+M889edR
EhAAoJv+pa6Wa0cX8wUopDFAC/2VfrAs
=nDDS
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.