Skip to content

[ADD] oca-create-branch-from-previous - #663

Merged
sbidoul merged 2 commits into
OCA:masterfrom
acsone:create-branch-sbi
Aug 5, 2026
Merged

sbidoul merged 2 commits into
OCA:masterfrom
acsone:create-branch-sbi

Conversation

@sbidoul

@sbidoul sbidoul commented Sep 26, 2025

Copy link
Copy Markdown
Member

Script to create a branch from a previous one, setting all addons installable=False and reapplying the project template.

@simahawk

simahawk commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

@sbidoul to close or to merge?

@sbidoul
sbidoul force-pushed the create-branch-sbi branch from 2e62de4 to e564c96 Compare August 5, 2026 14:02
@sbidoul

sbidoul commented Aug 5, 2026

Copy link
Copy Markdown
Member Author

@simahawk I think it worked well. So merge. I would love to have this supported by repo-maintainer-conf before preparing the 20.0 branches.

@sbidoul
sbidoul merged commit c086595 into OCA:master Aug 5, 2026
7 checks passed
@sbidoul
sbidoul deleted the create-branch-sbi branch August 5, 2026 14:04
@simahawk

Copy link
Copy Markdown
Contributor

I would love to have this supported by repo-maintainer-conf before preparing the 20.0 branches.

You mean by having a flag like new_branch_not_empty?

@simahawk

Copy link
Copy Markdown
Contributor

@sbidoul let's move the discussion on OCA/repo-maintainer#26

simahawk added a commit to simahawk/repo-maintainer that referenced this pull request Sep 14, 2026
Closes OCA#26

When creating a branch that doesn't exist yet, oca-repo-manage always
started it from an empty tree (just the copier template applied). This
adds an opt-in `new_branch_not_empty` boolean flag on a repo's conf: when
set, the new branch is instead created from the content of the closest
existing branch with a lower version (falling back to the repo's default
branch when none is found), with the copier template re-applied for the
new Odoo version and all addons marked `installable = False`, so
maintainers port modules one by one instead of starting from scratch.

The manifest-rewriting helper is adapted from the equivalent one added to
OCA/maintainer-tools in OCA/maintainer-tools#663,
reimplemented locally rather than added as a dependency (see comment in
oca_repo_maintainer/tools/manifest.py for why).
simahawk added a commit to simahawk/repo-maintainer that referenced this pull request Sep 14, 2026
Closes OCA#26

When creating a branch that doesn't exist yet, oca-repo-manage always
started it from an empty tree (just the copier template applied). This
adds an opt-in `new_branch_not_empty` boolean flag on a repo's conf: when
set, the new branch is instead created from the content of the closest
existing branch with a lower version (falling back to the repo's default
branch when none is found), with the copier template re-applied for the
new Odoo version and all addons marked `installable = False`, so
maintainers port modules one by one instead of starting from scratch.

The manifest-rewriting helper is adapted from the equivalent one added to
OCA/maintainer-tools in OCA/maintainer-tools#663,
reimplemented locally rather than added as a dependency (see comment in
oca_repo_maintainer/tools/manifest.py for why).
simahawk added a commit to simahawk/repo-maintainer that referenced this pull request Sep 14, 2026
Closes OCA#26

When creating a branch that doesn't exist yet, oca-repo-manage always
started it from an empty tree (just the copier template applied). This
adds an opt-in `new_branch_not_empty` boolean flag on a repo's conf: when
set, the new branch is instead created from the content of the closest
existing branch with a lower version (falling back to the repo's default
branch when none is found), with the copier template re-applied for the
new Odoo version and all addons marked `installable = False`, so
maintainers port modules one by one instead of starting from scratch.

The manifest-rewriting helper is adapted from the equivalent one added to
OCA/maintainer-tools in OCA/maintainer-tools#663,
reimplemented locally rather than added as a dependency (see comment in
oca_repo_maintainer/tools/manifest.py for why).
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