When trying to migrate with the --format-patch option, you will sometimes get an error when trying to fetch the commits from the previous version due to a big difference in the commit history:
fatal: bad revision 'origin/14.0..origin/13.0'
That will cause the script to fail:
➤ odoo-module-migrate -m $MODULE --init-version-name 13.0 --target-version-name 14.0 --no-commit --format-patch
10:39:37 INFO Creating new branch '14.0-mig-payment_redsys' ...
Switched to a new branch '14.0-mig-payment_redsys'
fatal: bad revision 'origin/14.0..origin/13.0'
10:39:37 WARNING No valid module found for 'payment_redsys' in the directory '/home/jota/Documents/Tecnativa/plantillas/devel-14.0/odoo/custom/src/l10n-spain'
Traceback (most recent call last):
File "/home/jota/.local/bin/odoo-module-migrate", line 8, in <module>
sys.exit(main())
File "/home/jota/.local/pipx/venvs/odoo-module-migrator/lib64/python3.9/site-packages/odoo_module_migrate/__main__.py", line 124, in main
migration = Migration(
File "/home/jota/.local/pipx/venvs/odoo-module-migrator/lib64/python3.9/site-packages/odoo_module_migrate/migration.py", line 87, in __init__
raise ConfigException("No modules found to migrate. Exiting.")
odoo_module_migrate.exception.ConfigException: No modules found to migrate. Exiting.
This script could automatically detect that and perform a git fetch [--unshallow] previous to the format patch.
When trying to migrate with the
--format-patch
option, you will sometimes get an error when trying to fetch the commits from the previous version due to a big difference in the commit history:That will cause the script to fail:
This script could automatically detect that and perform a
git fetch [--unshallow]
previous to the format patch.When you do it manually, it works: