changeset 5989:02cfb2197c63

Merge stable
author Mads Kiilerich <madski@unity3d.com>
date Wed, 29 Jun 2016 16:47:47 +0200
parents ada7b0495b9f (current diff) 110dcae69d7d (diff)
children 42d1e1ab41a8
files CONTRIBUTORS kallithea/lib/base.py kallithea/lib/middleware/simplehg.py kallithea/templates/about.html kallithea/tests/functional/test_admin_repos.py
diffstat 5 files changed, 14 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/CONTRIBUTORS	Tue Jun 14 22:14:39 2016 +0200
+++ b/CONTRIBUTORS	Wed Jun 29 16:47:47 2016 +0200
@@ -13,9 +13,11 @@
     Søren Løvborg <sorenl@unity3d.com> 2015-2016
     Angel Ezquerra <angel.ezquerra@gmail.com> 2016
     Asterios Dimitriou <steve@pci.gr> 2016
+    Kateryna Musina <kateryna@unity3d.com> 2016
     Konstantin Veretennicov <kveretennicov@gmail.com> 2016
     Oscar Curero <oscar@naiandei.net> 2016
     Robert James Dennington <tinytimrob@googlemail.com> 2016
+    timeless@gmail.com 2016
     YFdyh000 <yfdyh000@gmail.com> 2016
     Aras Pranckevičius <aras@unity3d.com> 2012-2013 2015
     Sean Farley <sean.michael.farley@gmail.com> 2013-2015
--- a/kallithea/lib/base.py	Tue Jun 14 22:14:39 2016 +0200
+++ b/kallithea/lib/base.py	Wed Jun 29 16:47:47 2016 +0200
@@ -202,7 +202,7 @@
             from kallithea.lib.utils import get_repo_by_id
             by_id_match = get_repo_by_id(repo_name)
             if by_id_match:
-                data[1] = by_id_match
+                data[1] = safe_str(by_id_match)
 
         return '/'.join(data)
 
--- a/kallithea/lib/middleware/simplehg.py	Tue Jun 14 22:14:39 2016 +0200
+++ b/kallithea/lib/middleware/simplehg.py	Wed Jun 29 16:47:47 2016 +0200
@@ -84,7 +84,7 @@
         #======================================================================
         try:
             str_repo_name = environ['REPO_NAME'] = self.__get_repository(environ)
-            assert isinstance(str_repo_name, str)
+            assert isinstance(str_repo_name, str), str_repo_name
             repo_name = safe_unicode(str_repo_name)
             assert safe_str(repo_name) == str_repo_name, (str_repo_name, repo_name)
             log.debug('Extracted repo name is %s', repo_name)
--- a/kallithea/templates/about.html	Tue Jun 14 22:14:39 2016 +0200
+++ b/kallithea/templates/about.html	Wed Jun 29 16:47:47 2016 +0200
@@ -40,9 +40,11 @@
   <li>Copyright &copy; 2015&ndash;2016, Søren Løvborg</li>
   <li>Copyright &copy; 2016, Angel Ezquerra</li>
   <li>Copyright &copy; 2016, Asterios Dimitriou</li>
+  <li>Copyright &copy; 2016, Kateryna Musina</li>
   <li>Copyright &copy; 2016, Konstantin Veretennicov</li>
   <li>Copyright &copy; 2016, Oscar Curero</li>
   <li>Copyright &copy; 2016, Robert James Dennington</li>
+  <li>Copyright &copy; 2016, timeless@gmail.com</li>
   <li>Copyright &copy; 2016, YFdyh000</li>
   <li>Copyright &copy; 2012&ndash;2013, 2015, Aras Pranckevičius</li>
   <li>Copyright &copy; 2014&ndash;2015, Christian Oyarzun</li>
--- a/kallithea/tests/functional/test_admin_repos.py	Tue Jun 14 22:14:39 2016 +0200
+++ b/kallithea/tests/functional/test_admin_repos.py	Wed Jun 29 16:47:47 2016 +0200
@@ -4,6 +4,8 @@
 import mock
 import urllib
 
+import pytest
+
 from kallithea.lib import vcs
 from kallithea.lib.utils2 import safe_str, safe_unicode
 from kallithea.model.db import Repository, RepoGroup, UserRepoToPerm, User, \
@@ -594,6 +596,7 @@
         # repo must not be in filesystem !
         assert not os.path.isdir(os.path.join(Ui.get_by_key('paths', '/').ui_value, repo_name))
 
+
 class TestAdminReposControllerGIT(_BaseTestCase):
     REPO = GIT_REPO
     REPO_TYPE = 'git'
@@ -608,3 +611,8 @@
     NEW_REPO = NEW_HG_REPO
     OTHER_TYPE_REPO = GIT_REPO
     OTHER_TYPE = 'git'
+
+    def test_permanent_url_protocol_access(self):
+        with pytest.raises(Exception) as e:
+            self.app.get(url('summary_home', repo_name='_1'), extra_environ={'HTTP_ACCEPT': 'application/mercurial'})
+        assert 'Unable to detect pull/push action' in str(e)