Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of proposal #18 #19

Merged
merged 3 commits into from
Feb 8, 2019
Merged

Implementation of proposal #18 #19

merged 3 commits into from
Feb 8, 2019

Conversation

pysailor
Copy link
Contributor

@pysailor pysailor commented Feb 7, 2019

New option former_dotted_names that allows to register the former name under which a behavior used to be registered. This can be useful to ensure a smooth transition in case a behavior's dotted name is changed.

Refs: #18

@pysailor pysailor requested a review from jensens February 7, 2019 16:59
pysailor added a commit to plone/plone.app.versioningbehavior that referenced this pull request Feb 7, 2019
…edAttributes

is called in all our uses cases. So if we fix that method to find the correct
blob, we can handle all cases of changed dotted interface names.

This commit depends on plone/plone.behavior#19
pysailor added a commit to plone/plone.app.versioningbehavior that referenced this pull request Feb 7, 2019
…edAttributes

is called in all our uses cases. So if we fix that method to find the correct
blob, we can handle all cases of changed dotted interface names.

This commit depends on plone/plone.behavior#19
pysailor added a commit to plone/plone.app.contenttypes that referenced this pull request Feb 7, 2019
pysailor added a commit to plone/plone.app.contenttypes that referenced this pull request Feb 8, 2019
@pysailor pysailor force-pushed the 18-former-dotted-names branch from ec83247 to b81907e Compare February 8, 2019 13:32
pysailor added a commit to plone/plone.app.contenttypes that referenced this pull request Feb 8, 2019
@jensens jensens merged commit a74655b into master Feb 8, 2019
@jensens jensens deleted the 18-former-dotted-names branch February 8, 2019 14:57
mister-roboto pushed a commit to plone/buildout.coredev that referenced this pull request Feb 8, 2019
Branch: refs/heads/master
Date: 2019-02-08T15:29:58+01:00
Author: Wolfgang Thomas (pysailor) <thomas@syslab.com>
Commit: plone/plone.app.contenttypes@7359717

Declare the former dotted name of the LeadImage and the RichText behavior
Follows #480
Depends on plone/plone.behavior#19

Files changed:
M plone/app/contenttypes/behaviors/configure.zcml
Repository: plone.app.contenttypes

Branch: refs/heads/master
Date: 2019-02-08T15:34:58+01:00
Author: Wolfgang Thomas (pysailor) <thomas@syslab.com>
Commit: plone/plone.app.contenttypes@6b96b5b

update changelog

Files changed:
A news/480.bugfix
Repository: plone.app.contenttypes

Branch: refs/heads/master
Date: 2019-02-08T17:21:56+01:00
Author: Jens W. Klein (jensens) <jk@kleinundpartner.at>
Commit: plone/plone.app.contenttypes@5827048

Merge pull request #504 from plone/declare-old-dotted-name

Declare the former name of the LeadImage behavior

Files changed:
A news/480.bugfix
M plone/app/contenttypes/behaviors/configure.zcml
mister-roboto pushed a commit to plone/buildout.coredev that referenced this pull request Feb 9, 2019
Branch: refs/heads/master
Date: 2019-02-07T14:25:36+01:00
Author: Wolfgang Thomas (pysailor) <thomas@syslab.com>
Commit: plone/plone.app.versioningbehavior@038ab41

Work in progress: fix for #38
If a behavior that provides a NamedBlob field was renamed, the following will fail:
- editing the current version of the content item
- viewing a previous version (from the history)
- reverting to a previous version
This code is a proof of concept that fetches the blob from the stored history
under its old name.
It currently uses a hard-coded mapping that allows a lookup from old to new
interface name. This needs to be turned into a utility lookup.

Files changed:
M plone/app/versioningbehavior/browser.py
M plone/app/versioningbehavior/modifiers.py
Repository: plone.app.versioningbehavior

Branch: refs/heads/master
Date: 2019-02-07T18:05:27+01:00
Author: Wolfgang Thomas (pysailor) <thomas@syslab.com>
Commit: plone/plone.app.versioningbehavior@59a9a01

