Opened 15 years ago
Closed 15 years ago
#5972 closed defect (fixed)
Crash with Trac 0.11.5
Reported by: | Owned by: | ttressieres | |
---|---|---|---|
Priority: | highest | Component: | PerforcePlugin |
Severity: | blocker | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
Trac detected an internal error:
TypeError: previous_rev() takes exactly 2 arguments (3 given)
# File "/usr/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/web/main.py", line 444, in _dispatch_request Code fragment:
- try:
- if not env and env_error:
- raise HTTPInternalError(env_error)
- try:
- dispatcher = RequestDispatcher(env)
- dispatcher.dispatch(req)
- except RequestDone:
- pass
- resp = req._response or []
- except HTTPException, e:
Local variables: Name Value after [u' except RequestDone:', u' pass', u' resp = ... before [u' try:', u' if not env and env_error:', u' raise ... dispatcher <trac.web.main.RequestDispatcher object at 0x88552ac> e TypeError('previous_rev() takes exactly 2 arguments (3 given)',) env <trac.env.Environment object at 0x8ab27cc> env_error None exc_info (<type 'exceptions.TypeError'>, TypeError('previous_rev() takes exactly 2 ... filename '/usr/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/web/main.py' frames [{'function': '_dispatch_request', 'lines_before': [u' try:', u' ... has_admin True line u' dispatcher.dispatch(req)' lineno 443 message u'TypeError: previous_rev() takes exactly 2 arguments (3 given)' req <Request "GET u'/changeset/1767'"> resp [] tb <traceback object at 0x8c6d25c> tb_hide None traceback u'Traceback (most recent call last):\n File ... # File "/usr/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/web/main.py", line 205, in dispatch Code fragment:
- req.args.get('FORM_TOKEN') != req.form_token:
- raise HTTPBadRequest('Missing or invalid form token. '
- 'Do you have cookies enabled?')
- # Process the request and render the template
- resp = chosen_handler.process_request(req)
- if resp:
- if len(resp) == 2: # Clearsilver
- chrome.populate_hdf(req)
- template, content_type = \
- self._post_process_request(req, *resp)
Local variables: Name Value chosen_handler <trac.versioncontrol.web_ui.changeset.ChangesetModule object at 0x8bd0f4c> chrome <trac.web.chrome.Chrome object at 0x8ba688c> err (<type 'exceptions.TypeError'>, TypeError('previous_rev() takes exactly 2 ... handler <trac.versioncontrol.web_ui.changeset.ChangesetModule object at 0x8bd0f4c> req <Request "GET u'/changeset/1767'"> self <trac.web.main.RequestDispatcher object at 0x88552ac> # File "/usr/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/versioncontrol/web_ui/changeset.py", line 325, in process_request Code fragment:
- self._render_diff(req, filename, repos, data)
- elif format == 'zip':
- self._render_zip(req, filename, repos, data)
- # -- HTML format
- self._render_html(req, repos, chgset, restricted, xhr, data) 326.
- if chgset:
- diff_params = 'new=%s' % new
- else:
- diff_params = unicode_urlencode({'new_path': new_path,
Local variables: Name Value chgset <trac.versioncontrol.cache.CachedChangeset object at 0x898322c> data {'changeset': <trac.versioncontrol.cache.CachedChangeset object at ... diff_data {'style': 'inline', 'options': {'ignorecase': 0, 'ignoreblanklines': 0, ... format None new 1767 new_path u'/' old None old_path None options -U2? prev (u'/', 1766, 'edit') prev_path u'/' prev_rev 1766 repos <trac.versioncontrol.cache.CachedRepository object at 0x87bdacc> req <Request "GET u'/changeset/1767'"> restricted False self <trac.versioncontrol.web_ui.changeset.ChangesetModule object at 0x8bd0f4c> style 'inline' xhr False # File "/usr/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/versioncontrol/web_ui/changeset.py", line 408, in _render_html Code fragment:
- prev_path = prev_rev = None
- else:
- add_link(req, 'first', req.href.changeset(oldest_rev),
- _('Changeset %(id)s', id=oldest_rev))
- prev_path = dataold_path?
- prev_rev = repos.previous_rev(chgset.rev)
- if prev_rev:
- prev_href = req.href.changeset(prev_rev)
- if prev_rev:
- add_link(req, 'prev', prev_href, _changeset_title(prev_rev))
- youngest_rev = repos.youngest_rev
Local variables: Name Value _changeset_title <function _changeset_title at 0x8aebae4> browser <trac.versioncontrol.web_ui.browser.BrowserModule object at 0x8ba612c> chgset <trac.versioncontrol.cache.CachedChangeset object at 0x898322c> context <Context <Resource u'changeset:1767'>> data {'changeset': <trac.versioncontrol.cache.CachedChangeset object at ... get_changes <function get_changes at 0x8aebed4> oldest_rev 2 path u'/' prev_path u'/' repos <trac.versioncontrol.cache.CachedRepository object at 0x87bdacc> req <Request "GET u'/changeset/1767'"> restricted False rev 1767 revprops {} self <trac.versioncontrol.web_ui.changeset.ChangesetModule object at 0x8bd0f4c> title 'Changeset 1767' xhr False # File "/usr/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/versioncontrol/cache.py", line 279, in previous_rev
Attachments (0)
Change History (3)
comment:1 Changed 15 years ago by
Owner: | changed from Lewis Baker to ttressieres |
---|
comment:2 Changed 15 years ago by
Status: | new → assigned |
---|
comment:3 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [6718]) change of previous_rev method (fix #5972)