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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Georgios Dagkakis
erp5
Commits
81184b5f
Commit
81184b5f
authored
Dec 23, 2022
by
Jérome Perrin
Committed by
Arnaud Fontaine
Mar 17, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
patches: modernize OFSHistory patch
parent
46966cdb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
17 deletions
+5
-17
product/ERP5Type/patches/OFSHistory.py
product/ERP5Type/patches/OFSHistory.py
+5
-17
No files found.
product/ERP5Type/patches/OFSHistory.py
View file @
81184b5f
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#
#
##############################################################################
##############################################################################
from
OFS.History
import
HystoryJar
,
historicalRevision
from
OFS.History
import
HystoryJar
"""
"""
Rationale for this patch:
Rationale for this patch:
...
@@ -24,22 +24,10 @@ Zope (ex: 2.12 reading 2.8 PythonScript).
...
@@ -24,22 +24,10 @@ Zope (ex: 2.12 reading 2.8 PythonScript).
Launchpad bug opened, patch submitted:
Launchpad bug opened, patch submitted:
https://bugs.launchpad.net/zope2/+bug/735999
https://bugs.launchpad.net/zope2/+bug/735999
"""
# Original function lines removed by this patch are present but commented-out.
Updated version at
def
patched_historicalRevision
(
self
,
serial
):
https://github.com/zopefoundation/Zope/pull/1086
state
=
self
.
_p_jar
.
oldstate
(
self
,
serial
)
rev
=
self
.
__class__
.
__basicnew__
()
# rev._p_jar=HystoryJar(self._p_jar)
rev
.
_p_oid
=
self
.
_p_oid
# rev._p_serial=serial
rev
.
__setstate__
(
state
)
# rev._p_changed=0
# PATCH ADDITION BEGIN
rev
.
_p_serial
=
serial
rev
.
_p_jar
=
HystoryJar
(
self
.
_p_jar
)
# PATCH ADDITION END
return
rev
historicalRevision
.
__code__
=
patched_historicalRevision
.
__code__
"""
HystoryJar
.
register
=
HystoryJar
.
abort
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