Skip to content

Commit 1d847ba

Browse files
committed
DOC: change branch and backport guidelines
1 parent 45598c8 commit 1d847ba

File tree

1 file changed

+54
-21
lines changed

1 file changed

+54
-21
lines changed

doc/devel/coding_guide.rst

Lines changed: 54 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,10 @@ Pull request checklist
1212
Branch selection
1313
----------------
1414

15-
* In general, simple bugfixes that are unlikely to introduce new bugs
16-
of their own should be merged onto the maintenance branch. New
17-
features, or anything that changes the API, should be made against
18-
master. The rules are fuzzy here -- when in doubt, target master.
15+
In general target the master branch for all new features and
16+
bug-fixes. PRs may target maintenance or doc branches on
17+
a case-by-case basis.
1918

20-
* Once changes are merged into the maintenance branch, they should
21-
be merged into master.
2219

2320
Documentation
2421
-------------
@@ -87,31 +84,67 @@ PR Review guidelines
8784
merge the PR and then open a new PR against upstream.
8885

8986

90-
Backports
91-
=========
87+
Branches and Backports
88+
======================
9289

9390

94-
When doing backports please include the branch you backported the
95-
commit to along with the SHA in a comment on the original PR.
91+
The current active branches are
9692

97-
We do a backport from master to v2.0.x assuming:
93+
*master*
94+
This will be Matplotlib 3.0. Supports python 3.5+.
9895

99-
* ``matplotlib`` is a read-only remote branch of the matplotlib/matplotlib repo
96+
*v2.2.x*
97+
Maintenance branch for Matplotlib 2.2 LTS. Supports python 2.7, 3.4+
98+
99+
*v2.2.2-doc*
100+
Documentation for the current release.
101+
102+
103+
We always will backport to 2.2.x
104+
105+
- critical bug fixes (segfault, failure to import, things that the
106+
user can not work around)
107+
- fixes for regressions against 2.0 or 2.1
108+
109+
Everything else (regressions against 1.x versions, bugs/api
110+
inconsistencies the user can work around in their code) are on a
111+
case-by-case basis, should be low-risk, and need someone to advocate
112+
for and shepherd through the backport.
113+
114+
Automated backports
115+
-------------------
100116

101-
* ``DANGER`` is a read/write remote branch of the matplotlib/matplotlib repo
117+
We use meeseeksdev bot to automatically backport merges to the correct
118+
maintenance branch based on the milestone assigned to the PR. The
119+
target branch is configured by putting ``on-merge: backport to
120+
TARGETBRANCH`` in the milestone description.
121+
122+
The bot can also be manually triggered after a merge by leaving a
123+
message ``@meeseeksdev backport to BRANCH`` on the PR.
124+
125+
If there are conflicts meeseekdevs will inform you that the backport
126+
needs to be done manually.
127+
128+
Manual backports
129+
----------------
130+
131+
When doing backports please copy the form used by meeseekdev,
132+
``Backport PR #XXXX: TITLE OF PR``. If you need to manually resolve
133+
conflicts make note of them and how you resolved them in the commit
134+
message.
135+
136+
We do a backport from master to v2.2.x assuming:
137+
138+
* ``matplotlib`` is a read-only remote branch of the matplotlib/matplotlib repo
102139

103140
The ``TARGET_SHA`` is the hash of the merge commit you would like to
104141
backport. This can be read off of the github PR page (in the UI with
105142
the merge notification) or through the git CLI tools.::
106143

107144
git fetch matplotlib
108-
git checkout v2.0.x
109-
git merge --ff-only matplotlib/v2.0.x
145+
git checkout v2.2.x
146+
git merge --ff-only matplotlib/v2.2.x
110147
git cherry-pick -m 1 TARGET_SHA
111-
git log --graph --decorate # to look at it
112-
# local tests? (use your judgment)
113-
git push DANGER v2.0.x
114-
# leave a comment on PR noting sha of the resulting commit
115-
# from the cherry-pick + branch it was moved to
148+
# resolve conflicts and commit if required
116149

117-
These commands work on git 2.7.1.
150+
Use your discretion to push directly to upstream or to open a PR.

0 commit comments

Comments
 (0)