@@ -2254,75 +2254,31 @@ If you are new to submitting patches to open source or new to submitting patches
22542254 link:https://commons.apache.org/[Apache Commons Project].
22552255It provides a nice overview that applies equally to the Apache HBase Project.
22562256
2257- [[submitting.patches.create]]
2258- ==== Create Patch
2259-
2260- Make sure you review <<common.patch.feedback,common.patch.feedback>> for code style. If your
2261- patch
2257+ Make sure you review <<common.patch.feedback,common.patch.feedback>> for code style. If your patch
22622258was generated incorrectly or your code does not adhere to the code formatting guidelines, you may
22632259be asked to redo some work.
22642260
2265-
2266- .Using submit-patch.py (recommended)
2261+ HBase enforces code style via a maven plugin. After you've written up your changes, apply the
2262+ formatter before committing.
22672263
22682264[source,bourne]
2269- ----
2270- $ dev-support/submit-patch.py -jid HBASE-xxxxx
2271- ----
2272-
2273- Use this script to create patches, upload to jira and optionally create/update reviews on
2274- Review Board. Patch name is automatically formatted as _(JIRA).(branch name).(patch number).patch_
2275- to follow Yetus' naming rules. Use `-h` flag to know detailed usage information. Most useful options
2276- are:
2277-
2278- * `-b BRANCH, --branch BRANCH` : Specify base branch for generating the diff. If not specified,
2279- tracking branch is used. If there is no tracking branch, error will be thrown.
2280- * `-jid JIRA_ID, --jira-id JIRA_ID` : If used, deduces next patch version from attachments in the
2281- jira and uploads the new patch. Script will ask for jira username/password for authentication.
2282- If not set, patch is named <branch>.patch.
2283-
2284- By default, it'll also create/update review board. To skip that action, use `-srb` option. It uses
2285- 'Issue Links' in the jira to figure out if a review request already exists. If no review
2286- request is present, then creates a new one and populates all required fields using jira summary,
2287- patch description, etc. Also adds this review's link to the jira.
2288-
2289- Save authentication credentials (optional)::
2290- Since attaching patches on JIRA and creating/changing review request on ReviewBoard requires
2291- valid user authentication, the script will prompt you for username and password. To avoid the hassle every
2292- time, set up `~/.apache-creds` with login details and encrypt it by following the steps in footer
2293- of script's help message.
2294-
2295- Python dependencies:: To install required python dependencies, execute
2296- `pip install -r dev-support/python-requirements.txt` from the master branch.
2297-
2298- .Manually
2299-
2300- . Use `git rebase -i` first, to combine (squash) smaller commits into a single larger one.
2301- . Create patch using IDE or Git commands. `git format-patch` is preferred since it preserves patch
2302- author's name and commit message. Also, it handles binary files by default, whereas `git diff`
2303- ignores them unless you use the `--binary` option.
2304- . Patch name should be as follows to adhere to Yetus' naming convention: +
2305- `(JIRA).(branch name).(patch number).patch` +
2306- For eg. HBASE-11625.master.001.patch, HBASE-XXXXX.branch-1.2.0005.patch, etc.
2307- . Attach the patch to the JIRA using `More->Attach Files` then click on btn:[Submit Patch]
2308- button, which'll trigger Hudson job to check patch for validity.
2309- . If your patch is longer than a single screen, also create a review on Review Board and
2310- add the link to JIRA. See <<reviewboard,reviewboard>>.
2311-
2265+ ---
2266+ $ mvn spotless:apply
2267+ ---
23122268
2269+ When your commit is ready, present it to the community as a
2270+ link:https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests[GitHub Pull Request].
23132271
23142272.Few general guidelines
23152273* Always patch against the master branch first, even if you want to patch in another branch.
2316- HBase committers always apply patches first to the master branch, and backport if necessary.
2317- * Submit one single patch for a fix. If necessary, squash local commits to merge local commits into
2318- a single one first. See this
2274+ HBase committers always apply patches first to the master branch, and backport as necessary. For
2275+ complex patches, you may be asked to perform the backport(s) yourself.
2276+ * Submit one single PR for a single fix. If necessary, squash local commits to merge local commits
2277+ into a single one first. See this
23192278 link:http://stackoverflow.com/questions/5308816/how-to-use-git-merge-squash[Stack Overflow
23202279 question] for more information about squashing commits.
23212280* Please understand that not every patch may get committed, and that feedback will likely be
23222281 provided on the patch.
2323- * If you need to revise your patch, leave the previous patch file(s) attached to the JIRA, and
2324- upload a new one with incremented patch number. +
2325- Click on btn:[Cancel Patch] and then on btn:[Submit Patch] to trigger the presubmit run.
23262282
23272283[[submitting.patches.tests]]
23282284==== Unit Tests
0 commit comments