Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ayush Tiwari
erp5
Commits
c68c992a
Commit
c68c992a
authored
Jul 22, 2015
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_forge: avoid zodb bloating when generating git xml tree or diff with zodb
parent
c283984e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
7 deletions
+23
-7
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/BusinessTemplate_getPrintableDiffWithZODB.xml
...rp5_toolbox/BusinessTemplate_getPrintableDiffWithZODB.xml
+9
-3
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/BusinessTemplate_getPrintableModificationListFromZODB.xml
...BusinessTemplate_getPrintableModificationListFromZODB.xml
+9
-3
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/tree.xml.xml
...forge/SkinTemplateItem/portal_skins/erp5_vcs/tree.xml.xml
+5
-1
No files found.
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/BusinessTemplate_getPrintableDiffWithZODB.xml
View file @
c68c992a
...
@@ -58,6 +58,12 @@
...
@@ -58,6 +58,12 @@
from Products.ERP5Type.Document import newTempBase\n
from Products.ERP5Type.Document import newTempBase\n
from ZODB.POSException import ConflictError\n
from ZODB.POSException import ConflictError\n
\n
\n
def respond(v):\n
if REQUEST is None:\n
return v\n
REQUEST.RESPONSE.write(v)\n
raise ValueError("Abort Transaction")\n
\n
template_tool = context.getPortalObject().portal_templates\n
template_tool = context.getPortalObject().portal_templates\n
\n
\n
if context.getBuildingState() != "built":\n
if context.getBuildingState() != "built":\n
...
@@ -96,7 +102,7 @@ except ConflictError:\n
...
@@ -96,7 +102,7 @@ except ConflictError:\n
raise\n
raise\n
except Exception as e:\n
except Exception as e:\n
print(repr(e))\n
print(repr(e))\n
return
printed
\n
return
respond(printed)
\n
\n
\n
try:\n
try:\n
installed_bt_for_diff.setId("installed_bt_for_diff")\n
installed_bt_for_diff.setId("installed_bt_for_diff")\n
...
@@ -113,14 +119,14 @@ except Exception as e:\n
...
@@ -113,14 +119,14 @@ except Exception as e:\n
print(repr(e))\n
print(repr(e))\n
template_tool.manage_delObjects(ids=[installed_bt_for_diff.getId()])\n
template_tool.manage_delObjects(ids=[installed_bt_for_diff.getId()])\n
\n
\n
return
printed
\n
return
respond(printed)
\n
]]>
</string>
</value>
]]>
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
<value>
<string>
REQUEST=None
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/BusinessTemplate_getPrintableModificationListFromZODB.xml
View file @
c68c992a
...
@@ -58,6 +58,12 @@
...
@@ -58,6 +58,12 @@
from Products.ERP5Type.Document import newTempBase\n
from Products.ERP5Type.Document import newTempBase\n
from ZODB.POSException import ConflictError\n
from ZODB.POSException import ConflictError\n
\n
\n
def respond(v):\n
if REQUEST is None:\n
return v\n
REQUEST.RESPONSE.write(v)\n
raise ValueError("Abort Transaction")\n
\n
template_tool = context.getPortalObject().portal_templates\n
template_tool = context.getPortalObject().portal_templates\n
\n
\n
if context.getBuildingState() != "built":\n
if context.getBuildingState() != "built":\n
...
@@ -95,7 +101,7 @@ except ConflictError:\n
...
@@ -95,7 +101,7 @@ except ConflictError:\n
raise\n
raise\n
except Exception as e:\n
except Exception as e:\n
print(repr(e))\n
print(repr(e))\n
return
printed
\n
return
respond(printed)
\n
\n
\n
try:\n
try:\n
installed_bt_for_diff.setId("installed_bt_for_diff")\n
installed_bt_for_diff.setId("installed_bt_for_diff")\n
...
@@ -108,14 +114,14 @@ except Exception as e:\n
...
@@ -108,14 +114,14 @@ except Exception as e:\n
print(repr(e))\n
print(repr(e))\n
template_tool.manage_delObjects(ids=[installed_bt_for_diff.getId()])\n
template_tool.manage_delObjects(ids=[installed_bt_for_diff.getId()])\n
\n
\n
return
printed
\n
return
respond(printed)
\n
]]>
</string>
</value>
]]>
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
<value>
<string>
REQUEST=None
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/tree.xml.xml
View file @
c68c992a
...
@@ -63,6 +63,10 @@ if not root:\n
...
@@ -63,6 +63,10 @@ if not root:\n
return \'\'\'<?xml version=\'1.0\' encoding=\'UTF-8\'?>
\n
return \'\'\'<?xml version=\'1.0\' encoding=\'UTF-8\'?>
\n
<tree
id=
\'0\'
></tree>
\'\'\'\n
<tree
id=
\'0\'
></tree>
\'\'\'\n
\n
\n
if REQUEST is not None: # XXX workaround to prevent zodb bloat (bt build)\n
# This script is mostly used by javascript, we can abort the transaction\n
REQUEST.RESPONSE.write(vcs_tool.treeToXML(root))\n
raise ValueError("Abort transaction")\n
return vcs_tool.treeToXML(root)\n
return vcs_tool.treeToXML(root)\n
...
@@ -70,7 +74,7 @@ return vcs_tool.treeToXML(root)\n
...
@@ -70,7 +74,7 @@ return vcs_tool.treeToXML(root)\n
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
show_unmodified=False, do_extract=True
</string>
</value>
<value>
<string>
show_unmodified=False, do_extract=True
, REQUEST=None
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
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