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
096e3563
Commit
096e3563
authored
May 23, 2017
by
Javier D. Garcia-Lasheras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
module path is now stored as a relative path
parent
8a382781
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
16 deletions
+13
-16
core.py
hdlmake/action/core.py
+1
-1
tree.py
hdlmake/action/tree.py
+5
-6
git.py
hdlmake/fetch/git.py
+1
-2
manifest_parser.py
hdlmake/manifest_parser/manifest_parser.py
+3
-4
core.py
hdlmake/module/core.py
+2
-1
module.py
hdlmake/module/module.py
+1
-2
No files found.
hdlmake/action/core.py
View file @
096e3563
...
...
@@ -183,7 +183,7 @@ class ActionCore(Action):
%
mod_aux
.
parent
.
url
)
else
:
self
.
_print_comment
(
"# * This is the root module"
)
print
(
"
%
s
\t
%
s"
%
(
path_mod
.
relpath
(
mod_aux
.
path
)
,
print
(
"
%
s
\t
%
s"
%
(
mod_aux
.
path
,
_convert_to_source_name
(
mod_aux
.
source
)))
if
self
.
options
.
withfiles
:
self
.
_print_file_list
(
mod_aux
.
files
)
...
...
hdlmake/action/tree.py
View file @
096e3563
...
...
@@ -92,16 +92,15 @@ class ActionTree(Action):
unfetched_modules
=
True
else
:
if
mod_aux
.
parent
:
hierarchy
.
add_node
(
path
.
relpath
(
mod_aux
.
path
))
hierarchy
.
add_edge
(
path
.
relpath
(
mod_aux
.
parent
.
path
),
path
.
relpath
(
mod_aux
.
path
))
hierarchy
.
add_node
(
mod_aux
.
path
)
hierarchy
.
add_edge
(
mod_aux
.
parent
.
path
,
mod_aux
.
path
)
else
:
hierarchy
.
add_node
(
path
.
relpath
(
mod_aux
.
path
)
)
top_id
=
path
.
relpath
(
mod_aux
.
path
)
hierarchy
.
add_node
(
mod_aux
.
path
)
top_id
=
mod_aux
.
path
if
self
.
options
.
withfiles
:
if
len
(
mod_aux
.
files
):
for
file_aux
in
mod_aux
.
files
:
hierarchy
.
add_edge
(
path
.
relpath
(
mod_aux
.
path
)
,
hierarchy
.
add_edge
(
mod_aux
.
path
,
path
.
relpath
(
file_aux
.
path
))
if
unfetched_modules
:
...
...
hdlmake/fetch/git.py
View file @
096e3563
...
...
@@ -106,8 +106,7 @@ class Git(Fetcher):
checkout_id
=
module
.
revision
logging
.
debug
(
"Git commit requested:
%
s"
,
checkout_id
)
else
:
checkout_id
=
self
.
get_submodule_commit
(
path_utils
.
relpath
(
module
.
path
))
checkout_id
=
self
.
get_submodule_commit
(
module
.
path
)
logging
.
debug
(
"Git submodule commit:
%
s"
,
checkout_id
)
if
checkout_id
is
not
None
:
logging
.
info
(
"Checking out version
%
s"
,
checkout_id
)
...
...
hdlmake/manifest_parser/manifest_parser.py
View file @
096e3563
...
...
@@ -26,7 +26,6 @@ from __future__ import absolute_import
import
os
import
logging
from
hdlmake.util
import
path
as
path_mod
from
.configparser
import
ConfigParser
...
...
@@ -278,9 +277,9 @@ class ManifestParser(ConfigParser):
path_aux
=
os
.
path
.
join
(
path
,
filename
)
if
not
isinstance
(
path_aux
,
str
):
raise
ValueError
(
"Path must be an instance of str"
)
if
not
path_mod
.
is_abs_path
(
path_aux
):
raise
ValueError
(
"Manifest path must be absolute path"
)
#
if not path_mod.is_abs_path(path_aux):
#
raise ValueError(
#
"Manifest path must be absolute path")
return
path_aux
return
None
manifest
=
_search_for_manifest
(
path
)
...
...
hdlmake/module/core.py
View file @
096e3563
...
...
@@ -53,7 +53,8 @@ class ModuleConfig(object):
self
.
url
,
self
.
branch
,
self
.
revision
=
\
path_mod
.
url_parse
(
url
)
basename
=
self
.
basename
()
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
fetchto
,
basename
))
path
=
path_mod
.
relpath
(
os
.
path
.
abspath
(
os
.
path
.
join
(
fetchto
,
basename
)))
# Check if the module dir exists and is not empty
if
os
.
path
.
exists
(
path
)
and
os
.
listdir
(
path
):
self
.
path
=
path
...
...
hdlmake/module/module.py
View file @
096e3563
...
...
@@ -103,8 +103,7 @@ class Module(ModuleContent):
return
logging
.
debug
(
"Removing "
+
self
.
path
)
try
:
command_tmp
=
(
path_mod
.
rmdir_command
()
+
" "
+
path_mod
.
relpath
(
self
.
path
))
command_tmp
=
path_mod
.
rmdir_command
()
+
" "
+
self
.
path
Popen
(
command_tmp
,
stdout
=
PIPE
,
stdin
=
PIPE
,
...
...
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