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
04351455
Commit
04351455
authored
Jun 11, 2019
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactoring on fetch.
parent
dafa13f2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
commands.py
hdlmake/action/commands.py
+2
-2
git.py
hdlmake/fetch/git.py
+3
-5
No files found.
hdlmake/action/commands.py
View file @
04351455
...
@@ -82,8 +82,8 @@ class ActionCore(Action):
...
@@ -82,8 +82,8 @@ class ActionCore(Action):
result
=
self
.
git_backend
.
fetch
(
module
)
result
=
self
.
git_backend
.
fetch
(
module
)
elif
module
.
source
==
'gitsm'
:
elif
module
.
source
==
'gitsm'
:
result
=
self
.
gitsm_backend
.
fetch
(
module
)
result
=
self
.
gitsm_backend
.
fetch
(
module
)
el
if
module
.
source
==
'local'
:
el
se
:
result
=
self
.
local_backend
.
fetch
(
module
)
assert
False
,
"unknown source"
if
result
is
False
:
if
result
is
False
:
raise
Exception
(
"Unable to fetch module
%
s"
,
str
(
module
.
url
))
raise
Exception
(
"Unable to fetch module
%
s"
,
str
(
module
.
url
))
module
.
parse_manifest
()
module
.
parse_manifest
()
...
...
hdlmake/fetch/git.py
View file @
04351455
...
@@ -70,11 +70,9 @@ class Git(Fetcher):
...
@@ -70,11 +70,9 @@ class Git(Fetcher):
os
.
mkdir
(
fetchto
)
os
.
mkdir
(
fetchto
)
basename
=
path_utils
.
url_basename
(
module
.
url
)
basename
=
path_utils
.
url_basename
(
module
.
url
)
mod_path
=
os
.
path
.
join
(
fetchto
,
basename
)
mod_path
=
os
.
path
.
join
(
fetchto
,
basename
)
if
not
module
.
isfetched
:
assert
not
module
.
isfetched
logging
.
info
(
"Fetching git module
%
s"
,
mod_path
)
logging
.
info
(
"Fetching git module
%
s"
,
mod_path
)
shell
.
run
(
"(cd {0} && git clone {1})"
.
format
(
fetchto
,
module
.
url
))
shell
.
run
(
"(cd {0} && git clone {1})"
.
format
(
fetchto
,
module
.
url
))
else
:
logging
.
info
(
"Updating git module
%
s"
,
mod_path
)
checkout_id
=
None
checkout_id
=
None
if
module
.
branch
is
not
None
:
if
module
.
branch
is
not
None
:
checkout_id
=
module
.
branch
checkout_id
=
module
.
branch
...
...
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