Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

Re: [NEWS] oca-port: a new version has been released!

by
Tecnativa. S. L., David Vidal
- 20/11/2024 11:41:02
Thanks for the great work!

El mié, 20 nov 2024 a las 11:38, Sebastien Alix (<notifications@odoo-community.org>) escribió:

Hello there!

A new version of oca-port has been released:

This new version changed the CLI parameters, and now allows to migrate modules or port commits from one repository to another thanks to the new syntax.

Let's say that origin remote is for OCA/social, and mail remote for the newly created OCA/mail repository, to check if mail_tracking is migrated or have commits to port from 16.0 to 18.0:

  $ cd ~/OCA/social
  $ git remote add mail git@github.com:OCA/mail.git
  $ oca-port origin/16.0 mail/18.0 mail_tracking --verbose --fetch --dry-run

Output:

Source: origin/16.0, remote origin git@github.com:OCA/social.git
Target: mail/18.0, remote mail git@github.com:OCA/mail.git
Fetch origin/16.0 from git@github.com:OCA/social.git
Fetch mail/18.0 from git@github.com:OCA/mail.git
⚠️	Migration of mail_tracking seems handled in this PR:
		https://github.com/OCA/mail/pull/1 (by trisdoan)
	We invite you to review this PR instead of opening a new one. Thank you!
ℹ️  mail_tracking can be migrated from 16.0 to 18.0.

Seems there is already a PR open on OCA/mail to migrate this module, better to review this one before opening a new one!

Otherwise, by removing the --dry-run flag (with an optional --destination) we could handle the migration, following OCA migration guide.

If a module is already migrated, the list of missing commits (if any) grouped by PR will be listed, up to the user to port or to blacklist them if they are not relevant.

This new version also allows you to migrate modules located in a subfolder instead of the root directory, useful for private project repositories for instance.

ROADMAP:

  • integrate odoo-module-migrator to automatically upgrade code when migrating a module (WIP)
  • register/handle renamed modules

Ideas, bugfixes and improvements are welcome.

Have a good day,

-- 
Sébastien Alix
Business Solutions Odoo Developer

Camptocamp France SA
https://www.camptocamp.com/

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe

Reference