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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
e47964f0
Commit
e47964f0
authored
Dec 04, 2020
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_forge: start to break vcs for erp5js
parent
2d2f2b57
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_doCreateWorkingCopy.py
...al_skins/erp5_vcs/BusinessTemplate_doCreateWorkingCopy.py
+5
-4
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_doVcsCommit.py
...tem/portal_skins/erp5_vcs/BusinessTemplate_doVcsCommit.py
+1
-1
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_handleException.py
...portal_skins/erp5_vcs/BusinessTemplate_handleException.py
+1
-1
No files found.
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_doCreateWorkingCopy.py
View file @
e47964f0
from
ZTUtils
import
make_query
from
Products.ERP5Type.Message
import
translateString
form_results
=
context
.
BusinessTemplate_viewCreateWorkingCopy
.
validate_all
(
REQUEST
)
form_results
=
context
.
BusinessTemplate_viewCreateWorkingCopy
.
validate_all
(
REQUEST
)
working_copy
=
form_results
[
'your_repository'
]
working_copy
=
form_results
[
'your_repository'
]
context
.
getVcsTool
(
path
=
working_copy
).
createBusinessTemplateWorkingCopy
()
context
.
getVcsTool
(
path
=
working_copy
).
createBusinessTemplateWorkingCopy
()
query_string
=
make_query
(
portal_status_message
=
'Business Template Working Copy created'
)
return
context
.
Base_redirect
(
'BusinessTemplate_viewVcsStatus'
,
keep_items
=
dict
(
REQUEST
.
response
.
redirect
(
'%s/BusinessTemplate_viewVcsStatus?%s'
%
portal_status_message
=
translateString
(
'Business Template Working Copy created'
)
(
context
.
absolute_url_path
(),
query_string
))
))
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_doVcsCommit.py
View file @
e47964f0
...
@@ -15,7 +15,7 @@ if not changelog.strip():
...
@@ -15,7 +15,7 @@ if not changelog.strip():
request
.
set
(
'cancel_url'
,
context
.
absolute_url
()
+
request
.
set
(
'cancel_url'
,
context
.
absolute_url
()
+
'/BusinessTemplate_viewVcsStatus?do_extract:int=0'
'/BusinessTemplate_viewVcsStatus?do_extract:int=0'
'&portal_status_message=Commit%20cancelled.'
)
'&portal_status_message=Commit%20cancelled.'
)
return
context
.
asContext
(
**
kw
).
B
usinessTemplate_viewVcsChangelog
(
)
return
context
.
asContext
(
**
kw
).
B
ase_renderForm
(
'BusinessTemplate_viewVcsChangelog'
)
try
:
try
:
return
context
.
getVcsTool
().
commit
(
changelog
,
**
kw
)
return
context
.
getVcsTool
().
commit
(
changelog
,
**
kw
)
...
...
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_handleException.py
View file @
e47964f0
...
@@ -17,4 +17,4 @@ except GitLoginError, e:
...
@@ -17,4 +17,4 @@ except GitLoginError, e:
method
=
'BusinessTemplate_viewGitLogin'
method
=
'BusinessTemplate_viewGitLogin'
context
.
REQUEST
.
set
(
'portal_status_message'
,
message
)
context
.
REQUEST
.
set
(
'portal_status_message'
,
message
)
return
getattr
(
context
.
asContext
(
**
kw
),
method
)(
caller
=
caller
,
caller_kw
=
caller_kw
)
return
context
.
asContext
(
**
kw
).
Base_renderForm
(
method
,
caller
=
caller
,
caller_kw
=
caller_kw
)
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