##// END OF EJS Templates
implemented Shortlog as seperate controller,...
Marcin Kuzminski -
r83:db39d0ca default
parent child Browse files
Show More
@@ -0,0 +1,35 b''
1 import logging
2
3 from pylons import tmpl_context as c, app_globals as g, session, request, config, url
4 from pylons.controllers.util import abort, redirect
5
6 from pylons_app.lib.base import BaseController, render
7 from pylons_app.lib.utils import get_repo_slug
8 from pylons_app.model.hg_model import HgModel
9 from webhelpers.paginate import Page
10 log = logging.getLogger(__name__)
11
12 class ShortlogController(BaseController):
13 def __before__(self):
14 c.repos_prefix = config['repos_name']
15 c.staticurl = g.statics
16 c.repo_name = get_repo_slug(request)
17
18
19 def index(self):
20 hg_model = HgModel()
21 lim = 20
22 p = int(request.params.get('page', 1))
23 repo = hg_model.get_repo(c.repo_name)
24 cnt = repo.revisions[-1]
25 gen = repo.get_changesets(None)
26 repo_changesets = list(gen)
27 repo_changesets2 = list(gen)
28 repo_changesets3 = list(gen)
29 repo_changesets4 = list(gen)
30
31 c.repo_changesets = Page(repo_changesets, page=p, item_count=cnt, items_per_page=lim)
32 c.shortlog_data = render('shortlog_data.html')
33 if request.params.get('partial'):
34 return c.shortlog_data
35 return render('/shortlog.html')
@@ -0,0 +1,38 b''
1 <%inherit file="base/base.html"/>
2
3 <%def name="title()">
4 ${_('Repository managment')}
5 </%def>
6 <%def name="breadcrumbs()">
7 ${h.link_to(u'Home',h.url('/'))}
8 /
9 ${h.link_to(c.repo_name,h.url('shortlog_home',repo_name=c.repo_name))}
10 /
11 ${_('shortlog')}
12 </%def>
13 <%def name="page_nav()">
14 <form action="log">
15 <dl class="search">
16 <dt><label>Search: </label></dt>
17 <dd><input type="text" name="rev" /></dd>
18 </dl>
19 </form>
20
21 <ul class="page-nav">
22 <li>${h.link(_('summary'),h.url('summary_home',repo_name=c.repo_name))}</li>
23 <li class="current">${_('shortlog')}</li>
24 <li><a href="log">changelog</a></li>
25 <li><a href="graph/{node|short}">graph</a></li>
26 <li><a href="tags">tags</a></li>
27 <li><a href="branches">branches</a></li>
28 <li><a href="file/{node|short}">files</a></li>
29 </ul>
30 </%def>
31 <%def name="main()">
32
33 <h2 class="no-link no-border">${_('Shortlog')}</h2>
34
35 <div id="shortlog_data">
36 ${c.shortlog_data}
37 </div>
38 </%def> No newline at end of file
@@ -0,0 +1,32 b''
1 ## -*- coding: utf-8 -*-
2 <%!
3 from pylons_app.lib import filters
4 %>
5 <table>
6 %for cnt,cs in enumerate(c.repo_changesets):
7 <tr class="parity${cnt%2}">
8 <td>${cs._ctx.date()|n,filters.age}</td>
9 <td title="${cs.author}">${cs.author|n,filters.person}</td>
10 <td>${h.link_to(cs.message,h.url('rev/'+str(cs._ctx)))}</td>
11 <td class="nowrap">
12 ${h.link_to(_('changeset'),h.url('file/'+str(cs._ctx)))}
13 |
14 ${h.link_to(_('files'),h.url('file/'+str(cs._ctx)))}
15 </td>
16 </tr>
17 %endfor
18 <tr>
19 <script type="text/javascript">
20 var data_div = 'shortlog_data';
21 YAHOO.util.Event.onDOMReady(function(){
22 YAHOO.util.Event.addListener(YAHOO.util.Dom.getElementsByClassName('pager_link'),"click",function(){
23 YAHOO.util.Dom.setStyle('shortlog_data','opacity','0.3');});});
24 </script>
25 <td>${c.repo_changesets.pager('$link_previous ~2~ $link_next',
26 onclick="""YAHOO.util.Connect.asyncRequest('GET','$partial_url',{
27 success:function(o){YAHOO.util.Dom.get(data_div).innerHTML=o.responseText;
28 YAHOO.util.Event.addListener(YAHOO.util.Dom.getElementsByClassName('pager_link'),"click",function(){
29 YAHOO.util.Dom.setStyle(data_div,'opacity','0.3');});
30 YAHOO.util.Dom.setStyle(data_div,'opacity','1');}},null); return false;""")}</td>
31 </tr>
32 </table> No newline at end of file
@@ -0,0 +1,7 b''
1 from pylons_app.tests import *
2
3 class TestShortlogController(TestController):
4
5 def test_index(self):
6 response = self.app.get(url(controller='shortlog', action='index'))
7 # Test response...
@@ -1,118 +1,119 b''
1 1 ################################################################################
2 2 ################################################################################
3 3 # pylons_app - Pylons environment configuration #
4 4 # #
5 5 # The %(here)s variable will be replaced with the parent directory of this file#
6 6 ################################################################################
7 7
8 8 [DEFAULT]
9 9 debug = true
10 10 ############################################
11 11 ## Uncomment and replace with the address ##
12 12 ## which should receive any error reports ##
13 13 ############################################
14 14 #email_to = marcin.kuzminski@etelko.pl
15 15 #smtp_server = mail.etelko.pl
16 16 #error_email_from = paste_error@localhost
17 17 #smtp_username =
18 18 #smtp_password =
19 19 #error_message = 'mercurial crash !'
20 20
21 21 [server:main]
22 threadpool_workers = 5
22 23 use = egg:Paste#http
23 24 host = 127.0.0.1
24 25 port = 5000
25 26
26 27 [app:main]
27 28 use = egg:pylons_app
28 29 full_stack = true
29 30 static_files = true
30 31 lang=en
31 32 cache_dir = %(here)s/data
32 33 repos_name = Python-works
33 34
34 35 ####################################
35 36 ### BEAKER CACHE ####
36 37 ####################################
37 38 beaker.cache.data_dir=/tmp/cache/data
38 39 beaker.cache.lock_dir=/tmp/cache/lock
39 40 beaker.cache.regions=short_term
40 41 beaker.cache.short_term.type=memory
41 42 beaker.cache.short_term.expire=3600
42 43
43 44 ################################################################################
44 45 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
45 46 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
46 47 ## execute malicious code after an exception is raised. ##
47 48 ################################################################################
48 49 #set debug = false
49 50
50 51 ##################################
51 52 ### LOGVIEW CONFIG ###
52 53 ##################################
53 54 logview.sqlalchemy = #faa
54 55 logview.pylons.templating = #bfb
55 56 logview.pylons.util = #eee
56 57
57 58 #########################################################
58 59 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
59 60 #########################################################
60 61 sqlalchemy.db1.url = sqlite:///%(here)s/hg_app.db
61 62 #sqlalchemy.db1.echo = True
62 63 #sqlalchemy.db1.pool_recycle = 3600
63 64 sqlalchemy.convert_unicode = true
64 65
65 66 ################################
66 67 ### LOGGING CONFIGURATION ####
67 68 ################################
68 69 [loggers]
69 70 keys = root, routes, pylons_app, sqlalchemy
70 71
71 72 [handlers]
72 73 keys = console
73 74
74 75 [formatters]
75 76 keys = generic
76 77
77 78 #############
78 79 ## LOGGERS ##
79 80 #############
80 81 [logger_root]
81 82 level = NOTSET
82 83 handlers = console
83 84
84 85 [logger_routes]
85 86 level = DEBUG
86 87 handlers = console
87 88 qualname = routes.middleware
88 89 # "level = DEBUG" logs the route matched and routing variables.
89 90
90 91 [logger_pylons_app]
91 92 level = DEBUG
92 93 handlers = console
93 94 qualname = pylons_app
94 95
95 96
96 97 [logger_sqlalchemy]
97 98 level = DEBUG
98 99 handlers = console
99 100 qualname = sqlalchemy.engine
100 101
101 102 ##############
102 103 ## HANDLERS ##
103 104 ##############
104 105
105 106 [handler_console]
106 107 class = StreamHandler
107 108 args = (sys.stderr,)
108 109 level = NOTSET
109 110 formatter = generic
110 111
111 112 ################
112 113 ## FORMATTERS ##
113 114 ################
114 115
115 116 [formatter_generic]
116 117 format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
117 118 datefmt = %Y-%m-%d %H:%M:%S
118 119
@@ -1,118 +1,119 b''
1 1 ################################################################################
2 2 ################################################################################
3 3 # pylons_app - Pylons environment configuration #
4 4 # #
5 5 # The %(here)s variable will be replaced with the parent directory of this file#
6 6 ################################################################################
7 7
8 8 [DEFAULT]
9 9 debug = true
10 10 ############################################
11 11 ## Uncomment and replace with the address ##
12 12 ## which should receive any error reports ##
13 13 ############################################
14 14 #email_to = marcin.kuzminski@etelko.pl
15 15 #smtp_server = mail.etelko.pl
16 16 #error_email_from = paste_error@localhost
17 17 #smtp_username =
18 18 #smtp_password =
19 19 #error_message = 'mercurial crash !'
20 20
21 21 [server:main]
22 threadpool_workers = 10
22 23 use = egg:Paste#http
23 24 host = 127.0.0.1
24 25 port = 8001
25 26
26 27 [app:main]
27 28 use = egg:pylons_app
28 29 full_stack = true
29 30 static_files = true
30 31 lang=en
31 32 cache_dir = %(here)s/data
32 33 repos_name = Python-works
33 34
34 35 ####################################
35 36 ### BEAKER CACHE ####
36 37 ####################################
37 38 beaker.cache.data_dir=/tmp/cache/data
38 39 beaker.cache.lock_dir=/tmp/cache/lock
39 40 beaker.cache.regions=short_term
40 41 beaker.cache.short_term.type=memory
41 42 beaker.cache.short_term.expire=3600
42 43
43 44 ################################################################################
44 45 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
45 46 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
46 47 ## execute malicious code after an exception is raised. ##
47 48 ################################################################################
48 49 #set debug = false
49 50
50 51 ##################################
51 52 ### LOGVIEW CONFIG ###
52 53 ##################################
53 54 logview.sqlalchemy = #faa
54 55 logview.pylons.templating = #bfb
55 56 logview.pylons.util = #eee
56 57
57 58 #########################################################
58 59 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
59 60 #########################################################
60 61 sqlalchemy.db1.url = sqlite:///%(here)s/hg_app.db
61 62 #sqlalchemy.db1.echo = True
62 63 #sqlalchemy.db1.pool_recycle = 3600
63 64 sqlalchemy.convert_unicode = true
64 65
65 66 ################################
66 67 ### LOGGING CONFIGURATION ####
67 68 ################################
68 69 [loggers]
69 70 keys = root, routes, pylons_app, sqlalchemy
70 71
71 72 [handlers]
72 73 keys = console
73 74
74 75 [formatters]
75 76 keys = generic
76 77
77 78 #############
78 79 ## LOGGERS ##
79 80 #############
80 81 [logger_root]
81 82 level = INFO
82 83 handlers = console
83 84
84 85 [logger_routes]
85 86 level = INFO
86 87 handlers = console
87 88 qualname = routes.middleware
88 89 # "level = DEBUG" logs the route matched and routing variables.
89 90
90 91 [logger_pylons_app]
91 92 level = DEBUG
92 93 handlers = console
93 94 qualname = pylons_app
94 95
95 96
96 97 [logger_sqlalchemy]
97 98 level = DEBUG
98 99 handlers = console
99 100 qualname = sqlalchemy.engine
100 101
101 102 ##############
102 103 ## HANDLERS ##
103 104 ##############
104 105
105 106 [handler_console]
106 107 class = StreamHandler
107 108 args = (sys.stderr,)
108 109 level = NOTSET
109 110 formatter = generic
110 111
111 112 ################
112 113 ## FORMATTERS ##
113 114 ################
114 115
115 116 [formatter_generic]
116 117 format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
117 118 datefmt = %Y-%m-%d %H:%M:%S
118 119
@@ -1,38 +1,39 b''
1 1 """Routes configuration
2 2
3 3 The more specific and detailed routes should be defined first so they
4 4 may take precedent over the more generic routes. For more information
5 5 refer to the routes manual at http://routes.groovie.org/docs/
6 6 """
7 7 from routes import Mapper
8 8
9 9 def make_map(config):
10 10 """Create, configure and return the routes Mapper"""
11 11 map = Mapper(directory=config['pylons.paths']['controllers'],
12 12 always_scan=config['debug'])
13 13 map.minimization = False
14 14 map.explicit = False
15 15
16 16 # The ErrorController route (handles 404/500 error pages); it should
17 17 # likely stay at the top, ensuring it can always be resolved
18 18 map.connect('/error/{action}', controller='error')
19 19 map.connect('/error/{action}/{id}', controller='error')
20 20
21 21 # CUSTOM ROUTES HERE
22 22 map.connect('hg_home', '/', controller='hg', action='index')
23 23
24 24 map.resource('repo', 'repos', path_prefix='/_admin')
25 25 map.resource('user', 'users', path_prefix='/_admin')
26 26
27 27
28 28 with map.submapper(path_prefix='/_admin', controller='admin') as m:
29 29 m.connect('admin_home', '/', action='index')#main page
30 30 m.connect('admin_add_repo', '/add_repo/{new_repo:[a-z0-9\. _-]*}', action='add_repo')
31 31
32 32
33 33 map.connect('summary_home', '/{repo_name}/_summary', controller='summary')
34 map.connect('shortlog_home', '/{repo_name}/_shortlog', controller='shortlog')
34 35
35 36 map.connect('hg', '/{path_info:.*}', controller='hg',
36 37 action="view", path_info='/')
37 38
38 39 return map
@@ -1,14 +1,15 b''
1 1 from mercurial import util
2 from mercurial.templatefilters import age as _age
2 from mercurial.templatefilters import age as _age, person as _person
3 3
4 age = lambda context, x:_age(x)
4 age = lambda x:_age(x)
5 5 capitalize = lambda x: x.capitalize()
6 6 date = lambda x: util.datestr(x)
7 7 email = util.email
8 hgdate = lambda context, x: "%d %d" % x
9 isodate = lambda context, x: util.datestr(x, '%Y-%m-%d %H:%M %1%2')
10 isodatesec = lambda context, x: util.datestr(x, '%Y-%m-%d %H:%M:%S %1%2')
11 localdate = lambda context, x: (x[0], util.makedate()[1])
12 rfc822date = lambda context, x: util.datestr(x, "%a, %d %b %Y %H:%M:%S %1%2")
13 rfc3339date = lambda context, x: util.datestr(x, "%Y-%m-%dT%H:%M:%S%1:%2")
14 time_ago = lambda context, x: util.datestr(_age(x), "%a, %d %b %Y %H:%M:%S %1%2")
8 person = lambda x: _person(x)
9 hgdate = lambda x: "%d %d" % x
10 isodate = lambda x: util.datestr(x, '%Y-%m-%d %H:%M %1%2')
11 isodatesec = lambda x: util.datestr(x, '%Y-%m-%d %H:%M:%S %1%2')
12 localdate = lambda x: (x[0], util.makedate()[1])
13 rfc822date = lambda x: util.datestr(x, "%a, %d %b %Y %H:%M:%S %1%2")
14 rfc3339date = lambda x: util.datestr(x, "%Y-%m-%dT%H:%M:%S%1:%2")
15 time_ago = lambda x: util.datestr(_age(x), "%a, %d %b %Y %H:%M:%S %1%2")
@@ -1,29 +1,38 b''
1 ## -*- coding: utf-8 -*-
1 2 %if c.users_log:
2 3 <table>
3 4 <tr>
4 5 <td>${_('Username')}</td>
5 6 <td>${_('Repository')}</td>
6 7 <td>${_('Action')}</td>
7 8 <td>${_('Date')}</td>
8 9 </tr>
9 10
10 11 %for cnt,l in enumerate(c.users_log):
11 12 <tr class="parity${cnt%2}">
12 13 <td>${l.user.username}</td>
13 14 <td>${l.repository}</td>
14 15 <td>${l.action}</td>
15 16 <td>${l.action_date}</td>
16 17 </tr>
17 18 %endfor
18 19
19 20 <tr>
21 <script type="text/javascript">
22 var data_div = 'user_log';
23 YAHOO.util.Event.onDOMReady(function(){
24 YAHOO.util.Event.addListener(YAHOO.util.Dom.getElementsByClassName('pager_link'),"click",function(){
25 YAHOO.util.Dom.setStyle('shortlog_data','opacity','0.3');});});
26 </script>
20 27 <td>${c.users_log.pager('$link_previous ~2~ $link_next',
21 28 onclick="""YAHOO.util.Connect.asyncRequest('GET','$partial_url',{
22 success:function(o){YAHOO.util.Dom.get('user_log').innerHTML=o.responseText;}
23 },null); return false;""")}</td>
24 </tr>
29 success:function(o){YAHOO.util.Dom.get(data_div).innerHTML=o.responseText;
30 YAHOO.util.Event.addListener(YAHOO.util.Dom.getElementsByClassName('pager_link'),"click",function(){
31 YAHOO.util.Dom.setStyle(data_div,'opacity','0.3');});
32 YAHOO.util.Dom.setStyle(data_div,'opacity','1');}},null); return false;""")}</td>
33 </tr>
25 34 </table>
26 35
27 36 %else:
28 37 ${_('No actions yet')}
29 38 %endif
@@ -1,49 +1,46 b''
1 1 ## -*- coding: utf-8 -*-
2 ##filters definition
3 <%namespace name="f" module="pylons_app.lib.filters" inheritable="True"/>
4
5 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
6 3 <html xmlns="http://www.w3.org/1999/xhtml">
7 4 <head>
8 5 <link rel="icon" href="${c.staticurl}hgicon.png" type="image/png" />
9 6 <meta name="robots" content="index, nofollow"/>
10 7 <link rel="stylesheet" href="${c.staticurl}style-monoblue.css" type="text/css" />
11 8 <title>${next.title()}</title>
12 9 ${self.js()}
13 10 </head>
14 11
15 12 <body>
16 13 <div id="container">
17 14 <div class="page-header">
18 15 <h1>
19 16 ${next.breadcrumbs()}
20 17 </h1>
21 18 <ul class="page-nav">
22 19 ${next.page_nav()}
23 20 </ul>
24 21 </div>
25 22 ${next.main()}
26 23 <div class="page-footer">
27 24 Mercurial App &copy; 2010
28 25 </div>
29 26
30 27 <div id="powered-by">
31 28 <p>
32 29 <a href="http://mercurial.selenic.com/" title="Mercurial">
33 30 <img src="${c.staticurl}hglogo.png" width="75" height="90" alt="mercurial"/></a>
34 31 </p>
35 32 </div>
36 33
37 34 <div id="corner-top-left"></div>
38 35 <div id="corner-top-right"></div>
39 36 <div id="corner-bottom-left"></div>
40 37 <div id="corner-bottom-right"></div>
41 38
42 39 </div>
43 40 </body>
44 41 </html>
45 42
46 43
47 44 <%def name="js()">
48 45 <script type="text/javascript" src="/js/yui/utilities/utilities.js"></script>
49 46 </%def> No newline at end of file
@@ -1,58 +1,60 b''
1 1 ## -*- coding: utf-8 -*-
2
2 <%!
3 from pylons_app.lib import filters
4 %>
3 5 <%inherit file="base/base.html"/>
4 6 <%def name="title()">
5 7 ${c.repos_prefix} Mercurial Repositories
6 8 </%def>
7 9 <%def name="breadcrumbs()">
8 10 ${c.repos_prefix} Mercurial Repositories
9 11 </%def>
10 12 <%def name="page_nav()">
11 13 <li class="current">${_('Home')}</li>
12 14 <li>${h.link_to(u'Admin',h.url('admin_home'))}</li>
13 15 </%def>
14 16 <%def name="main()">
15 17 <%def name="get_sort(name)">
16 18 <%name_slug = name.lower().replace(' ','_') %>
17 19 %if name_slug == c.cs_slug:
18 20 <span style="font-weight: bold;color:#006699">${name}</span>
19 21 %else:
20 22 <span style="font-weight: bold">${name}</span>
21 23 %endif
22 24
23 25 <a href="?sort=${name_slug}">&darr;</a>
24 26 <a href="?sort=-${name_slug}">&uarr;</a>
25 27
26 28 </%def>
27 29 <table>
28 30 <tr>
29 31 <td>${get_sort(_('Name'))}</td>
30 32 <td>${get_sort(_('Description'))}</td>
31 33 <td>${get_sort(_('Last change'))}</td>
32 34 <td>${get_sort(_('Tip'))}</td>
33 35 <td>${get_sort(_('Contact'))}</td>
34 36 <td></td>
35 37 <td></td>
36 38 </tr>
37 39 %for cnt,repo in enumerate(c.repos_list):
38 40 <tr class="parity${cnt%2}">
39 41 <td>${h.link(repo['name'],h.url('summary_home',repo_name=repo['name']))}</td>
40 42 <td>${repo['description']}</td>
41 <td>${repo['last_change']|n,self.f.age}</td>
43 <td>${repo['last_change']|n,filters.age}</td>
42 44 <td>r${repo['rev']}:<a href="/${repo['name']}/rev/${repo['tip']}/">${repo['tip']}</a></td>
43 45 <td>${repo['contact']}</td>
44 46 <td class="indexlinks">
45 47 %for archive in repo['repo_archives']:
46 48 <a href="/${repo['name']}/archive/${archive['node']}${archive['extension']}">${archive['type']}</a>
47 49 %endfor
48 50 </td>
49 51 <td>
50 52 <div class="rss_logo">
51 53 <a href="/${repo['name']}/rss-log">RSS</a>
52 54 <a href="/${repo['name']}/atom-log">Atom</a>
53 55 </div>
54 56 </td>
55 57 </tr>
56 58 %endfor
57 59 </table>
58 60 </%def>
@@ -1,95 +1,97 b''
1 1 <%inherit file="base/base.html"/>
2
2 <%!
3 from pylons_app.lib import filters
4 %>
3 5 <%def name="title()">
4 6 ${_('Repository managment')}
5 7 </%def>
6 8 <%def name="breadcrumbs()">
7 9 ${h.link_to(u'Home',h.url('/'))}
8 10 /
9 11 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
10 12 /
11 13 ${_('summary')}
12 14 </%def>
13 15 <%def name="page_nav()">
14 16 <form action="log">
15 17 <dl class="search">
16 18 <dt><label>Search: </label></dt>
17 19 <dd><input type="text" name="rev" /></dd>
18 20 </dl>
19 21 </form>
20 22
21 23 <ul class="page-nav">
22 <li class="current">summary</li>
23 <li><a href="shortlog">shortlog</a></li>
24 <li class="current">${_('summary')}</li>
25 <li>${h.link(_('shortlog'),h.url('shortlog_home',repo_name=c.repo_name))}</li>
24 26 <li><a href="log">changelog</a></li>
25 27 <li><a href="graph/{node|short}">graph</a></li>
26 28 <li><a href="tags">tags</a></li>
27 29 <li><a href="branches">branches</a></li>
28 30 <li><a href="file/{node|short}">files</a></li>
29 31 </ul>
30 32 </%def>
31 33 <%def name="main()">
32 34
33 35 <h2 class="no-link no-border">${_('Mercurial Repository Overview')}</h2>
34 36 <dl class="overview">
35 37 <dt>${_('name')}</dt>
36 38 <dd>${c.repo_info.name}</dd>
37 39 <dt>${_('description')}</dt>
38 40 <dd>${c.repo_info.description}</dd>
39 41 <dt>${_('contact')}</dt>
40 42 <dd>${c.repo_info.contact}</dd>
41 43 <dt>${_('last change')}</dt>
42 <dd>${c.repo_info.last_change|n,self.f.rfc822date} - ${c.repo_info.last_change|n,self.f.age}</dd>
44 <dd>${c.repo_info.last_change|n,filters.rfc822date} - ${c.repo_info.last_change|n,filters.age}</dd>
43 45 <dt>${_('url')}</dt>
44 46 <dd><pre>$ hg clone <a href="${c.clone_repo_url}">${c.clone_repo_url}</a></pre></dd>
45 47 <dt>${_('Download')}</dt>
46 48 <dd>
47 49 %for archive in c.repo_info._get_archives():
48 50 | <a href="/${c.repo_info.name}/archive/${archive['node']}${archive['extension']}">
49 51 ${c.repo_info.name}.${archive['type']}
50 52 </a>
51 53 %endfor
52 54 |
53 55 </dd>
54 56 </dl>
55 57
56 58 <h2><a href="{url}shortlog">Changes</a></h2>
57 59 <table>
58 60 %for cnt,cs in enumerate(c.repo_changesets):
59 61 <tr class="parity${cnt%2}">
60 <td>${cs._ctx.date()|n,self.f.age}</td>
62 <td>${cs._ctx.date()|n,filters.age}</td>
61 63 <td>${cs.author}</td>
62 64 <td>${h.link_to(cs.message,h.url('rev/'+str(cs._ctx)))}</td>
63 65 <td class="nowrap">
64 66 ${h.link_to(_('changeset'),h.url('file/'+str(cs._ctx)))}
65 67 |
66 68 ${h.link_to(_('files'),h.url('file/'+str(cs._ctx)))}
67 69 </td>
68 70 </tr>
69 71 %endfor
70 72 <tr class="light">
71 73 <td colspan="4"><a class="list" href="shortlog">...</a></td>
72 74 </tr>
73 75 </table>
74 76
75 77 <h2><a href="{url}tags">${_('Tags')}</a></h2>
76 78 <table>
77 79 %for tag in c.repo_tags:
78 80 ${tag}
79 81 %endfor
80 82 <tr class="light">
81 83 <td colspan="3"><a class="list" href="tags">...</a></td>
82 84 </tr>
83 85 </table>
84 86
85 87 <h2 class="no-link">Branches</h2>
86 88 <table>
87 89 %for branch in c.repo_branches:
88 90 ${branch}
89 91 %endfor
90 92 <tr class="light">
91 93 <td colspan="4"><a class="list" href="branches">...</a></td>
92 94 </tr>
93 95 </table>
94 96
95 97 </%def> No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now