Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
Hdlmake
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
15
Issues
15
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Hdlmake
Commits
b79ac4e1
Commit
b79ac4e1
authored
Aug 09, 2016
by
Javier D. Garcia-Lasheras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Checkpoint while refactoring the fetch package
parent
11bc1392
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
5 deletions
+14
-5
__init__.py
hdlmake/fetch/__init__.py
+3
-1
constants.py
hdlmake/fetch/constants.py
+7
-4
fetcher.py
hdlmake/fetch/fetcher.py
+4
-0
No files found.
hdlmake/fetch/__init__.py
View file @
b79ac4e1
...
...
@@ -19,7 +19,9 @@
# You should have received a copy of the GNU General Public License
# along with Hdlmake. If not, see <http://www.gnu.org/licenses/>.
from
.constants
import
(
GIT
,
SVN
,
LOCAL
,
fetch_type_lookup
)
"""This package provides stuff to handle local and remote repositories"""
from
.constants
import
(
GIT
,
SVN
,
LOCAL
,
FETCH_TYPE_LOOKUP
)
from
.git
import
Git
from
.svn
import
Svn
from
.backend_factory
import
BackendFactory
hdlmake/fetch/constants.py
View file @
b79ac4e1
...
...
@@ -22,6 +22,9 @@
# Note that the order here is important. The constants must be
# defined first! If they are not, there will likely be an obscure error
# when doing the imports within the imports that come afterwards.
"""Module providing the constants required for the fetch process"""
GIT
=
1
SVN
=
2
LOCAL
=
3
...
...
@@ -35,7 +38,7 @@ from .backend_factory import BackendFactory
# Initialize an instance of BackendFactory which will be made publicly
# available
fetch_type_lookup
=
BackendFactory
()
fetch_type_lookup
.
register_backend
(
GIT
,
Git
)
fetch_type_lookup
.
register_backend
(
SVN
,
Svn
)
fetch_type_lookup
.
register_backend
(
LOCAL
,
Local
)
FETCH_TYPE_LOOKUP
=
BackendFactory
()
FETCH_TYPE_LOOKUP
.
register_backend
(
GIT
,
Git
)
FETCH_TYPE_LOOKUP
.
register_backend
(
SVN
,
Svn
)
FETCH_TYPE_LOOKUP
.
register_backend
(
LOCAL
,
Local
)
hdlmake/fetch/fetcher.py
View file @
b79ac4e1
...
...
@@ -19,8 +19,12 @@
# You should have received a copy of the GNU General Public License
# along with Hdlmake. If not, see <http://www.gnu.org/licenses/>.
"""Module providing the base class for the different code fetchers"""
class
Fetcher
(
object
):
"""Base class for the code fetcher objects"""
def
fetch
(
self
,
module
):
"""Stub method, this must be implemented by the code fetcher"""
pass
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment