How to contribute your first patch to Mesos

1.  Warm up with Mesos
Follow http://mesos.apache.org/gettingstarted/ to build and run Mesos first. If want to commit patch, make sure use git to clone to code.

2. Commit Patch Process
2.1 Check out code
gyliu@devstack007:˜/src/mesos/m2$ git clone  git@github.com:apache/mesos.git
Cloning into 'mesos'...
remote: Counting objects: 56156, done.
remote: Compressing objects: 100% (239/239), done.
remote: Total 56156 (delta 80), reused 16 (delta 16), pack-reused 55897
Receiving objects: 100% (56156/56156), 227.49 MiB | 2.45 MiB/s, done.
Resolving deltas: 100% (39707/39707), done.
Checking connectivity... done.
gyliu@devstack007:˜/src/mesos/m2$ cd mesos
gyliu@devstack007:˜/src/mesos/m2/mesos$ git config --global user.name "xxx"
gyliu@devstack007:˜/src/mesos/m2/mesos$ git config --global user.email " xxx@xxx.com"

2.2 Create a new branch, we cannot modify directly on master branch but only your own branch.
gyliu@devstack007:˜/src/mesos/m2/mesos$ git checkout -b test
Switched to a new branch 'test'

2.3 Update code
Modify the code as you want

gyliu@devstack007:˜/src/mesos/m2/mesos$ git status
On branch test
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   README.md

no changes added to commit (use "git add" and/or "git commit -a")
gyliu@devstack007:˜/src/mesos/m2/mesos$ git diff
diff --git a/README.md b/README.md
index 8ad18f0..ba7774f 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
Apache Mesos is a cluster manager that provides efficient resource isolation
and sharing across distributed applications, or frameworks. It can run Hadoop,
MPI, Hypertable, Spark, and other frameworks on a dynamically shared pool of
-nodes.
+nodes1.

Visit us at [mesos.apache.org]( http://mesos.apache.org).

@@ -25,4 +25,4 @@ Instructions are included on the [Getting Started]( http://mesos.apache.org/getti

Apache Mesos is licensed under the [Apache License, Version 2.0]( http://www.apache.org/licenses/LICENSE-2.0).

-For additional information, see the LICENSE and NOTICE files.
\ No newline at end of file
+For additional information, see the LICENSE and NOTICE files.

2.4 Commit the code to your local repo
gyliu@devstack007:˜/src/mesos/m2/mesos$ git status
On branch test
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   README.md

no changes added to commit (use "git add" and/or "git commit -a")
gyliu@devstack007:˜/src/mesos/m2/mesos$ git add .
gyliu@devstack007:˜/src/mesos/m2/mesos$ git commit -a

2.5 Link reviewboardrc
gyliu@devstack007:˜/src/mesos/m2/mesos$ ln -s support/reviewboardrc .reviewboardrc
gyliu@devstack007:˜/src/mesos/m2/mesos$ cat .reviewboardrc
REVIEWBOARD_URL = " https://reviews.apache.org/"
REPOSITORY_URL = " git://git.apache.org/mesos.git"
REPOSITORY = "mesos"
TARGET_GROUPS = "mesos"
gyliu@devstack007:˜/src/mesos/m2/mesos$

2.6 Install RBtools if you do not have it installed https://www.reviewboard.org/docs/rbtools/dev/
2.7 Check your patch status:

gyliu@devstack007:˜/src/mesos/m2/mesos$ rbt status
WARNING: The repository detected in the current directory was not found on
the Review Board server. Displaying review requests from all repositories.
* r/36383 - Hello Mesos

2.8 Upload the new patch
gyliu@devstack007:˜/src/mesos/m2/mesos$ support/post-reviews.py
Running 'rbt post' across all of ...
fddc5622c8b449abb5d90bd5efcb9a245e16ed78 - (HEAD, test) Hello Mesos (3 minutes ago)

Creating diff of:
fddc5622c8b449abb5d90bd5efcb9a245e16ed78 - (HEAD, test) Hello Mesos

Press enter to continue or 'Ctrl-C' to skip.

Review request #36385 posted.

https://reviews.apache.org/r/36385/
https://reviews.apache.org/r/36385/diff/
gyliu@devstack007:˜/src/mesos/m2/mesos$ rbt status
WARNING: The repository detected in the current directory was not found on
the Review Board server. Displaying review requests from all repositories.
* r/36385 - Hello Mesos
* r/36383 - Hello Mesos
gyliu@devstack007:˜/src/mesos/m2/mesos$

2.9 Publish your patch
Open your patch link in 2.8, such as https://reviews.apache.org/r/36385/ , click "Publish" to publish your patch if you think it is ready for review.

2.10 Check your own patches
You can also check all of your patches via https://reviews.apache.org/dashboard/?view=mine
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值