Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sebalix committed Nov 20, 2024
1 parent 729b897 commit 569a543
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,38 +26,38 @@ not fully ported grouped by Pull Request and propose to port them.

Syntax:

$ oca-port <source> <target> <module> [options]
$ oca-port <source> <target> <module_path> [options]
$ oca-port --help

To check if an addon could be migrated or to get eligible commits to port:

$ export GITHUB_TOKEN=<token>
$ cd <path/to/OCA/cloned_repository>
$ oca-port origin/14.0 origin/16.0 <module> --verbose --dry-run
$ oca-port origin/16.0 origin/18.0 <module_path> --verbose --dry-run

To effectively migrate the addon or port its commits, remove the `--dry-run` option
so the tool will create a working local branch automatically (called destination)
from the `<target>` branch:

$ oca-port origin/14.0 origin/16.0 <module>
$ oca-port origin/16.0 origin/18.0 <module_path>

You can control the destination with the `--destination` option:

$ oca-port origin/14.0 origin/16.0 <module> --destination camptocamp/16.0-port-things
$ oca-port origin/16.0 origin/18.0 <module_path> --destination camptocamp/18.0-port-things

You can also directly blacklist a bunch of PRs on a given branch thanks to the
`oca-port-pr` tool:

$ oca-port-pr blacklist OCA/wms#250,OCA/wms#251 15.0 shopfloor
$ oca-port-pr blacklist OCA/wms#250,OCA/wms#251 16.0 shopfloor

You could give a more detailed reason of this blacklist with `--reason` parameter:

$ oca-port-pr blacklist OCA/wms#250,OCA/wms#251 15.0 shopfloor --reason "Refactored in 15.0, not needed anymore"
$ oca-port-pr blacklist OCA/wms#250,OCA/wms#251 16.0 shopfloor --reason "Refactored in 16.0, not needed anymore"

And if the module has been moved to another repository, you can specify its remote as well:

$ git remote add new_repo git@github.com:OCA/new-repo.git
$ oca-port-pr blacklist OCA/wms#250,OCA/wms#251 15.0 shopfloor --remote new_repo
$ oca-port-pr blacklist OCA/wms#250,OCA/wms#251 16.0 shopfloor --remote new_repo

Migration of addon
------------------
Expand Down Expand Up @@ -101,7 +101,7 @@ You can also use `oca-port` as a Python package:
>>> app = oca_port.App(
... source="origin/14.0",
... target="origin/16.0",
... addon="stock_move_auto_assign",
... addon_path="stock_move_auto_assign",
... upstream_org": "OCA",
... repo_path": "/home/odoo/OCA/stock-logistics-warehouse",
... output": "json",
Expand Down

0 comments on commit 569a543

Please sign in to comment.