#4759 closed enhancement (fixed)
LOG_LIMIT -> runtime option?
Reported by: | Owned by: | Christian Boos | |
---|---|---|---|
Priority: | normal | Milestone: | 0.11 |
Component: | version control/log view | Version: | devel |
Severity: | minor | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
would it be possible to make LOG_LIMIT value in trac/versioncontrol/web_ui/log.py be configurable via conf/trac.ini
Attachments (3)
Change History (13)
comment:1 by , 18 years ago
follow-up: 4 comment:2 by , 18 years ago
Milestone: | → 0.12 |
---|
IIRC, a "limit" parameter was originally part of the log preferences panel.
Then, it was a bit redundant with the 'back to' parameter (in View log starting at ____
and back to ____
).
Maybe this could be made a user configurable setting.
comment:3 by , 18 years ago
ehm yea, that was also my first impression. correct is that LOG_LIMIT is the macimal number of revisions to whow in revlog viewer. That is, wven if you enter you want 10000 back to 1, it will at most show LOG_LIMIT revisions at a time.
on the other hand, the same value is used for the default display. (i.e. when you first click on "rev log" without having entered anything in this update dialog)
but that's not urgent, as I have changed the value in the source. Just thought would be a good idea to make that configurable via trac.ini.
comment:4 by , 18 years ago
Replying to cboos:
IIRC, a "limit" parameter was originally part of the log preferences panel. Then, it was a bit redundant with the 'back to' parameter (in View log starting at
____
and back to____
).
voting to readd this (in 0.11?) again. It is not unusual to ask for revisions 10000 to 2 but showing at most 10 or 20 revisions (which might be e.g. 9001,9000,8992,6000,300,2 for a subdirectory or a single file)
attaching a patch.
by , 18 years ago
Attachment: | limit.patch added |
---|
comment:5 by , 18 years ago
I just updated the patch. I'd really appreciate it if you could get it into the trunk.
I see that this is obviously redundant with the "back to" parameter, but only in the root of the svn project. In any subdirectory, or a particular file, these are really two different things.
Thanks in advance.
comment:6 by , 18 years ago
Milestone: | 0.12 → 0.11 |
---|---|
Resolution: | → fixed |
Severity: | normal → minor |
Status: | new → closed |
I liked the formulation Show at most n revisions, as expressed that way it's not redundant neither ambiguous with the back to parameter (it's even clearer, because previously if one specified from 2000 and back to 1000, one would only get the first 100 revisions, without that limit being explicitly mentioned anywhere).
Slightly adapted patch applied in r4788, thanks!
by , 18 years ago
Attachment: | loglim.patch added |
---|
that adds an option to trac.ini to adjust the default value for limit
follow-up: 8 comment:7 by , 18 years ago
What would you think about:
-
trac/versioncontrol/web_ui/log.py
19 19 import re 20 20 import urllib 21 21 22 from trac.config import IntOption 22 23 from trac.context import Context 23 24 from trac.core import * 24 25 from trac.perm import IPermissionRequestor … … 34 35 Chrome 35 36 from trac.wiki import IWikiSyntaxProvider, WikiParser 36 37 37 LOG_LIMIT = 10038 39 38 class LogModule(Component): 40 39 41 40 implements(INavigationContributor, IPermissionRequestor, IRequestHandler, 42 41 IWikiSyntaxProvider) 43 42 43 default_log_limit = IntOption('revisionlog', 'default_log_limit', 100, 44 """Default value for the limit argument in the TracRevisionLog 45 (''since 0.11'').""") 46 44 47 # INavigationContributor methods 45 48 46 49 def get_active_navigation_item(self, req): … … 73 76 revs = req.args.get('revs', rev) 74 77 format = req.args.get('format') 75 78 verbose = req.args.get('verbose') 76 limit = int(req.args.get('limit') or LOG_LIMIT)79 limit = int(req.args.get('limit') or self.default_log_limit) 77 80 78 81 repos = self.env.get_repository(req.authname) 79 82 normpath = repos.normalize_path(path)
instead?
I think it's better to keep that in the same module, plus it makes it more convenient to use the value (by using self.default_log_limit
).
comment:8 by , 18 years ago
Replying to cboos:
What would you think about: ![…] instead?
I think it's better to keep that in the same module, plus ![…]
sure. would have done myself, but didn't feel like adding a new section to trac.ini
and of course I don't have as good overview over the code as you guys do
maybe LOG_LIMIT is not the right thing. I actually think, that LOG_LIMIT can stay where it is.
The actual reequest is to make the default number of revisions displayed in the revision log browser to be configurable. (at the moment it is the same as LOG_LIMIT)