Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Titouan Soulard
erp5
Commits
81b349ea
Commit
81b349ea
authored
May 20, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add mapping of title and id and support id correctly.
By Romain and Luke.
parent
64c249e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
product/ERP5/Tool/TemplateTool.py
product/ERP5/Tool/TemplateTool.py
+12
-7
No files found.
product/ERP5/Tool/TemplateTool.py
View file @
81b349ea
...
...
@@ -973,6 +973,7 @@ class TemplateTool (BaseTool):
bt_list
:
list
of
(
repository
,
id
)
tuple
.
"""
sorted_bt_list = []
title_id_mapping = {}
# Calculate the dependency graph
dependency_dict = {}
...
...
@@ -981,15 +982,17 @@ class TemplateTool (BaseTool):
undependent_list = []
for repository, bt_id in bt_list:
repository_dict[bt_id] = repository
bt = [x for x in self.repository_dict[repository]
\
if x['id'] == bt_id][0]
dependency_dict[bt_id] = [x.split(' ')[0] for x in bt['dependency_list']]
if not dependency_dict[bt_id]:
del dependency_dict[bt_id]
bt_title = bt['title']
repository_dict[bt_title] = repository
dependency_dict[bt_title] = [x.split(' ')[0] for x in bt['dependency_list']]
title_id_mapping[bt_title] = bt_id
if not dependency_dict[bt_title]:
del dependency_dict[bt_title]
for provision in list(bt['provision_list']):
provition_dict[provision] = bt_
id
undependent_list.append(bt_
id
)
provition_dict[provision] = bt_
title
undependent_list.append(bt_
title
)
# Calculate the reverse dependency graph
reverse_dependency_dict = {}
...
...
@@ -1019,7 +1022,9 @@ class TemplateTool (BaseTool):
# Let's sort the bt5!
while undependent_list:
bt_id = undependent_list.pop(0)
sorted_bt_list.insert(0, (repository_dict[bt_id], bt_id))
if bt_id not in repository_dict:
continue
sorted_bt_list.insert(0, (repository_dict[bt_id], title_id_mapping[bt_id]))
for dependency_id in dependency_dict.get(bt_id, []):
local_dependency_list = reverse_dependency_dict[dependency_id]
...
...
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