Open simahawk opened 1 year ago
We could add a --fetch
option that will leverage the upstream
value to update remote branches.
Or maybe --pull
to also update the local branches, as the commit comparison (and creation of development branches) will be processed from the local branches if we go this way.
I added the --fetch
option here: https://github.com/OCA/oca-port/pull/26 but regarding the ability of using local branches this will require more work so it'll be done later.
With the linked PR, the tool will only try to fetch the source & target remote branches if it can't find any references locally, and with the --fetch
option it'll always update the remote branches (current behavior, which slow down the process a bit).
This option alone allows to analyze ~400 addons among 55 repositories in ~30m instead of 1h30m (fetch used one time per repository).
Regarding the --pull
it was a bad idea, I don't want to integrate this feature as the tool is designed to do its stuff in its own branches, and won't update other local branches (it is the responsability of the user to update/rebase its local branches).
Use local branches by default and require to use
$remote/$branch
explicitly.For instance:
oca-port 14.0 15.0 queue_job --fork camptocamp
Will work w/ 14.0 and 15.0 local branches rather than remote. A proper log msg would be shown as you must ensure that your branches are up to date.
oca-port origin/14.0 origin/15.0 queue_job --fork camptocamp
Will work w/ remote branches only.
oca-port origin/14.0 15.0 queue_job --fork camptocamp
Will work w/ remote 14.0 and local 15.0.
This helps starting from your local changes (such as blacklisted PRs, etc) w/o having to open and merge intermediary PRs. At the moment the best way for porting several PRs and blacklist others is to: