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 <4D24BF63.1010104__35130.6435572498$1294253950$gmane$org@collab.net>
On 01/05/2011 12:58 PM, Arin Lipman wrote:
> When using an RSS feed, the rss.ezt template does not get the proper
> value for commits.limited_files.  Line 3975 in viewvc.py contains the
> following:
> 
> commit.limited_files = ezt.boolean(num_allowed > len(commit_files))
> 
> When running in RSS format, both num_allowed and len(commit_files) are
> equal, and the value is always false.  This logic works in
> query_results.ezt.

Well, it's not necessarily an error condition that num_allowed ==
len(commit_files).  But I guess you know that.  :-)

If I'm reading the code correctly, the only time these values should differ
is when build_commit() is called with a non-zero 'max_files' parameter and a
given commit "set" has changes to more than the allowed number of files.
There's nothing RSS-specific about that, so let's back up a step.

build_commit()'s 'max_files' parameter is always the limit_changes variabl
(in view_query()), which is populated like so:

  limit_changes = int(request.query_dict.get('limit_changes',
                                             cfg.options.limit_changes))

In other words, either your configuration must be setup to limit the changes
(via the [options] section's "limit_changes" option), or you must provide
the "limit_changes=NNN" CGI query parameter.  Now, the query form will, by
default, pass that "limit_changes" parameter for you.  (See the "Limit:"
section of the default query form template.)  But the default URLs generated
for the RSS feeds don't include that parameter, unless I'm mistaken.

Can you verify that you still see the problem if you forcibly add
"&limit_changes=NNN" to your RSS feed URL?  When I do so (after making a
tweak to rss.ezt to reveal the commit.limited_files value), I get the
expected results.

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

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

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)

iEYEARECAAYFAk0kv2MACgkQokEGqRcG/W7Y2QCgjamAEfnsZIIeUSAmiJMYi7ZU
+SMAn3dAyfuUMA69nGJoRKqqv1YsJ4Ma
=fTNv
-----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.