Skip to content

Migration to version 8.0

Pedro M. Baeza edited this page Nov 13, 2015 · 1 revision

Todo

Why

To work on OCA modules you will need to setup your work environment. The objective of the setup is to:

  • Use the OCA repository as your pull repository to get the latest version of the version 7.0 module code to convert.
  • Checkout only the module you wish to work on
  • Setup your own or your company’s github account with a fork of the OCA repository that contains the module you want to convert and set it up as your push repository.
  • Use your repository as a base to create a pull request (PR) to the OCA repository.
  • Keep the history of the 7.0 branch in the new 8.0 branch you will push.

How

Replace the following variables and brackets with the appropriate values in the git commands below.

  • repo: the OCA repository hosting the module
  • myrepo: your fork of the OCA repository
  • user: your Github login
  • module: the name of the module you want to migrate

Create your fork of the OCA repository before you start: https://help.github.com/articles/fork-a-repo/

$ git clone [email protected]:OCA/repo.git -b 8.0 # (target OCA branch)
$ cd repo
$ git checkout -b 7.0 origin/7.0
$ git checkout -b 8.0-module
$ git filter-branch --subdirectory-filter module # (This last step keeps and rewrites the history only for the selected addon.)
$ git filter-branch -f --tree-filter 'mkdir -v module; git mv -k * module' HEAD
$ git rebase 8.0
$ git remote add myrepo [email protected]:user/repo.git
$ git push myrepo 8.0-module

Cleanup

After porting/migrating a module the following tasks must be performed:

  • Monitor your pull request for code reviews and improvements as well as to see if the module has passed quality tests
  • You will need 3 positive reviews to get your module merged. Ask the community if you want it to be reviewed faster
  • Remove the module from the __unported__ folder

Initialization

Before migrating the first module of a repository, the following tasks must be performed:

  • Add 8.0 branch from 7.0
  • Move all modules to __unported__/
  • Edit .travis.yml and README.md to have the proper branch number
  • Make 8.0 default branch
  • Remove master branch