We can actually throw away lots of code again, since reattachReferencedAttributes
is called in all our uses cases. So if we fix that method to find the correct
blob, we can handle all cases of changed dotted interface names.

This commit depends on plone/plone.behavior#19

Files changed:
M plone/app/versioningbehavior/browser.py
M plone/app/versioningbehavior/modifiers.py
Repository: plone.app.versioningbehavior

Branch: refs/heads/master
Date: 2019-02-07T18:19:05+01:00
Author: Wolfgang Thomas (pysailor) <thomas@syslab.com>
Commit: plone/plone.app.versioningbehavior@1c0098a

add changelog entry

Files changed:
M CHANGES.rst
Repository: plone.app.versioningbehavior

Branch: refs/heads/master
Date: 2019-02-08T01:01:12+01:00
Author: Wolfgang Thomas (pysailor) <thomas@syslab.com>
Commit: plone/plone.app.versioningbehavior@fed6886

Not all named file fields are provided via a behavior...

Files changed:
M plone/app/versioningbehavior/modifiers.py
Repository: plone.app.versioningbehavior

Branch: refs/heads/master
Date: 2019-02-09T11:17:17+01:00
Author: Jens W. Klein (jensens) <jk@kleinundpartner.at>
Commit: plone/plone.app.versioningbehavior@1328716

Merge pull request #45 from plone/pysailor-namedfile

Recover from renamed behavior

Files changed:
M CHANGES.rst
M plone/app/versioningbehavior/modifiers.py
mister-roboto pushed a commit to plone/buildout.coredev that referenced this pull request Feb 9, 2019
Branch: refs/heads/master
Date: 2019-02-07T14:25:36+01:00
Author: Wolfgang Thomas (pysailor) <thomas@syslab.com>
Commit: plone/plone.app.versioningbehavior@038ab41

Work in progress: fix for #38
If a behavior that provides a NamedBlob field was renamed, the following will fail:
- editing the current version of the content item
- viewing a previous version (from the history)
- reverting to a previous version
This code is a proof of concept that fetches the blob from the stored history
under its old name.
It currently uses a hard-coded mapping that allows a lookup from old to new
interface name. This needs to be turned into a utility lookup.

Files changed:
M plone/app/versioningbehavior/browser.py
M plone/app/versioningbehavior/modifiers.py
Repository: plone.app.versioningbehavior

Branch: refs/heads/master
Date: 2019-02-07T18:05:27+01:00
Author: Wolfgang Thomas (pysailor) <thomas@syslab.com>
Commit: plone/plone.app.versioningbehavior@59a9a01

We can actually throw away lots of code again, since reattachReferencedAttributes
is called in all our uses cases. So if we fix that method to find the correct
blob, we can handle all cases of changed dotted interface names.

This commit depends on plone/plone.behavior#19

Files changed:
M plone/app/versioningbehavior/browser.py
M plone/app/versioningbehavior/modifiers.py
Repository: plone.app.versioningbehavior

Branch: refs/heads/master
Date: 2019-02-07T18:19:05+01:00
Author: Wolfgang Thomas (pysailor) <thomas@syslab.com>
Commit: plone/plone.app.versioningbehavior@1c0098a

add changelog entry

Files changed:
M CHANGES.rst
Repository: plone.app.versioningbehavior

Branch: refs/heads/master
Date: 2019-02-08T01:01:12+01:00
Author: Wolfgang Thomas (pysailor) <thomas@syslab.com>
Commit: plone/plone.app.versioningbehavior@fed6886

Not all named file fields are provided via a behavior...

Files changed:
M plone/app/versioningbehavior/modifiers.py
Repository: plone.app.versioningbehavior

Branch: refs/heads/master
Date: 2019-02-09T11:17:17+01:00
Author: Jens W. Klein (jensens) <jk@kleinundpartner.at>
Commit: plone/plone.app.versioningbehavior@1328716

Merge pull request #45 from plone/pysailor-namedfile

Recover from renamed behavior

Files changed:
M CHANGES.rst
M plone/app/versioningbehavior/modifiers.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants