Edgewall Software
Modify

Opened 10 years ago

Closed 10 years ago

#11912 closed defect (fixed)

AttributeError: 'NoneType' object has no attribute 'get_youngest_rev'

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Milestone: 1.0.5
Component: version control Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:

Ignore repositories defined in trac.ini if they have an empty dir attribute.

API Changes:
Internal Changes:

Description

How to Reproduce

While doing a GET operation on /admin/versioncontrol/repository, Trac issued an internal error.

Occurs if the repository is defined in trac.ini and .dir is empty:

[repositories]
.dir = 

Request parameters:

{'cat_id': u'versioncontrol', 'panel_id': u'repository', 'path_info': None}

User agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:34.0) Gecko/20100101 Firefox/34.0

System Information

Trac 1.0.3dev-r13640
Babel 0.9.6
Docutils 0.12
Genshi 0.7 (with speedups)
Pygments 1.6
pysqlite 2.6.0
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2]
pytz 2014.4
setuptools 3.6
SQLite 3.8.2
Subversion 1.8.8 (r1568071)
jQuery 1.7.2
jQuery UI 1.8.21
jQuery Timepicker 1.0.1

Enabled Plugins

ComponentDependencyPlugin 0.1
EmailProcessor N/A
exception-raising-plugin N/A
PlantUML 2.0dev
TicketSidebarProvider 0.0
TracDynamicFields 2.2.0dev
TracMercurial 1.0.0.5dev
TracVote 0.3dev

Python Traceback

Traceback (most recent call last):
  File "/home/user/Workspace/t11944/teo-rjollos.git/trac/web/main.py", line 513, in _dispatch_request
    dispatcher.dispatch(req)
  File "/home/user/Workspace/t11944/teo-rjollos.git/trac/web/main.py", line 222, in dispatch
    resp = chosen_handler.process_request(req)
  File "/home/user/Workspace/t11944/teo-rjollos.git/trac/admin/web_ui.py", line 120, in process_request
    path_info)
  File "/home/user/Workspace/t11944/teo-rjollos.git/trac/versioncontrol/admin.py", line 334, in render_admin_panel
    for (reponame, info) in all_repos.iteritems())
  File "/home/user/Workspace/t11944/teo-rjollos.git/trac/versioncontrol/admin.py", line 334, in <genexpr>
    for (reponame, info) in all_repos.iteritems())
  File "/home/user/Workspace/t11944/teo-rjollos.git/trac/versioncontrol/admin.py", line 356, in _extend_info
    youngest_rev = repos.get_youngest_rev()
AttributeError: 'NoneType' object has no attribute 'get_youngest_rev'

Attachments (0)

Change History (5)

comment:1 by Ryan J Ollos, 10 years ago

Reporter: changed from user1 to Ryan J Ollos

comment:2 by Ryan J Ollos, 10 years ago

Milestone: 1.0.41.0.5

comment:3 by Ryan J Ollos, 10 years ago

Status: newassigned

comment:4 by Ryan J Ollos, 10 years ago

Release Notes: modified (diff)

comment:5 by Ryan J Ollos, 10 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

I think the fix is pretty simple so I just went ahead and committed it to 1.0-stable in [13810], merged to trunk in [13811].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Ryan J Ollos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.