mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject git commit: Use RBT by default and correctly determine if version is >= 0.6
Date Wed, 22 Oct 2014 20:45:09 GMT
Repository: mesos
Updated Branches:
  refs/heads/master d9cd0e318 -> a561e68bb


Use RBT by default and correctly determine if version is >= 0.6

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


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

Branch: refs/heads/master
Commit: a561e68bb38b91ececf87279ec82f4986c898d70
Parents: d9cd0e3
Author: Dominic Hamon <dhamon@twitter.com>
Authored: Tue Oct 7 11:01:42 2014 -0700
Committer: Dominic Hamon <dhamon@twitter.com>
Committed: Wed Oct 22 13:44:23 2014 -0700

----------------------------------------------------------------------
 support/post-reviews.py | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/a561e68b/support/post-reviews.py
----------------------------------------------------------------------
diff --git a/support/post-reviews.py b/support/post-reviews.py
index 7b42d8e..a8ad94f 100755
--- a/support/post-reviews.py
+++ b/support/post-reviews.py
@@ -65,10 +65,11 @@ def execute(command, ignore_errors=False):
 
 # Choose 'post-review' if available, otherwise choose 'rbt'.
 post_review = None
-if execute(['post-review', '--version'], ignore_errors=True):
-  post_review = ['post-review']
-elif execute(['rbt', '--version'], ignore_errors=True):
+rbt_version = execute(['rbt', '--version'], ignore_errors=True)
+if rbt_version:
   post_review = ['rbt', 'post']
+elif execute(['post-review', '--version'], ignore_errors=True):
+  post_review = ['post-review']
 else:
   print 'Please install RBTools before proceeding'
   sys.exit(1)
@@ -191,11 +192,12 @@ for i in range(len(shas)):
         command = command + ['--review-request-id=' + review_request_id]
 
     # Determine how to specify the revision range.
-    if 'rbt' in post_review:
-        # rbt revisions are passed in as args.
+    if 'rbt' in post_review and rbt_version.startswith('RBTools 0.6'):
+        # rbt >= 0.6 revisions are passed in as args.
         command = command + sys.argv[1:] + [previous, sha]
     else:
-        # post-review revisions are passed in using the revision range option.
+        # post-review and rbt < 0.6 revisions are passed in using the revision
+        # range option.
         command = command + \
             ['--revision-range=' + revision_range] + \
             sys.argv[1:]


Mime
View raw message