Show More
@@ -4,7 +4,7 b' import os' | |||
|
4 | 4 | import ConfigParser |
|
5 | 5 | root = os.getcwd() |
|
6 | 6 | |
|
7 |
PYLONS_CONFIG_NAME = ' |
|
|
7 | PYLONS_CONFIG_NAME = 'production.ini' | |
|
8 | 8 | |
|
9 | 9 | sys.path.append(root) |
|
10 | 10 | config = ConfigParser.ConfigParser({'here':root}) |
@@ -65,7 +65,7 b' class ChangesetController(BaseController' | |||
|
65 | 65 | diff = differ.DiffProcessor(f_udiff).as_html() |
|
66 | 66 | |
|
67 | 67 | cs1 = None |
|
68 |
cs2 = node.last_changeset. |
|
|
68 | cs2 = node.last_changeset.short_id | |
|
69 | 69 | c.changes.append(('added', node, diff, cs1, cs2)) |
|
70 | 70 | |
|
71 | 71 | for node in c.changeset.changed: |
@@ -76,8 +76,8 b' class ChangesetController(BaseController' | |||
|
76 | 76 | f_udiff = differ.get_udiff(filenode_old, node) |
|
77 | 77 | diff = differ.DiffProcessor(f_udiff).as_html() |
|
78 | 78 | |
|
79 |
cs1 = filenode_old.last_changeset. |
|
|
80 |
cs2 = node.last_changeset. |
|
|
79 | cs1 = filenode_old.last_changeset.short_id | |
|
80 | cs2 = node.last_changeset.short_id | |
|
81 | 81 | c.changes.append(('changed', node, diff, cs1, cs2)) |
|
82 | 82 | |
|
83 | 83 | for node in c.changeset.removed: |
@@ -110,7 +110,7 b' class ChangesetController(BaseController' | |||
|
110 | 110 | diff = differ.DiffProcessor(f_udiff).raw_diff() |
|
111 | 111 | |
|
112 | 112 | cs1 = None |
|
113 |
cs2 = node.last_changeset. |
|
|
113 | cs2 = node.last_changeset.short_id | |
|
114 | 114 | c.changes.append(('added', node, diff, cs1, cs2)) |
|
115 | 115 | |
|
116 | 116 | for node in c.changeset.changed: |
@@ -121,8 +121,8 b' class ChangesetController(BaseController' | |||
|
121 | 121 | f_udiff = differ.get_udiff(filenode_old, node) |
|
122 | 122 | diff = differ.DiffProcessor(f_udiff).raw_diff() |
|
123 | 123 | |
|
124 |
cs1 = filenode_old.last_changeset. |
|
|
125 |
cs2 = node.last_changeset. |
|
|
124 | cs1 = filenode_old.last_changeset.short_id | |
|
125 | cs2 = node.last_changeset.short_id | |
|
126 | 126 | c.changes.append(('changed', node, diff, cs1, cs2)) |
|
127 | 127 | |
|
128 | 128 | response.content_type = 'text/plain' |
@@ -54,7 +54,7 b' class FeedController(BaseController):' | |||
|
54 | 54 | for cs in changesets[:self.feed_nr]: |
|
55 | 55 | feed.add_item(title=cs.message, |
|
56 | 56 | link=url('changeset_home', repo_name=repo_name, |
|
57 |
revision=cs. |
|
|
57 | revision=cs.short_id, qualified=True), | |
|
58 | 58 | description=str(cs.date)) |
|
59 | 59 | |
|
60 | 60 | response.content_type = feed.mime_type |
@@ -73,7 +73,7 b' class FeedController(BaseController):' | |||
|
73 | 73 | for cs in changesets[:self.feed_nr]: |
|
74 | 74 | feed.add_item(title=cs.message, |
|
75 | 75 | link=url('changeset_home', repo_name=repo_name, |
|
76 |
revision=cs. |
|
|
76 | revision=cs.short_id, qualified=True), | |
|
77 | 77 | description=str(cs.date)) |
|
78 | 78 | |
|
79 | 79 | response.content_type = feed.mime_type |
@@ -68,8 +68,8 b' class FilesController(BaseController):' | |||
|
68 | 68 | |
|
69 | 69 | try: |
|
70 | 70 | cur_rev = repo.get_changeset(revision).revision |
|
71 |
prev_rev = repo.get_changeset(get_prev_rev(cur_rev)). |
|
|
72 |
next_rev = repo.get_changeset(get_next_rev(cur_rev)). |
|
|
71 | prev_rev = repo.get_changeset(get_prev_rev(cur_rev)).short_id | |
|
72 | next_rev = repo.get_changeset(get_next_rev(cur_rev)).short_id | |
|
73 | 73 | |
|
74 | 74 | c.url_prev = url('files_home', repo_name=c.repo_name, |
|
75 | 75 | revision=prev_rev, f_path=f_path) |
@@ -78,7 +78,7 b' class FilesController(BaseController):' | |||
|
78 | 78 | |
|
79 | 79 | c.changeset = repo.get_changeset(revision) |
|
80 | 80 | |
|
81 |
c.cur_rev = c.changeset. |
|
|
81 | c.cur_rev = c.changeset.short_id | |
|
82 | 82 | c.rev_nr = c.changeset.revision |
|
83 | 83 | c.files_list = c.changeset.get_node(f_path) |
|
84 | 84 | c.file_history = self._get_history(repo, c.files_list, f_path) |
@@ -111,7 +111,7 b' class FilesController(BaseController):' | |||
|
111 | 111 | cs = c.repo.get_changeset(revision) |
|
112 | 112 | c.file = cs.get_node(f_path) |
|
113 | 113 | c.file_msg = cs.get_file_message(f_path) |
|
114 |
c.cur_rev = cs. |
|
|
114 | c.cur_rev = cs.short_id | |
|
115 | 115 | c.rev_nr = cs.revision |
|
116 | 116 | c.f_path = f_path |
|
117 | 117 | |
@@ -171,8 +171,8 b' class FilesController(BaseController):' | |||
|
171 | 171 | return redirect(url('files_home', |
|
172 | 172 | repo_name=c.repo_name, f_path=f_path)) |
|
173 | 173 | |
|
174 |
c.diff1 = 'r%s:%s' % (c.changeset_1.revision, c.changeset_1. |
|
|
175 |
c.diff2 = 'r%s:%s' % (c.changeset_2.revision, c.changeset_2. |
|
|
174 | c.diff1 = 'r%s:%s' % (c.changeset_1.revision, c.changeset_1.short_id) | |
|
175 | c.diff2 = 'r%s:%s' % (c.changeset_2.revision, c.changeset_2.short_id) | |
|
176 | 176 | f_udiff = differ.get_udiff(node1, node2) |
|
177 | 177 | |
|
178 | 178 | diff = differ.DiffProcessor(f_udiff) |
@@ -202,6 +202,6 b' class FilesController(BaseController):' | |||
|
202 | 202 | changesets = node.history |
|
203 | 203 | hist_l = [] |
|
204 | 204 | for chs in changesets: |
|
205 |
n_desc = 'r%s:%s' % (chs.revision, chs. |
|
|
206 |
hist_l.append((chs. |
|
|
205 | n_desc = 'r%s:%s' % (chs.revision, chs.short_id) | |
|
206 | hist_l.append((chs.short_id, n_desc,)) | |
|
207 | 207 | return hist_l |
@@ -271,12 +271,12 b' def pygmentize_annotation(filenode, **kw' | |||
|
271 | 271 | changeset.date, |
|
272 | 272 | tooltip(changeset.message)) |
|
273 | 273 | lnk_format = 'r%-5s:%s' % (changeset.revision, |
|
274 |
changeset. |
|
|
274 | changeset.short_id) | |
|
275 | 275 | uri = link_to( |
|
276 | 276 | lnk_format, |
|
277 | 277 | url('changeset_home', repo_name=changeset.repository.name, |
|
278 |
revision=changeset. |
|
|
279 |
style=get_color_string(changeset. |
|
|
278 | revision=changeset.short_id), | |
|
279 | style=get_color_string(changeset.short_id), | |
|
280 | 280 | class_='tooltip', |
|
281 | 281 | tooltip_title=tooltip_html |
|
282 | 282 | ) |
@@ -155,7 +155,7 b' class HgModel(object):' | |||
|
155 | 155 | tmp_d['description_sort'] = tmp_d['description'] |
|
156 | 156 | tmp_d['last_change'] = last_change |
|
157 | 157 | tmp_d['last_change_sort'] = last_change[1] - last_change[0] |
|
158 |
tmp_d['tip'] = tip. |
|
|
158 | tmp_d['tip'] = tip.short_id | |
|
159 | 159 | tmp_d['tip_sort'] = tip.revision |
|
160 | 160 | tmp_d['rev'] = tip.revision |
|
161 | 161 | tmp_d['contact'] = repo.contact |
@@ -9,17 +9,17 b'' | |||
|
9 | 9 | %for cnt,branch in enumerate(c.repo_branches.items()): |
|
10 | 10 | <tr class="parity${cnt%2}"> |
|
11 | 11 | <td>${h.age(branch[1]._ctx.date())}</td> |
|
12 |
<td>r${branch[1].revision}:${branch[1]. |
|
|
12 | <td>r${branch[1].revision}:${branch[1].short_id}</td> | |
|
13 | 13 | <td> |
|
14 | 14 | <span class="logtags"> |
|
15 | 15 | <span class="branchtag">${h.link_to(branch[0], |
|
16 |
h.url('changeset_home',repo_name=c.repo_name,revision=branch[1]. |
|
|
16 | h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].short_id))}</span> | |
|
17 | 17 | </span> |
|
18 | 18 | </td> |
|
19 | 19 | <td class="nowrap"> |
|
20 |
${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=branch[1]. |
|
|
20 | ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].short_id))} | |
|
21 | 21 | | |
|
22 |
${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=branch[1]. |
|
|
22 | ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=branch[1].short_id))} | |
|
23 | 23 | </td> |
|
24 | 24 | </tr> |
|
25 | 25 | %endfor |
@@ -46,7 +46,7 b'' | |||
|
46 | 46 | %for cnt,cs in enumerate(c.pagination): |
|
47 | 47 | <div id="chg_${cnt+1}" class="container"> |
|
48 | 48 | <div class="left"> |
|
49 |
<div class="date">${_('commit')} ${cs.revision}: ${cs. |
|
|
49 | <div class="date">${_('commit')} ${cs.revision}: ${cs.short_id}@${cs.date}</div> | |
|
50 | 50 | <span class="logtags"> |
|
51 | 51 | <span class="branchtag">${cs.branch}</span> |
|
52 | 52 | %for tag in cs.tags: |
@@ -62,7 +62,7 b'' | |||
|
62 | 62 | </div> |
|
63 | 63 | <div class="message"> |
|
64 | 64 | ${h.link_to(h.wrap_paragraphs(cs.message), |
|
65 |
h.url('changeset_home',repo_name=c.repo_name,revision=cs. |
|
|
65 | h.url('changeset_home',repo_name=c.repo_name,revision=cs.short_id))} | |
|
66 | 66 | </div> |
|
67 | 67 | </div> |
|
68 | 68 | <div class="right"> |
@@ -77,8 +77,8 b'' | |||
|
77 | 77 | </div> |
|
78 | 78 | %endif |
|
79 | 79 | %for p_cs in reversed(cs.parents): |
|
80 |
<div class="parent">${_('Parent')} ${p_cs.revision}: ${h.link_to(p_cs. |
|
|
81 |
h.url('changeset_home',repo_name=c.repo_name,revision=p_cs. |
|
|
80 | <div class="parent">${_('Parent')} ${p_cs.revision}: ${h.link_to(p_cs.short_id, | |
|
81 | h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.short_id),title=p_cs.message)} | |
|
82 | 82 | </div> |
|
83 | 83 | %endfor |
|
84 | 84 | </div> |
@@ -9,7 +9,7 b'' | |||
|
9 | 9 | » |
|
10 | 10 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
11 | 11 | » |
|
12 |
${_('Changeset')} - r${c.changeset.revision}:${c.changeset. |
|
|
12 | ${_('Changeset')} - r${c.changeset.revision}:${c.changeset.short_id} | |
|
13 | 13 | </%def> |
|
14 | 14 | |
|
15 | 15 | <%def name="page_nav()"> |
@@ -26,11 +26,11 b'' | |||
|
26 | 26 | <div id="body" class="diffblock"> |
|
27 | 27 | <div class="code-header"> |
|
28 | 28 | <div> |
|
29 |
${_('Changeset')} - r${c.changeset.revision}:${c.changeset. |
|
|
29 | ${_('Changeset')} - r${c.changeset.revision}:${c.changeset.short_id} | |
|
30 | 30 | » <span>${h.link_to(_('raw diff'), |
|
31 |
h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset. |
|
|
31 | h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.short_id,diff='show'))}</span> | |
|
32 | 32 | » <span>${h.link_to(_('download diff'), |
|
33 |
h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset. |
|
|
33 | h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.short_id,diff='download'))}</span> | |
|
34 | 34 | </div> |
|
35 | 35 | </div> |
|
36 | 36 | </div> |
@@ -56,8 +56,8 b'' | |||
|
56 | 56 | </div> |
|
57 | 57 | %endif |
|
58 | 58 | %for p_cs in reversed(c.changeset.parents): |
|
59 |
<div class="parent">${_('Parent')} ${p_cs.revision}: ${h.link_to(p_cs. |
|
|
60 |
h.url('changeset_home',repo_name=c.repo_name,revision=p_cs. |
|
|
59 | <div class="parent">${_('Parent')} ${p_cs.revision}: ${h.link_to(p_cs.short_id, | |
|
60 | h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.short_id),title=p_cs.message)} | |
|
61 | 61 | </div> |
|
62 | 62 | %endfor |
|
63 | 63 | </div> |
@@ -78,7 +78,7 b'' | |||
|
78 | 78 | <div> |
|
79 | 79 | <span> |
|
80 | 80 | ${h.link_to_if(change!='removed',filenode.path,h.url('files_home',repo_name=c.repo_name, |
|
81 |
revision=filenode.changeset. |
|
|
81 | revision=filenode.changeset.short_id,f_path=filenode.path))} | |
|
82 | 82 | </span> |
|
83 | 83 | %if 1: |
|
84 | 84 | » <span>${h.link_to(_('diff'), |
@@ -26,8 +26,8 b'' | |||
|
26 | 26 | <h3 class="files_location">${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cur_rev,c.file.path)}</h3> |
|
27 | 27 | <dl class="overview"> |
|
28 | 28 | <dt>${_('Last revision')}</dt> |
|
29 |
<dd>${h.link_to("r%s:%s" % (c.file.last_changeset.revision,c.file.last_changeset. |
|
|
30 |
h.url('files_annotate_home',repo_name=c.repo_name,revision=c.file.last_changeset. |
|
|
29 | <dd>${h.link_to("r%s:%s" % (c.file.last_changeset.revision,c.file.last_changeset.short_id), | |
|
30 | h.url('files_annotate_home',repo_name=c.repo_name,revision=c.file.last_changeset.short_id,f_path=c.f_path))} </dd> | |
|
31 | 31 | <dt>${_('Size')}</dt> |
|
32 | 32 | <dd>${h.format_byte_size(c.file.size,binary=True)}</dd> |
|
33 | 33 | <dt>${_('Mimetype')}</dt> |
@@ -43,7 +43,7 b'' | |||
|
43 | 43 | </dl> |
|
44 | 44 | <div id="body" class="codeblock"> |
|
45 | 45 | <div class="code-header"> |
|
46 |
<div class="revision">${c.file.name}@r${c.file.last_changeset.revision}:${c.file.last_changeset. |
|
|
46 | <div class="revision">${c.file.name}@r${c.file.last_changeset.revision}:${c.file.last_changeset.short_id}</div> | |
|
47 | 47 | <div class="commit">"${c.file_msg}"</div> |
|
48 | 48 | </div> |
|
49 | 49 | <div class="code-body"> |
@@ -1,8 +1,8 b'' | |||
|
1 | 1 | <dl> |
|
2 | 2 | <dt>${_('Last revision')}</dt> |
|
3 | 3 | <dd> |
|
4 |
${h.link_to("r%s:%s" % (c.files_list.last_changeset.revision,c.files_list.last_changeset. |
|
|
5 |
h.url('files_home',repo_name=c.repo_name,revision=c.files_list.last_changeset. |
|
|
4 | ${h.link_to("r%s:%s" % (c.files_list.last_changeset.revision,c.files_list.last_changeset.short_id), | |
|
5 | h.url('files_home',repo_name=c.repo_name,revision=c.files_list.last_changeset.short_id,f_path=c.f_path))} | |
|
6 | 6 | </dd> |
|
7 | 7 | <dt>${_('Size')}</dt> |
|
8 | 8 | <dd>${h.format_byte_size(c.files_list.size,binary=True)}</dd> |
@@ -20,8 +20,8 b'' | |||
|
20 | 20 | <dd> |
|
21 | 21 | <div> |
|
22 | 22 | ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')} |
|
23 |
${h.hidden('diff2',c.files_list.last_changeset. |
|
|
24 |
${h.select('diff1',c.files_list.last_changeset. |
|
|
23 | ${h.hidden('diff2',c.files_list.last_changeset.short_id)} | |
|
24 | ${h.select('diff1',c.files_list.last_changeset.short_id,c.file_history)} | |
|
25 | 25 | ${h.submit('diff','diff to revision',class_="ui-button ui-widget ui-state-default ui-corner-all")} |
|
26 | 26 | ${h.submit('show_rev','show at revision',class_="ui-button ui-widget ui-state-default ui-corner-all")} |
|
27 | 27 | ${h.end_form()} |
@@ -32,7 +32,7 b'' | |||
|
32 | 32 | |
|
33 | 33 | <div id="body" class="codeblock"> |
|
34 | 34 | <div class="code-header"> |
|
35 |
<div class="revision">${c.files_list.name}@r${c.files_list.last_changeset.revision}:${c.files_list.last_changeset. |
|
|
35 | <div class="revision">${c.files_list.name}@r${c.files_list.last_changeset.revision}:${c.files_list.last_changeset.short_id}</div> | |
|
36 | 36 | <div class="commit">"${c.files_list.last_changeset.message}"</div> |
|
37 | 37 | </div> |
|
38 | 38 | <div class="code-body"> |
@@ -15,10 +15,10 b'' | |||
|
15 | 15 | <tr class="parity${cnt%2}"> |
|
16 | 16 | <td>${h.age(cs._ctx.date())} - ${h.rfc822date_notz(cs._ctx.date())} </td> |
|
17 | 17 | <td title="${cs.author}">${h.person(cs.author)}</td> |
|
18 |
<td>r${cs.revision}:${cs. |
|
|
18 | <td>r${cs.revision}:${cs.short_id}</td> | |
|
19 | 19 | <td> |
|
20 | 20 | ${h.link_to(h.truncate(cs.message,60), |
|
21 |
h.url('changeset_home',repo_name=c.repo_name,revision=cs. |
|
|
21 | h.url('changeset_home',repo_name=c.repo_name,revision=cs.short_id), | |
|
22 | 22 | title=cs.message)} |
|
23 | 23 | </td> |
|
24 | 24 | <td> |
@@ -34,9 +34,9 b'' | |||
|
34 | 34 | </span> |
|
35 | 35 | </td> |
|
36 | 36 | <td class="nowrap"> |
|
37 |
${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=cs. |
|
|
37 | ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=cs.short_id))} | |
|
38 | 38 | | |
|
39 |
${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=cs. |
|
|
39 | ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=cs.short_id))} | |
|
40 | 40 | </td> |
|
41 | 41 | </tr> |
|
42 | 42 | %endfor |
@@ -9,17 +9,17 b'' | |||
|
9 | 9 | %for cnt,tag in enumerate(c.repo_tags.items()): |
|
10 | 10 | <tr class="parity${cnt%2}"> |
|
11 | 11 | <td>${h.age(tag[1]._ctx.date())}</td> |
|
12 |
<td>r${tag[1].revision}:${tag[1]. |
|
|
12 | <td>r${tag[1].revision}:${tag[1].short_id}</td> | |
|
13 | 13 | <td> |
|
14 | 14 | <span class="logtags"> |
|
15 | 15 | <span class="tagtag">${h.link_to(tag[0], |
|
16 |
h.url('changeset_home',repo_name=c.repo_name,revision=tag[1]. |
|
|
16 | h.url('changeset_home',repo_name=c.repo_name,revision=tag[1].short_id))}</span> | |
|
17 | 17 | </span> |
|
18 | 18 | </td> |
|
19 | 19 | <td class="nowrap"> |
|
20 |
${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=tag[1]. |
|
|
20 | ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=tag[1].short_id))} | |
|
21 | 21 | | |
|
22 |
${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=tag[1]. |
|
|
22 | ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=tag[1].short_id))} | |
|
23 | 23 | </td> |
|
24 | 24 | </tr> |
|
25 | 25 | %endfor |
General Comments 0
You need to be logged in to leave comments.
Login now