Table of Contents | ||||
---|---|---|---|---|
|
Excerpt |
---|
Documents a basic overview of how we develop Trafodion. |
...
Table of Contents | ||||
---|---|---|---|---|
|
...
Anchor | ||||
---|---|---|---|---|
|
...
You create a private fork of Trafodion on https://github.com/apache/incubator-trafodion. Use the fork button top-right on the page to create your fork, which will be named <your-git-id>_fork
.
...
Code Block | ||||
---|---|---|---|---|
| ||||
# Move to the directory where you want to install the Trafodion source code. cd mysource # Clone the Trafodion source code git clone git://git.apache.org/incubator-trafodion.git # Change to the Trafodion source-tree directory cd trafodion # Register your fork as a remote branch git remote add trafdeveloper_fork git@github.com:trafdeveloper/incubator-trafodion |
At this point, you’ve finished all preparation steps. Now, you can start making changes.
...
Code Block | ||||
---|---|---|---|---|
| ||||
# Ensure that you have the latest changes
git fetch --all
# Checkout source
git checkout -b TRAFODION-1507 origin/master # or origin/releaseX.Y for a release patch |
Change Recipes
How to make changes depends on what part of the source tree you are working on. Please refer to the following chapters:
...
The Trafodion Automated Tests are triggered to run on every pull request. These tests take several 1-2 hours to run. We always run these tests even if you’ve changed Shorter tests run if you've changed only documentation or the web site to ensure that no inadvertent change to the rest of the source tree occurred as part of your changes. Please refer to Automated Tests for information about how to check the outcome of these tests.
...
- Go to https://github.com/apache/incubator-trafodion.
- Click the green Create Pull Request button.
- Review changes one more time before clicking Create Pull Request.
...
Please refer to https://help.github.com/articles/creating-a-pull-request/ for more documentation.
Using Git
...
Command Line (with Hub extension)
Do the following:
Code Block | ||||
---|---|---|---|---|
| ||||
# Generate pull request git pull-request |
...
The pull request gets reviewed by the committers and once other contributors. Once you get a consensus, then the committer merges your changes into the main incubator-target trafodion branch. Check your e-mail for comments.
...
- Check out the code:
git checkout TRAFODION-1507
- Make the requested changes.
- Run regression tests, if applicable.
- Commit the changes with appropriate change information:
git commit -a
- Push the changes back to your private git fork:
git push trafdeveloper_fork TRAFODION-1507
Info |
---|
The |
Warning |
---|
Do not use the |
Resolve Merge Conflicts
Sometimes someone else's changes reach the target branch (e.g., master) before yours and has a merge conflict with your changes. Github will flag that situation in the status of your pull request. Before your changes can be merged, you must resolve conflicts in your pull request. This is the same process as above, making code changes, except that a merge command is done to create the changes.
Using the prior example:
- Check out the code:
git checkout TRAFODION-1507
- git fetch origin
- git merge origin/master
- Resolve conflicts.
- Run regression tests, if applicable.
- Commit the changes with appropriate change information:
git commit -a
- Push the changes back to your private git fork:
git push trafdeveloper_fork TRAFODION-1507
Change Merge
If all is well, a committer will merge your change into the Apache repository, which is mirrored on GitHub. You may be asked to close out the JIRA or other follow up.
Your change is done. Thanks for your contribution to Trafodion.
...