Show More
@@ -192,7 +192,7 b' class SummaryController(BaseRepoControll' | |||||
192 | @jsonify |
|
192 | @jsonify | |
193 | def repo_size(self, repo_name): |
|
193 | def repo_size(self, repo_name): | |
194 | if request.is_xhr: |
|
194 | if request.is_xhr: | |
195 |
return |
|
195 | return c.rhodecode_db_repo._repo_size() | |
196 | else: |
|
196 | else: | |
197 | raise HTTPBadRequest() |
|
197 | raise HTTPBadRequest() | |
198 |
|
198 |
@@ -2329,8 +2329,8 b' h3.files_location {' | |||||
2329 | } |
|
2329 | } | |
2330 |
|
2330 | |||
2331 | .changeset_id { |
|
2331 | .changeset_id { | |
2332 | font-family: monospace; |
|
|||
2333 | color: #666666; |
|
2332 | color: #666666; | |
|
2333 | margin-right: -3px; | |||
2334 | } |
|
2334 | } | |
2335 |
|
2335 | |||
2336 | .changeset_hash { |
|
2336 | .changeset_hash { | |
@@ -2532,7 +2532,7 b' h3.files_location {' | |||||
2532 | } |
|
2532 | } | |
2533 |
|
2533 | |||
2534 | #graph_content .container .hash { |
|
2534 | #graph_content .container .hash { | |
2535 |
width: |
|
2535 | width: 100px; | |
2536 | font-size: 0.85em; |
|
2536 | font-size: 0.85em; | |
2537 | } |
|
2537 | } | |
2538 |
|
2538 |
@@ -64,6 +64,7 b'' | |||||
64 | </td> |
|
64 | </td> | |
65 | <td class="hash"> |
|
65 | <td class="hash"> | |
66 | <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}"> |
|
66 | <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}"> | |
|
67 | <span class="changeset_id">${cs.revision}:</span> | |||
67 | <span class="changeset_hash">${h.short_id(cs.raw_id)}</span> |
|
68 | <span class="changeset_hash">${h.short_id(cs.raw_id)}</span> | |
68 | </a> |
|
69 | </a> | |
69 | </td> |
|
70 | </td> |
@@ -30,6 +30,7 b' from rhodecode.model.db import User' | |||||
30 | from rhodecode.tests.nose_parametrized import parameterized |
|
30 | from rhodecode.tests.nose_parametrized import parameterized | |
31 |
|
31 | |||
32 | import pylons.test |
|
32 | import pylons.test | |
|
33 | from rhodecode.lib.utils2 import safe_unicode, safe_str | |||
33 |
|
34 | |||
34 |
|
35 | |||
35 | os.environ['TZ'] = 'UTC' |
|
36 | os.environ['TZ'] = 'UTC' | |
@@ -159,12 +160,12 b' class TestController(TestCase):' | |||||
159 |
|
160 | |||
160 | def checkSessionFlash(self, response, msg): |
|
161 | def checkSessionFlash(self, response, msg): | |
161 | self.assertTrue('flash' in response.session, |
|
162 | self.assertTrue('flash' in response.session, | |
162 |
msg='Response session:%r have no flash' |
|
163 | msg='Response session:%r have no flash' | |
|
164 | % response.session) | |||
163 | if not msg in response.session['flash'][0][1]: |
|
165 | if not msg in response.session['flash'][0][1]: | |
164 | self.fail( |
|
166 | msg = u'msg `%s` not found in session flash: got `%s` instead' % ( | |
165 | 'msg `%s` not found in session flash: got `%s` instead' % ( |
|
167 | msg, response.session['flash'][0][1]) | |
166 | msg, response.session['flash']) |
|
168 | self.fail(safe_str(msg)) | |
167 | ) |
|
|||
168 |
|
169 | |||
169 |
|
170 | |||
170 | ## HELPERS ## |
|
171 | ## HELPERS ## |
@@ -1,8 +1,9 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 |
|
2 | |||
3 | import os |
|
3 | import os | |
|
4 | import urllib | |||
|
5 | ||||
4 | from rhodecode.lib import vcs |
|
6 | from rhodecode.lib import vcs | |
5 |
|
||||
6 | from rhodecode.model.db import Repository, RepoGroup |
|
7 | from rhodecode.model.db import Repository, RepoGroup | |
7 | from rhodecode.tests import * |
|
8 | from rhodecode.tests import * | |
8 | from rhodecode.model.repos_group import ReposGroupModel |
|
9 | from rhodecode.model.repos_group import ReposGroupModel | |
@@ -31,7 +32,8 b' class TestAdminReposController(TestContr' | |||||
31 | repo_name=repo_name, |
|
32 | repo_name=repo_name, | |
32 | repo_description=description)) |
|
33 | repo_description=description)) | |
33 | self.checkSessionFlash(response, |
|
34 | self.checkSessionFlash(response, | |
34 |
'created repository %s' |
|
35 | 'created repository <a href="/%s">%s</a>' | |
|
36 | % (repo_name, repo_name)) | |||
35 |
|
37 | |||
36 | #test if the repo was created in the database |
|
38 | #test if the repo was created in the database | |
37 | new_repo = self.Session().query(Repository)\ |
|
39 | new_repo = self.Session().query(Repository)\ | |
@@ -64,8 +66,8 b' class TestAdminReposController(TestContr' | |||||
64 | repo_name=repo_name, |
|
66 | repo_name=repo_name, | |
65 | repo_description=description)) |
|
67 | repo_description=description)) | |
66 | self.checkSessionFlash(response, |
|
68 | self.checkSessionFlash(response, | |
67 |
'created repository %s' |
|
69 | u'created repository <a href="/%s">%s</a>' | |
68 |
|
70 | % (urllib.quote(repo_name), repo_name_unicode)) | ||
69 | #test if the repo was created in the database |
|
71 | #test if the repo was created in the database | |
70 | new_repo = self.Session().query(Repository)\ |
|
72 | new_repo = self.Session().query(Repository)\ | |
71 | .filter(Repository.repo_name == repo_name_unicode).one() |
|
73 | .filter(Repository.repo_name == repo_name_unicode).one() | |
@@ -104,8 +106,8 b' class TestAdminReposController(TestContr' | |||||
104 | repo_group=gr.group_id,)) |
|
106 | repo_group=gr.group_id,)) | |
105 |
|
107 | |||
106 | self.checkSessionFlash(response, |
|
108 | self.checkSessionFlash(response, | |
107 |
'created repository %s' |
|
109 | 'created repository <a href="/%s">%s</a>' | |
108 |
|
110 | % (repo_name, repo_name)) | ||
109 | #test if the repo was created in the database |
|
111 | #test if the repo was created in the database | |
110 | new_repo = self.Session().query(Repository)\ |
|
112 | new_repo = self.Session().query(Repository)\ | |
111 | .filter(Repository.repo_name == repo_name_full).one() |
|
113 | .filter(Repository.repo_name == repo_name_full).one() | |
@@ -141,7 +143,8 b' class TestAdminReposController(TestContr' | |||||
141 | repo_name=repo_name, |
|
143 | repo_name=repo_name, | |
142 | repo_description=description)) |
|
144 | repo_description=description)) | |
143 | self.checkSessionFlash(response, |
|
145 | self.checkSessionFlash(response, | |
144 |
'created repository %s' |
|
146 | 'created repository <a href="/%s">%s</a>' | |
|
147 | % (repo_name, repo_name)) | |||
145 |
|
148 | |||
146 | #test if the repo was created in the database |
|
149 | #test if the repo was created in the database | |
147 | new_repo = self.Session().query(Repository)\ |
|
150 | new_repo = self.Session().query(Repository)\ | |
@@ -176,7 +179,8 b' class TestAdminReposController(TestContr' | |||||
176 | repo_description=description)) |
|
179 | repo_description=description)) | |
177 |
|
180 | |||
178 | self.checkSessionFlash(response, |
|
181 | self.checkSessionFlash(response, | |
179 |
'created repository %s' |
|
182 | u'created repository <a href="/%s">%s</a>' | |
|
183 | % (urllib.quote(repo_name), repo_name_unicode)) | |||
180 |
|
184 | |||
181 | #test if the repo was created in the database |
|
185 | #test if the repo was created in the database | |
182 | new_repo = self.Session().query(Repository)\ |
|
186 | new_repo = self.Session().query(Repository)\ | |
@@ -221,8 +225,8 b' class TestAdminReposController(TestContr' | |||||
221 | repo_description=description)) |
|
225 | repo_description=description)) | |
222 |
|
226 | |||
223 | self.checkSessionFlash(response, |
|
227 | self.checkSessionFlash(response, | |
224 |
'created repository %s' |
|
228 | 'created repository <a href="/%s">%s</a>' | |
225 |
|
229 | % (repo_name, repo_name)) | ||
226 | #test if the repo was created in the database |
|
230 | #test if the repo was created in the database | |
227 | new_repo = self.Session().query(Repository)\ |
|
231 | new_repo = self.Session().query(Repository)\ | |
228 | .filter(Repository.repo_name == repo_name).one() |
|
232 | .filter(Repository.repo_name == repo_name).one() | |
@@ -269,8 +273,8 b' class TestAdminReposController(TestContr' | |||||
269 | repo_description=description)) |
|
273 | repo_description=description)) | |
270 |
|
274 | |||
271 | self.checkSessionFlash(response, |
|
275 | self.checkSessionFlash(response, | |
272 |
'created repository %s' |
|
276 | 'created repository <a href="/%s">%s</a>' | |
273 |
|
277 | % (repo_name, repo_name)) | ||
274 | #test if the repo was created in the database |
|
278 | #test if the repo was created in the database | |
275 | new_repo = self.Session().query(Repository)\ |
|
279 | new_repo = self.Session().query(Repository)\ | |
276 | .filter(Repository.repo_name == repo_name).one() |
|
280 | .filter(Repository.repo_name == repo_name).one() |
@@ -8,7 +8,7 b' class TestChangelogController(TestContro' | |||||
8 | response = self.app.get(url(controller='changelog', action='index', |
|
8 | response = self.app.get(url(controller='changelog', action='index', | |
9 | repo_name=HG_REPO)) |
|
9 | repo_name=HG_REPO)) | |
10 |
|
10 | |||
11 |
response.mustcontain( |
|
11 | response.mustcontain('''id="chg_20" class="container tablerow1"''') | |
12 | response.mustcontain( |
|
12 | response.mustcontain( | |
13 | """<input class="changeset_range" """ |
|
13 | """<input class="changeset_range" """ | |
14 | """id="5e204e7583b9c8e7b93a020bd036564b1e731dae" """ |
|
14 | """id="5e204e7583b9c8e7b93a020bd036564b1e731dae" """ | |
@@ -16,18 +16,20 b' class TestChangelogController(TestContro' | |||||
16 | """type="checkbox" value="1" />""" |
|
16 | """type="checkbox" value="1" />""" | |
17 | ) |
|
17 | ) | |
18 | response.mustcontain( |
|
18 | response.mustcontain( | |
19 | """<span class="changeset_id">154:""" |
|
19 | """<span class="changeset_id">154:</span>""" | |
20 | """<span class="changeset_hash">5e204e7583b9</span></span>""" |
|
20 | ) | |
|
21 | response.mustcontain( | |||
|
22 | """<span class="changeset_hash">5e204e7583b9</span>""" | |||
21 | ) |
|
23 | ) | |
22 |
|
24 | |||
23 | response.mustcontain("""Small update at simplevcs app""") |
|
25 | response.mustcontain("""Small update at simplevcs app""") | |
24 |
|
26 | |||
25 | response.mustcontain( |
|
27 | # response.mustcontain( | |
26 | """<div id="changed_total_5e204e7583b9c8e7b93a020bd036564b1e731dae" """ |
|
28 | # """<div id="changed_total_5e204e7583b9c8e7b93a020bd036564b1e731dae" """ | |
27 | """style="float:right;" class="changed_total tooltip" """ |
|
29 | # """style="float:right;" class="changed_total tooltip" """ | |
28 | """title="Affected number of files, click to show """ |
|
30 | # """title="Affected number of files, click to show """ | |
29 | """more details">3</div>""" |
|
31 | # """more details">3</div>""" | |
30 | ) |
|
32 | # ) | |
31 |
|
33 | |||
32 | #pagination |
|
34 | #pagination | |
33 | response = self.app.get(url(controller='changelog', action='index', |
|
35 | response = self.app.get(url(controller='changelog', action='index', | |
@@ -51,20 +53,22 b' class TestChangelogController(TestContro' | |||||
51 | """type="checkbox" value="1" />""" |
|
53 | """type="checkbox" value="1" />""" | |
52 | ) |
|
54 | ) | |
53 | response.mustcontain( |
|
55 | response.mustcontain( | |
54 | """<span class="changeset_id">64:""" |
|
56 | """<span class="changeset_id">64:</span>""" | |
55 | """<span class="changeset_hash">46ad32a4f974</span></span>""" |
|
57 | ) | |
|
58 | response.mustcontain( | |||
|
59 | """<span class="changeset_hash">46ad32a4f974</span>""" | |||
56 | ) |
|
60 | ) | |
57 |
|
61 | |||
58 | response.mustcontain( |
|
62 | # response.mustcontain( | |
59 | """<div id="changed_total_46ad32a4f974e45472a898c6b0acb600320579b1" """ |
|
63 | # """<div id="changed_total_46ad32a4f974e45472a898c6b0acb600320579b1" """ | |
60 | """style="float:right;" class="changed_total tooltip" """ |
|
64 | # """style="float:right;" class="changed_total tooltip" """ | |
61 | """title="Affected number of files, click to show """ |
|
65 | # """title="Affected number of files, click to show """ | |
62 | """more details">21</div>""" |
|
66 | # """more details">21</div>""" | |
63 | ) |
|
67 | # ) | |
64 |
|
68 | # | ||
65 | response.mustcontain( |
|
69 | # response.mustcontain( | |
66 | """<a href="/%s/changeset/""" |
|
70 | # """<a href="/%s/changeset/""" | |
67 | """46ad32a4f974e45472a898c6b0acb600320579b1" """ |
|
71 | # """46ad32a4f974e45472a898c6b0acb600320579b1" """ | |
68 | """title="Merge with 2e6a2bf9356ca56df08807f4ad86d480da72a8f4">""" |
|
72 | # """title="Merge with 2e6a2bf9356ca56df08807f4ad86d480da72a8f4">""" | |
69 | """46ad32a4f974</a>""" % HG_REPO |
|
73 | # """46ad32a4f974</a>""" % HG_REPO | |
70 | ) |
|
74 | # ) |
@@ -119,7 +119,8 b' class TestForksController(TestController' | |||||
119 |
|
119 | |||
120 | #test if we have a message that fork is ok |
|
120 | #test if we have a message that fork is ok | |
121 | self.checkSessionFlash(response, |
|
121 | self.checkSessionFlash(response, | |
122 |
'forked %s |
|
122 | 'forked repository %s as <a href="/%s">%s</a>' | |
|
123 | % (repo_name, fork_name, fork_name)) | |||
123 |
|
124 | |||
124 | #test if the fork was created in the database |
|
125 | #test if the fork was created in the database | |
125 | fork_repo = Session().query(Repository)\ |
|
126 | fork_repo = Session().query(Repository)\ |
General Comments 0
You need to be logged in to leave comments.
Login now