From 6ce395f85bbfd15d0add04f1d98c4eb5ee2e7bad Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Thu, 21 Oct 2021 16:57:44 +0000 Subject: [PATCH] 5.0: update branching policies --- Branches.md | 67 +++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 50 insertions(+), 17 deletions(-) diff --git a/Branches.md b/Branches.md index 2433462..af70222 100644 --- a/Branches.md +++ b/Branches.md @@ -3,57 +3,90 @@ The OpenCV repository has several branches with different contribution policies. Common rules for all branches ----------------------------- -* Your development branch name must differ from the names of branches in the central OpenCV repository, i.e. your branch must not be named _2.4_, _3.4_ or _master_ (it's a technical requirement specific to our continuous integration system) -* Multiple related commits should be [squashed](http://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) into one. A pull request must contain either a single commit, or several unrelated commits. +* Your development branch name must differ from the names of branches in the upstream OpenCV repository, i.e. your branch must **NOT** be named _2.4_, _3.4_, _4.x_, _5.x_, or _master_/_next_ + (it's a technical requirement specific to our continuous integration system to properly test multi-repository patches with opencv_extra/opencv_contrib) +* Multiple related commits should be [squashed](http://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) into one. + A pull request must contain either a single commit, or several unrelated commits (e.g, commit with test + commit with code fix) + Branches and contribution policies in OpenCV -------------------------------------------- -### 2.4 +Please target Pull Requests (PR) to the right branches. -This is the branch for [2.4.x](https://github.com/opencv/opencv/tree/2.4) releases. -* Only critical bugfixes will be accepted +### 5.x + +This is the development branch for upcoming [5.x](https://github.com/opencv/opencv/tree/5.x) releases. + +* API compatibility must be preserved +* If your pull request contains a bug fix which is also applicable to the _3.4_ or _4.x_ branch, you should choose that branch as "base" +* If you've already created pull request based on the _5.x_ branch, but it is also applicable to _4.x_, you will be asked to rebase it to 4.x/3.4 branches, see the instruction in the following section. + + +### 4.x + +This is the branch for [4.x](https://github.com/opencv/opencv/tree/4.x) releases. + +* API compatibility must be preserved +* Incompatible improvements or large features should be targeted to _5.x_ branch +* Compatible improvements or small features should go to _4.x_ branch +* If your pull request contains a bug fix which is also applicable to the _3.4_ branch, you should choose that branch as "base" +* If you've already created pull request based on the _4.x_ branch, but it is also applicable to _3.4_, you will be asked to rebase it to 3.4, see the instruction in the following section. +* We will merge changes from _4.x_ into _5.x_ regularly (weekly/bi-weekly) + There is no regular process for backporting patches from _5.x_ branch + ### 3.4 This is the branch for [3.4.x](https://github.com/opencv/opencv/tree/3.4) releases. +This release series is in the maintenance status. Releases with binary artifacts are not planned. * ABI compatibility must be preserved -* We will merge changes from _3.4_ into _master_ regularly (weekly/bi-weekly), so if your pull request is applicable to both branches, you should choose _3.4_ branch as base, not _master_. There is no regular process for backporting patches from _master_ branch. * Target this branch in case of these patches: * bug fixes * optimizations * documentation improvements - * sample improvements or adding new samples for existing functionality - * small improvements or new features which don't break compatibility with previous releases * and other patches which are applicable for the _3.4_ branch +* Improvements or features should be targeted to _4.x_ or _5.x_ branches +* We will merge changes from _3.4_ into _4.x_ regularly (weekly/bi-weekly) + So if your pull request contains a bug fix and it is applicable to several branches, you should choose _3.4_ branch as base + There is no regular process for backporting patches from _4.x_, _5.x_ branches -### master -This is the current development branch for [4.x](https://github.com/opencv/opencv/tree/master) releases. +### EOL branches -* API compatibility must be preserved -* If your pull request is also applicable to the _3.4_ branch, you should choose that branch as "base" -* If you've already created pull request based on the _master_ branch, but it is also applicable to _3.4_, you will be asked to rebase it to 3.4, see the instruction in the following section. +EOL branches: +- "2.4": this is the branch for [2.4.x](https://github.com/opencv/opencv/tree/2.4) releases. This release series is EOL in 2020. CI is turned off, so no more patches are accepted to 2.4 branch. -Rebasing a pull request from _master_ to _3.4_ + +### master / next + +"master" branch is a shadow copy of 4.x development branch kept for compatibility purposes. After 5.0 release this branch will shadow _5.x_ branch. +"next" branch is a shadow copy of 5.x development branch kept for compatibility purposes. It will be removed after 5.0 release. +Merge to this branches is prohibited. Use 4.x / 5.x as target branches for your PRs. + + +Rebasing a pull request between branches ---------------------------------------------- _If you can not do this by yourself, please ask maintainers for help._ +Example of rebasing from 4.x branch to 3.4 branch: * do not close the existing pull request -* change the "base" branch of the pull request +* change the "base" branch of the pull request: + * open PR on GitHub in your browser * press the "Edit" button near the pull request title * choose "3.4" from the dropdown list -* rebase your commits from master onto 3.4 +* rebase your commits from 4.x onto 3.4: * `git checkout ` * (optional) create a backup branch: `git branch -backup` * `git remote update upstream` (assuming _upstream_ [is pointing](https://help.github.com/articles/configuring-a-remote-for-a-fork/) to the `opencv/opencv` GitHub repository) - * `git rebase -i --onto upstream/3.4 upstream/master` + * `git rebase -i --onto upstream/3.4 upstream/4.x` * an editor will be opened. Please check the list of commits - there should be only your commits - save and exit * `git push --force origin ` (assuming _origin_ [is pointing](https://help.github.com/articles/configuring-a-remote-for-a-fork/) to `/opencv` forked GitHub repository) + Related articles ----------------