You need the source code tree to work with. You can clone the repo either from
official Apache Bigtop repo
git clone https://gitbox.apache.org/repos/asf/bigtop.git |
We use git as our version control system. To streamline the process of giving proper credit to the contributors when committing patches, we encourage contributors to submit patches generated using git format-patch
. This has many benefits:
git format-patch
Long story short, it makes both the contributors' and committers' lives easier, so please generate your patches using git format-patch
.
Here are some instructions on how to generate patches:
BIGTOP-1031: README has outdated/ambiguous information
Run mvn apache-rat:check
to make sure that newly added files do not have any licensing issues. When in doubt refer to https://www.apache.org/licenses/The naming of the patch file is up to you. The preferred way however is to just name the file after the JIRA ticket e.g. BIGTOP-1031.patch. In the latter case, If case you need to upload another version of the patch, you should keep the file name the same and JIRA will sort them according to date/time if multiple files have the same name. This feature is also useful to traceback the history of a patch and roll-back to an earlier version if needed.
BIGTOP-1031: README has outdated/ambiguous information
BIGTOP-1031: README has outdated/ambiguous information
The steady pace of the contributions relies on how effectively we can review, give feedback, and commit new patches. JIRA provides a nice workflow that allows to indicate which patches are ready for a review. Once you decided that your patch is good for others' comments change the JIRA status to Patch Available. That will be the indication to anyone that a comments and review are requested. For your convenience, here's the filter that shows all JIRAs in PA state
Contributors and Committers: Go over this checklist for your patches
(Hopefully more of this will be automated by https://issues.apache.org/jira/browse/BIGTOP-1249 )
While git am
is typically used for applying patches generated using git format-patch
, we recommend that committers use the --signoff
flag when using git am
. This way the commit, even though is attributed to the contributor, it shows the committer's name in the log message as "Signed-off-by: <Committer name>" which can be useful.
Consequently, to commit a patch, do the following:
git am --signoff < BIGTOP-1031.patch |
Once the patch is committed, please update the JIRA ticket:
This section is to talk about how Bigtop deal with the situation that a patch needs to be committed in both master and release branch. This often happened when a bug is discovered at the time we already created the release branch. To handle such scenario, Bigtop uses feature branch model. (To know more about git branching model, see http://nvie.com/posts/a-successful-git-branching-model/)
For instance, if patch BIGTOP-1886.patch is getting in both master and branch-1.0, then we should create a feature branch from branch-1.0 named BIGTOP-1886, and add BIGTOP-1886.patch on top of BIGTOP-1886 branch, then merge BIGTOP-1886 branch into master and branch-1.0, respectively. This will give same commit sha1 of patch BIGTOP-1886 in both branch-1.0 and master.
Here's a concrete example for what to do when we'd like to add fix 1 and fix 2 in both branch-1.0 and master. The example was contributed by Olaf Flebbe.
#inital setup of repo git init # Development step on master echo step1 >file git add file git commit -m step1 # Now we branch the release candidate git checkout -b branch-1.0 # and doing the release echo release >changelog git add changelog git commit -m "release-1.0 branch finished" git tag release-1.0.0 # development on master continues git checkout master echo development > development git add development git commit -m "development on master" # Oops two fixes are needed # create a working branch for these git checkout branch-1.0 git checkout -b fixes-1.0 echo "fix 1 1.0" to >fix10 echo "fix 2 1.0" to >fix20 git add fix10 git commit -m "fix 1 on 1.0.0" fix10 git add fix20 git commit -m "fix 2 on 1.0.0" fix20 # merge fix branch in release branch0 git checkout branch-1.0 git merge -m "merge fixes-1.0" fixes-1.0 # new release echo release 1.0.1 >> changelog git add changelog git commit -m "release-1.0.1" git tag release-1.0.1 # Merge fixes on development, too git checkout master git merge -m "merge fixes-1.0" fixes-1.0 # continue development echo devel >>development git commit -a -m "development2" |