Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

Re: Alternative 8.0-9.0 migration procedure

by
Tecnativa. S. L., Pedro M. Baeza
- 14/09/2016 13:57:00
Great, let me try some cases I have and we can go for the simplest one!

Thanks for the tips.

Regards.

2016-09-14 13:53 GMT+02:00 Sylvain GARANCHER (SYLEAM) <sylvain.garancher@syleam.fr>:
Pedro, my proposition takes all commits which include modifications in the $SOURCE_PATH, but only applies changes done in this path.

For example, with the recent mass commit removing en.po files, this commit is aplied, but only in the target module.
So this doesn't create "false positive" conflicts, and doesn't affect other modules.

Cordialement,
--



2016-09-14 13:38 GMT+02:00 Pedro M. Baeza (Tecnativa) <pedro.baeza@tecnativa.com>:
Sylvain, I make the same question: does this only retrieve changes relative to the specific addon, or this only fetches entire commits that implies any modification in the affected module (but including the entire diff)? In both I miss some kind of git filter-branch.

Regards.

2016-09-14 13:23 GMT+02:00 Sylvain GARANCHER (SYLEAM) <sylvain.garancher@syleam.fr>:
Hello,

Can it be possible to replace the entire script by these commands ?
 $ git remote update # In case the repo was already cloned before
 $ git checkout -b $TARGER_BRANCH-mig-$MODULE_NAME origin/$TARGET_BRANCH
 $ git format-patch --stdout origin/$TARGET_BRANCH..origin/$SOURCE_BRANCH -- $SOURCE_PATH | git am -3

I tested it from 8.0 to 9.0 without any issue, in a single run, on these modules of the stock-logistics-workflow repo :
- stock_route_sales_team : Doesn't exist in the 9.0 branch yet
- stock_cancel : Exists in the 9.0 branch, but not up to date
- stock_picking_invoice_link : Exists in 9.0, had a merge in 8.0 since 9.0 branch creation

For the last module (stock_picking_invoice_link), I had a conflict, resolved with a simple "git mergetool", then I ran "git am --continue", and all continued well.
The merges don't appear in the resulting commits.

The only fail I had is with the stock_scanner module, because I the module was added in the repo by "git subtree add", but Stephane's script failed this this one too.
In this case, we just have to manually redo the "git subtree add" (using the last commit which was done out of the repo) :
 $ git subtree add -P stock_scanner 607ce95
Then, the "git format-patch | git am" worked like a charm, to get updates done in 8.0 branch since this module was added.

Cordialement,
--



2016-09-14 11:38 GMT+02:00 Stéphane Bidoul <stephane.bidoul@acsone.eu>:
Normally yes, git log <path> does that. To be tested.

-sbi

On Wed, Sep 14, 2016 at 11:08 AM Pedro M. Baeza (Tecnativa) <pedro.baeza@tecnativa.com> wrote:
I haven't tested it yet also. One thing I have doubts now: does it filter commits for including only the current module (but not commit affecting several modules)?

Regards.

2016-09-14 10:53 GMT+02:00 Stéphane Bidoul <stephane.bidoul@acsone.eu>:
Thanks for the feedback Pedro. 

By the way I have not tested it but I think it works also if the module being migrated does not yet exist on the 9.0 branch.

-sbi

On Wed, Sep 14, 2016 at 10:23 AM Pedro M. Baeza (Tecnativa) <pedro.baeza@tecnativa.com> wrote:
I have tried your procedure, Stephane, and it works very well, so for me we can switch the current procedure (I wrote it) with yours. I have only added one step to ensure 8.0 branch exists before making the rest of the steps.

Regards.
2016-09-12 16:53 GMT+02:00 Jairo Llopis <jairo.llopis@tecnativa.com>:
2016-09-09 17:52 GMT+02:00 <Bidoul@pad.odoo-community.org>:
I recently experienced difficulties with the usual migration procedure.
I got a similar problem for updating the website_slides backport (so it's not exactly the "usual" procedure).

Here's my solution, although it is in Spanish (I bet you know how to use Google Translator ;)

Indeed the process needs some polishing. Filtering by date may work most times, but sometimes the merge takes place after that date, but the commit you are merging took place before, so it would get excluded.


--
Jairo Llopis

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

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

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

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

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



********************************************************************************
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à
l'intention exclusive de ses destinataires et sont confidentiels. Si vous
recevez ce message par erreur, merci de le détruire et d'en avertir
immédiatement l'expéditeur. Toute utilisation de ce message non conforme à sa
destination, toute diffusion ou toute publication, totale ou partielle, est
interdite, sauf autorisation expresse. L'internet ne permettant pas d'assurer
l'intégrité de ce message, SYLEAM décline toute responsabilité au titre de ce
message, dans l'hypothèse où il aurait été modifié.

This message and any attachments (the "message") is intended solely for the
addressees and is confidential. If you receive this message in error, please
delete it and immediately notify the sender. Any use not in accord with its
purpose, any dissemination or disclosure, either whole or partial, is prohibited
except after formal approval. The internet can not guarantee the integrity of
this message. SYLEAM cannot therefore be liable for the message if modified.
********************************************************************************

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


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



********************************************************************************
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à
l'intention exclusive de ses destinataires et sont confidentiels. Si vous
recevez ce message par erreur, merci de le détruire et d'en avertir
immédiatement l'expéditeur. Toute utilisation de ce message non conforme à sa
destination, toute diffusion ou toute publication, totale ou partielle, est
interdite, sauf autorisation expresse. L'internet ne permettant pas d'assurer
l'intégrité de ce message, SYLEAM décline toute responsabilité au titre de ce
message, dans l'hypothèse où il aurait été modifié.

This message and any attachments (the "message") is intended solely for the
addressees and is confidential. If you receive this message in error, please
delete it and immediately notify the sender. Any use not in accord with its
purpose, any dissemination or disclosure, either whole or partial, is prohibited
except after formal approval. The internet can not guarantee the integrity of
this message. SYLEAM cannot therefore be liable for the message if modified.
********************************************************************************

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


Reference