Modify

Opened 15 years ago

Closed 15 years ago

#5972 closed defect (fixed)

Crash with Trac 0.11.5

Reported by: ukubuku@… 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:

  1. try:
  2. if not env and env_error:
  3. raise HTTPInternalError(env_error)
  4. try:
  5. dispatcher = RequestDispatcher(env)
  6. dispatcher.dispatch(req)
  7. except RequestDone:
  8. pass
  9. resp = req._response or []
  10. 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:

  1. req.args.get('FORM_TOKEN') != req.form_token:
  2. raise HTTPBadRequest('Missing or invalid form token. '
  3. 'Do you have cookies enabled?')
  4. # Process the request and render the template
  5. resp = chosen_handler.process_request(req)
  6. if resp:
  7. if len(resp) == 2: # Clearsilver
  8. chrome.populate_hdf(req)
  9. template, content_type = \
  10. 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:

  1. self._render_diff(req, filename, repos, data)
  2. elif format == 'zip':
  3. self._render_zip(req, filename, repos, data)
  4. # -- HTML format
  5. self._render_html(req, repos, chgset, restricted, xhr, data) 326.
  6. if chgset:
  7. diff_params = 'new=%s' % new
  8. else:
  9. 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:

  1. prev_path = prev_rev = None
  2. else:
  3. add_link(req, 'first', req.href.changeset(oldest_rev),
  4. _('Changeset %(id)s', id=oldest_rev))
  5. prev_path = dataold_path?
  6. prev_rev = repos.previous_rev(chgset.rev)
  7. if prev_rev:
  8. prev_href = req.href.changeset(prev_rev)
  9. if prev_rev:
  10. add_link(req, 'prev', prev_href, _changeset_title(prev_rev))
  11. 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 ttressieres

Owner: changed from Lewis Baker to ttressieres

comment:2 Changed 15 years ago by ttressieres

Status: newassigned

comment:3 Changed 15 years ago by ttressieres

Resolution: fixed
Status: assignedclosed

(In [6718]) change of previous_rev method (fix #5972)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain ttressieres.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.