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

Include revisions only when passing --include-revisions. #44

Merged
merged 4 commits into from
Jan 23, 2025

Conversation

mauritsvanrees
Copy link
Member

Also temporarily disable versioning when creating a bare content object. Otherwise the first version is basically nothing, it does not even have a title.

@mister-roboto
Copy link

@mauritsvanrees thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

This was referenced Jan 21, 2025
Also temporarily disable versioning when creating a bare content object.
Otherwise the first version is basically nothing, it does not even have a title.
@mauritsvanrees mauritsvanrees force-pushed the maurits-sustainable-exports-optional-versions branch from 591854a to b162d77 Compare January 21, 2025 21:44
Copy link
Member

@davisagli davisagli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be mentioned in the docs.

src/plone/exportimport/exporters/content.py Outdated Show resolved Hide resolved
src/plone/exportimport/utils/content/import_helpers.py Outdated Show resolved Hide resolved
Left-over from an earlier try.
This prevents the repository tool from being marked as changed, which is what happened with the previous code.
See #44 (comment)
@mauritsvanrees
Copy link
Member Author

This needs to be mentioned in the docs.

Done.

Are the docs actually visible anywhere? I don't see a link...

mauritsvanrees added a commit to plone/plone.distribution that referenced this pull request Jan 22, 2025
This needs plone/plone.exportimport#44.
It would be good to have that merged and in a release, so we can add that release as minimum version in our dependencies.
@stevepiercy
Copy link
Contributor

Are the docs actually visible anywhere? I don't see a link...

No. Where should they be published, RTD only or pulled into Plone 6 Documentation as a submodule? If Plone 6 Documentation, where is a good place for them? It sounds like i/e is useful for more than just upgrades, including backups and restores.

In any case, I should set up pull request previews on RTD.

Please let me know. Thank you!

@mauritsvanrees mauritsvanrees merged commit d04511e into main Jan 23, 2025
9 of 11 checks passed
@mauritsvanrees mauritsvanrees deleted the maurits-sustainable-exports-optional-versions branch January 23, 2025 15:24
mister-roboto pushed a commit to plone/buildout.coredev that referenced this pull request Jan 23, 2025
Branch: refs/heads/main
Date: 2025-01-21T22:44:12+01:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/plone.exportimport@b162d77

Include revisions only when passing --include-revisions.

Also temporarily disable versioning when creating a bare content object.
Otherwise the first version is basically nothing, it does not even have a title.

Files changed:
A news/39.feature.4
M src/plone/exportimport/cli/__init__.py
M src/plone/exportimport/exporters/__init__.py
M src/plone/exportimport/exporters/base.py
M src/plone/exportimport/exporters/content.py
M src/plone/exportimport/utils/content/export_helpers.py
M src/plone/exportimport/utils/content/import_helpers.py
Repository: plone.exportimport

Branch: refs/heads/main
Date: 2025-01-22T16:29:31+01:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/plone.exportimport@2fd3b78

Remove unneeded kwargs from dump.

Left-over from an earlier try.

Files changed:
M src/plone/exportimport/exporters/content.py
Repository: plone.exportimport

Branch: refs/heads/main
Date: 2025-01-22T16:50:09+01:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/plone.exportimport@8750537

Use unittest.mock.patch to patch isVersionable to return False.

This prevents the repository tool from being marked as changed, which is what happened with the previous code.
See plone/plone.exportimport#44 (comment)

Files changed:
M src/plone/exportimport/utils/content/import_helpers.py
Repository: plone.exportimport

Branch: refs/heads/main
Date: 2025-01-22T17:03:15+01:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/plone.exportimport@3896e8b

Document the new plone-exporter --include-revisions option.

Files changed:
M docs/features.md
Repository: plone.exportimport

Branch: refs/heads/main
Date: 2025-01-23T16:24:09+01:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/plone.exportimport@d04511e

Merge pull request #44 from plone/maurits-sustainable-exports-optional-versions

Include revisions only when passing --include-revisions.

Files changed:
A news/39.feature.4
M docs/features.md
M src/plone/exportimport/cli/__init__.py
M src/plone/exportimport/exporters/__init__.py
M src/plone/exportimport/exporters/base.py
M src/plone/exportimport/exporters/content.py
M src/plone/exportimport/utils/content/export_helpers.py
M src/plone/exportimport/utils/content/import_helpers.py
mister-roboto pushed a commit to plone/buildout.coredev that referenced this pull request Jan 27, 2025
Branch: refs/heads/main
Date: 2025-01-22T17:21:53+01:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/plone.distribution@c12ee5b

Include revisions only when passing --include-revisions.

This needs plone/plone.exportimport#44.
It would be good to have that merged and in a release, so we can add that release as minimum version in our dependencies.

Files changed:
A news/39.feature
M README.md
M src/plone/distribution/cli/__init__.py
Repository: plone.distribution

Branch: refs/heads/main
Date: 2025-01-23T23:26:40+01:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/plone.distribution@191d265

Require plone.exportimport 1.0.0b1 as minimum.

This is needed for the --include-revisions option.

Files changed:
M setup.py
Repository: plone.distribution

Branch: refs/heads/main
Date: 2025-01-27T10:40:48-08:00
Author: David Glick (davisagli) <david@glicksoftware.com>
Commit: plone/plone.distribution@1164162

Merge pull request #108 from plone/maurits-optional-include-versions

Include revisions only when passing --include-revisions.

Files changed:
A news/39.feature
M README.md
M setup.py
M src/plone/distribution/cli/__init__.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.

4 participants