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
Levin Zimmermann
erp5
Commits
35d8a001
Commit
35d8a001
authored
Aug 30, 2017
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BT: expand ~ (HOME) of repository local paths
parent
8ea417c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
product/ERP5/Tool/TemplateTool.py
product/ERP5/Tool/TemplateTool.py
+10
-6
No files found.
product/ERP5/Tool/TemplateTool.py
View file @
35d8a001
...
@@ -365,10 +365,10 @@ class TemplateTool (BaseTool):
...
@@ -365,10 +365,10 @@ class TemplateTool (BaseTool):
if id is None:
if id is None:
id = self.generateNewId()
id = self.generateNewId()
urltype,
name
= splittype(url)
urltype,
path
= splittype(url)
if WIN and urltype and '
\\
' in
name
:
if WIN and urltype and '
\\
' in
path
:
urltype = None
urltype = None
name
= url
path
= url
if urltype and urltype != '
file
':
if urltype and urltype != '
file
':
if '
/
portal_templates
/
asRepository
/
' in url:
if '
/
portal_templates
/
asRepository
/
' in url:
# In this case, the downloaded BT is already built.
# In this case, the downloaded BT is already built.
...
@@ -378,7 +378,8 @@ class TemplateTool (BaseTool):
...
@@ -378,7 +378,8 @@ class TemplateTool (BaseTool):
return self[self._setObject(id, bt)]
return self[self._setObject(id, bt)]
bt = self._download_url(url, id)
bt = self._download_url(url, id)
else:
else:
bt = self._download_local(os.path.normpath(name), id)
path = os.path.normpath(os.path.expanduser(path))
bt = self._download_local(path, id)
bt.build(no_action=True)
bt.build(no_action=True)
return bt
return bt
...
@@ -590,8 +591,10 @@ class TemplateTool (BaseTool):
...
@@ -590,8 +591,10 @@ class TemplateTool (BaseTool):
"""
"""
Update the information on Business Templates from repositories.
Update the information on Business Templates from repositories.
For local repositories, if bt5list is missing or if genbt5list > 1,
For local repositories, genbt5list > 0 enables automatic generation
bt5list is automatically generated (but not saved on disk).
of bt5list, without saving it on disk:
- genbt5list=1: only if bt5list is missing
- genbt5list>1: always
"""
"""
self.repository_dict = PersistentMapping()
self.repository_dict = PersistentMapping()
property_list = ('
title
', '
version
', '
revision
', '
description
', '
license
',
property_list = ('
title
', '
version
', '
revision
', '
description
', '
license
',
...
@@ -607,6 +610,7 @@ class TemplateTool (BaseTool):
...
@@ -607,6 +610,7 @@ class TemplateTool (BaseTool):
if urltype and urltype != '
file
':
if urltype and urltype != '
file
':
f = urlopen(repository + '
/
bt5list
')
f = urlopen(repository + '
/
bt5list
')
else:
else:
url = os.path.expanduser(url)
bt5list = os.path.join(url, '
bt5list
')
bt5list = os.path.join(url, '
bt5list
')
if genbt5list > os.path.exists(bt5list):
if genbt5list > os.path.exists(bt5list):
f = generateInformation(url)
f = generateInformation(url)
...
...
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