Show More
@@ -13,9 +13,11 b' List of contributors to Kallithea projec' | |||||
13 | Søren Løvborg <sorenl@unity3d.com> 2015-2016 |
|
13 | Søren Løvborg <sorenl@unity3d.com> 2015-2016 | |
14 | Angel Ezquerra <angel.ezquerra@gmail.com> 2016 |
|
14 | Angel Ezquerra <angel.ezquerra@gmail.com> 2016 | |
15 | Asterios Dimitriou <steve@pci.gr> 2016 |
|
15 | Asterios Dimitriou <steve@pci.gr> 2016 | |
|
16 | Kateryna Musina <kateryna@unity3d.com> 2016 | |||
16 | Konstantin Veretennicov <kveretennicov@gmail.com> 2016 |
|
17 | Konstantin Veretennicov <kveretennicov@gmail.com> 2016 | |
17 | Oscar Curero <oscar@naiandei.net> 2016 |
|
18 | Oscar Curero <oscar@naiandei.net> 2016 | |
18 | Robert James Dennington <tinytimrob@googlemail.com> 2016 |
|
19 | Robert James Dennington <tinytimrob@googlemail.com> 2016 | |
|
20 | timeless@gmail.com 2016 | |||
19 | YFdyh000 <yfdyh000@gmail.com> 2016 |
|
21 | YFdyh000 <yfdyh000@gmail.com> 2016 | |
20 | Aras Pranckevičius <aras@unity3d.com> 2012-2013 2015 |
|
22 | Aras Pranckevičius <aras@unity3d.com> 2012-2013 2015 | |
21 | Sean Farley <sean.michael.farley@gmail.com> 2013-2015 |
|
23 | Sean Farley <sean.michael.farley@gmail.com> 2013-2015 |
@@ -202,7 +202,7 b' class BaseVCSController(object):' | |||||
202 | from kallithea.lib.utils import get_repo_by_id |
|
202 | from kallithea.lib.utils import get_repo_by_id | |
203 | by_id_match = get_repo_by_id(repo_name) |
|
203 | by_id_match = get_repo_by_id(repo_name) | |
204 | if by_id_match: |
|
204 | if by_id_match: | |
205 | data[1] = by_id_match |
|
205 | data[1] = safe_str(by_id_match) | |
206 |
|
206 | |||
207 | return '/'.join(data) |
|
207 | return '/'.join(data) | |
208 |
|
208 |
@@ -84,7 +84,7 b' class SimpleHg(BaseVCSController):' | |||||
84 | #====================================================================== |
|
84 | #====================================================================== | |
85 | try: |
|
85 | try: | |
86 | str_repo_name = environ['REPO_NAME'] = self.__get_repository(environ) |
|
86 | str_repo_name = environ['REPO_NAME'] = self.__get_repository(environ) | |
87 | assert isinstance(str_repo_name, str) |
|
87 | assert isinstance(str_repo_name, str), str_repo_name | |
88 | repo_name = safe_unicode(str_repo_name) |
|
88 | repo_name = safe_unicode(str_repo_name) | |
89 | assert safe_str(repo_name) == str_repo_name, (str_repo_name, repo_name) |
|
89 | assert safe_str(repo_name) == str_repo_name, (str_repo_name, repo_name) | |
90 | log.debug('Extracted repo name is %s', repo_name) |
|
90 | log.debug('Extracted repo name is %s', repo_name) |
@@ -40,9 +40,11 b'' | |||||
40 | <li>Copyright © 2015–2016, Søren Løvborg</li> |
|
40 | <li>Copyright © 2015–2016, Søren Løvborg</li> | |
41 | <li>Copyright © 2016, Angel Ezquerra</li> |
|
41 | <li>Copyright © 2016, Angel Ezquerra</li> | |
42 | <li>Copyright © 2016, Asterios Dimitriou</li> |
|
42 | <li>Copyright © 2016, Asterios Dimitriou</li> | |
|
43 | <li>Copyright © 2016, Kateryna Musina</li> | |||
43 | <li>Copyright © 2016, Konstantin Veretennicov</li> |
|
44 | <li>Copyright © 2016, Konstantin Veretennicov</li> | |
44 | <li>Copyright © 2016, Oscar Curero</li> |
|
45 | <li>Copyright © 2016, Oscar Curero</li> | |
45 | <li>Copyright © 2016, Robert James Dennington</li> |
|
46 | <li>Copyright © 2016, Robert James Dennington</li> | |
|
47 | <li>Copyright © 2016, timeless@gmail.com</li> | |||
46 | <li>Copyright © 2016, YFdyh000</li> |
|
48 | <li>Copyright © 2016, YFdyh000</li> | |
47 | <li>Copyright © 2012–2013, 2015, Aras Pranckevičius</li> |
|
49 | <li>Copyright © 2012–2013, 2015, Aras Pranckevičius</li> | |
48 | <li>Copyright © 2014–2015, Christian Oyarzun</li> |
|
50 | <li>Copyright © 2014–2015, Christian Oyarzun</li> |
@@ -4,6 +4,8 b' import os' | |||||
4 | import mock |
|
4 | import mock | |
5 | import urllib |
|
5 | import urllib | |
6 |
|
6 | |||
|
7 | import pytest | |||
|
8 | ||||
7 | from kallithea.lib import vcs |
|
9 | from kallithea.lib import vcs | |
8 | from kallithea.lib.utils2 import safe_str, safe_unicode |
|
10 | from kallithea.lib.utils2 import safe_str, safe_unicode | |
9 | from kallithea.model.db import Repository, RepoGroup, UserRepoToPerm, User, \ |
|
11 | from kallithea.model.db import Repository, RepoGroup, UserRepoToPerm, User, \ | |
@@ -594,6 +596,7 b' class _BaseTestCase(TestController):' | |||||
594 | # repo must not be in filesystem ! |
|
596 | # repo must not be in filesystem ! | |
595 | assert not os.path.isdir(os.path.join(Ui.get_by_key('paths', '/').ui_value, repo_name)) |
|
597 | assert not os.path.isdir(os.path.join(Ui.get_by_key('paths', '/').ui_value, repo_name)) | |
596 |
|
598 | |||
|
599 | ||||
597 | class TestAdminReposControllerGIT(_BaseTestCase): |
|
600 | class TestAdminReposControllerGIT(_BaseTestCase): | |
598 | REPO = GIT_REPO |
|
601 | REPO = GIT_REPO | |
599 | REPO_TYPE = 'git' |
|
602 | REPO_TYPE = 'git' | |
@@ -608,3 +611,8 b' class TestAdminReposControllerHG(_BaseTe' | |||||
608 | NEW_REPO = NEW_HG_REPO |
|
611 | NEW_REPO = NEW_HG_REPO | |
609 | OTHER_TYPE_REPO = GIT_REPO |
|
612 | OTHER_TYPE_REPO = GIT_REPO | |
610 | OTHER_TYPE = 'git' |
|
613 | OTHER_TYPE = 'git' | |
|
614 | ||||
|
615 | def test_permanent_url_protocol_access(self): | |||
|
616 | with pytest.raises(Exception) as e: | |||
|
617 | self.app.get(url('summary_home', repo_name='_1'), extra_environ={'HTTP_ACCEPT': 'application/mercurial'}) | |||
|
618 | assert 'Unable to detect pull/push action' in str(e) |
General Comments 0
You need to be logged in to leave comments.
Login now