##// END OF EJS Templates
core: move git/svn/hg into submodule
super-admin -
r1043:89733dce python3
parent child Browse files
Show More
@@ -0,0 +1,17 b''
1 # RhodeCode VCSServer provides access to different vcs backends via network.
2 # Copyright (C) 2014-2020 RhodeCode GmbH
3 #
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software Foundation,
16 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
@@ -35,7 +35,6 b' import msgpack'
35 import configparser
35 import configparser
36
36
37 from pyramid.config import Configurator
37 from pyramid.config import Configurator
38 from pyramid.settings import asbool, aslist
39 from pyramid.wsgi import wsgiapp
38 from pyramid.wsgi import wsgiapp
40 from pyramid.response import Response
39 from pyramid.response import Response
41
40
@@ -69,7 +68,7 b' strict_vcs = True'
69
68
70 git_import_err = None
69 git_import_err = None
71 try:
70 try:
72 from vcsserver.git import GitFactory, GitRemote
71 from vcsserver.remote.git import GitFactory, GitRemote
73 except ImportError as e:
72 except ImportError as e:
74 GitFactory = None
73 GitFactory = None
75 GitRemote = None
74 GitRemote = None
@@ -80,7 +79,7 b' except ImportError as e:'
80
79
81 hg_import_err = None
80 hg_import_err = None
82 try:
81 try:
83 from vcsserver.hg import MercurialFactory, HgRemote
82 from vcsserver.remote.hg import MercurialFactory, HgRemote
84 except ImportError as e:
83 except ImportError as e:
85 MercurialFactory = None
84 MercurialFactory = None
86 HgRemote = None
85 HgRemote = None
@@ -91,7 +90,7 b' except ImportError as e:'
91
90
92 svn_import_err = None
91 svn_import_err = None
93 try:
92 try:
94 from vcsserver.svn import SubversionFactory, SvnRemote
93 from vcsserver.remote.svn import SubversionFactory, SvnRemote
95 except ImportError as e:
94 except ImportError as e:
96 SubversionFactory = None
95 SubversionFactory = None
97 SvnRemote = None
96 SvnRemote = None
1 NO CONTENT: file renamed from vcsserver/git.py to vcsserver/remote/git.py
NO CONTENT: file renamed from vcsserver/git.py to vcsserver/remote/git.py
1 NO CONTENT: file renamed from vcsserver/hg.py to vcsserver/remote/hg.py
NO CONTENT: file renamed from vcsserver/hg.py to vcsserver/remote/hg.py
1 NO CONTENT: file renamed from vcsserver/svn.py to vcsserver/remote/svn.py
NO CONTENT: file renamed from vcsserver/svn.py to vcsserver/remote/svn.py
@@ -21,8 +21,7 b' import pytest'
21 import dulwich.errors
21 import dulwich.errors
22 from mock import Mock, patch
22 from mock import Mock, patch
23
23
24 from vcsserver import git
24 from vcsserver.remote import git
25
26
25
27 SAMPLE_REFS = {
26 SAMPLE_REFS = {
28 'HEAD': 'fd627b9e0dd80b47be81af07c4a98518244ed2f7',
27 'HEAD': 'fd627b9e0dd80b47be81af07c4a98518244ed2f7',
@@ -21,9 +21,10 b' import traceback'
21
21
22 import pytest
22 import pytest
23 from mercurial.error import LookupError
23 from mercurial.error import LookupError
24 from mock import Mock, MagicMock, patch
24 from mock import Mock, patch
25
25
26 from vcsserver import exceptions, hg, hgcompat
26 from vcsserver import exceptions, hgcompat
27 from vcsserver.remote import hg
27
28
28
29
29 class TestDiff(object):
30 class TestDiff(object):
@@ -44,7 +44,7 b" INVALID_CERTIFICATE_STDERR = '\\n'.join(["
44 @pytest.mark.xfail(sys.platform == "cygwin",
44 @pytest.mark.xfail(sys.platform == "cygwin",
45 reason="SVN not packaged for Cygwin")
45 reason="SVN not packaged for Cygwin")
46 def test_import_remote_repository_certificate_error(stderr, expected_reason):
46 def test_import_remote_repository_certificate_error(stderr, expected_reason):
47 from vcsserver import svn
47 from vcsserver.remote import svn
48 factory = mock.Mock()
48 factory = mock.Mock()
49 factory.repo = mock.Mock(return_value=mock.Mock())
49 factory.repo = mock.Mock(return_value=mock.Mock())
50
50
@@ -63,7 +63,6 b' def test_import_remote_repository_certif'
63
63
64
64
65 def test_svn_libraries_can_be_imported():
65 def test_svn_libraries_can_be_imported():
66 import svn
67 import svn.client
66 import svn.client
68 assert svn.client is not None
67 assert svn.client is not None
69
68
@@ -76,7 +75,7 b' def test_svn_libraries_can_be_imported()'
76 ('http://', (None, None, 'http://')),
75 ('http://', (None, None, 'http://')),
77 ])
76 ])
78 def test_username_password_extraction_from_url(example_url, parts):
77 def test_username_password_extraction_from_url(example_url, parts):
79 from vcsserver import svn
78 from vcsserver.remote import svn
80
79
81 factory = mock.Mock()
80 factory = mock.Mock()
82 factory.repo = mock.Mock(return_value=mock.Mock())
81 factory.repo = mock.Mock(return_value=mock.Mock())
General Comments 0
You need to be logged in to leave comments. Login now