Changeset - 9f956354807b
[Not reviewed]
default
0 1 0
Marcin Kuzminski - 16 years ago 2010-04-11 00:11:56
marcin@python-blog.com
small fix for undefined contact
1 file changed with 1 insertions and 6 deletions:
0 comments (0 inline, 0 general)
pylons_app/model/hg_model.py
Show inline comments
 
@@ -6,26 +6,21 @@
 
'''
 
Created on Apr 9, 2010
 

	
 
@author: marcink
 
'''
 
import os
 
from pylons_app.lib.base import BaseController
 
from pylons import tmpl_context as c, app_globals as g, session, request, config
 
from pylons_app.lib import helpers as h
 
from mako.template import Template
 
from pylons.controllers.util import abort
 
from pylons_app.lib.base import BaseController, render
 
try:
 
    from vcs.backends.hg import get_repositories
 
except ImportError:
 
    print 'You have to import vcs module'
 
from mercurial.util import matchdate, Abort, makedate
 
from mercurial.hgweb.common import get_contact
 
from mercurial.templatefilters import age
 
from operator import itemgetter
 

	
 
class HgModel(object):
 
    """
 
    Mercurial Model
 
    """
 

	
 
@@ -62,11 +57,11 @@ class HgModel(object):
 
            tmp_d['description_sort'] = tmp_d['description']
 
            tmp_d['last_change'] = age(last_change)
 
            tmp_d['last_change_sort'] = last_change[1] - last_change[0]
 
            tmp_d['tip'] = str(tip)
 
            tmp_d['tip_sort'] = tip.rev()
 
            tmp_d['rev'] = tip.rev()
 
            tmp_d['contact'] = get_contact(r.ui.config)
 
            tmp_d['contact'] = get_contact(r.ui.config) or 'unknown'
 
            tmp_d['contact_sort'] = get_contact(r.ui.config)
 
            tmp_d['repo_archives'] = self.archivelist(r.ui, "tip", 'sa')
 
            
 
            yield tmp_d
0 comments (0 inline, 0 general)