You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bb...@apache.org on 2018/01/11 09:15:57 UTC

mesos git commit: Fixed post-reviews for posting reviews from `master` branch.

Repository: mesos
Updated Branches:
  refs/heads/master 81937e5e4 -> 164d99e1b


Fixed post-reviews for posting reviews from `master` branch.

The post-reviews script allows to specify the tracking branch against
which to post reviews; we default to creating patches against
`master`.

The script also contains some protection against posting reviews from
the tracking branch, but this protection seems to predate the tracking
branch configuration flag. Instead we also disallow posting patches
from the `master` branch, even if the tracking branch is not `master`.

This patch fixes this sanity check to check that the current and
tracking branch are different.

Review: https://reviews.apache.org/r/65073/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/164d99e1
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/164d99e1
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/164d99e1

Branch: refs/heads/master
Commit: 164d99e1be7ab9901ca743a83fda3d3e1c3f2956
Parents: 81937e5
Author: Benjamin Bannier <be...@mesosphere.io>
Authored: Thu Jan 11 09:51:32 2018 +0100
Committer: Benjamin Bannier <bb...@apache.org>
Committed: Thu Jan 11 09:53:54 2018 +0100

----------------------------------------------------------------------
 support/post-reviews.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/164d99e1/support/post-reviews.py
----------------------------------------------------------------------
diff --git a/support/post-reviews.py b/support/post-reviews.py
index 7e3f0f4..231a3ac 100755
--- a/support/post-reviews.py
+++ b/support/post-reviews.py
@@ -183,9 +183,10 @@ def main():
     branch_ref = execute(['git', 'symbolic-ref', 'HEAD']).strip()
     branch = branch_ref.replace('refs/heads/', '', 1)
 
-    # do not work on master branch
-    if branch == "master":
-        print "We're expecting you to be working on another branch from master!"
+    # Do not work on the tracking branch.
+    if branch == tracking_branch:
+        print "We're expecting you to be working on another branch" \
+              " from {}!".format(tracking_branch)
         sys.exit(1)
 
     temporary_branch = '_post-reviews_' + branch