You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2015/05/21 02:18:40 UTC

[1/3] mesos git commit: Moved the repository url constant to reviewboardrc.

Repository: mesos
Updated Branches:
  refs/heads/master 4dd48490d -> 80437f386


Moved the repository url constant to reviewboardrc.

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


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

Branch: refs/heads/master
Commit: 1af08abc0a9a250fc6d0db5ac3e1195365f8dce4
Parents: 4dd4849
Author: Jie Yu <yu...@gmail.com>
Authored: Wed May 20 11:03:25 2015 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Wed May 20 17:09:00 2015 -0700

----------------------------------------------------------------------
 support/post-reviews.py | 5 +----
 support/reviewboardrc   | 3 ++-
 2 files changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/1af08abc/support/post-reviews.py
----------------------------------------------------------------------
diff --git a/support/post-reviews.py b/support/post-reviews.py
index e871ceb..ec385a5 100755
--- a/support/post-reviews.py
+++ b/support/post-reviews.py
@@ -85,8 +85,6 @@ if diff_stat:
 
 top_level_dir = execute(['git', 'rev-parse', '--show-toplevel']).strip()
 
-repository = 'git://git.apache.org/mesos.git'
-
 parent_branch = 'master'
 
 branch_ref = execute(['git', 'symbolic-ref', 'HEAD']).strip()
@@ -190,8 +188,7 @@ for i in range(len(shas)):
     revision_range = previous + ':' + sha
 
     # Build the post-review/rbt command up to the point where they are common.
-    command = post_review + ['--repository-url=' + repository,
-                             '--tracking-branch=' + parent_branch]
+    command = post_review + ['--tracking-branch=' + parent_branch]
     if review_request_id:
         command = command + ['--review-request-id=' + review_request_id]
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/1af08abc/support/reviewboardrc
----------------------------------------------------------------------
diff --git a/support/reviewboardrc b/support/reviewboardrc
index 3cba12c..56bd8a5 100644
--- a/support/reviewboardrc
+++ b/support/reviewboardrc
@@ -1,3 +1,4 @@
 REVIEWBOARD_URL = "https://reviews.apache.org/"
-TARGET_GROUPS = "mesos"
+REPOSITORY_URL = "git://git.apache.org/mesos.git"
 REPOSITORY = "mesos"
+TARGET_GROUPS = "mesos"


[2/3] mesos git commit: Renamed parent_branch to tracking_branch in post-reviews.py.

Posted by ji...@apache.org.
Renamed parent_branch to tracking_branch in post-reviews.py.

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


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

Branch: refs/heads/master
Commit: 2e333790efd340291e246c6380da9a895deaa797
Parents: 1af08ab
Author: Jie Yu <yu...@gmail.com>
Authored: Wed May 20 11:16:18 2015 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Wed May 20 17:09:59 2015 -0700

----------------------------------------------------------------------
 support/post-reviews.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/2e333790/support/post-reviews.py
----------------------------------------------------------------------
diff --git a/support/post-reviews.py b/support/post-reviews.py
index ec385a5..485b2f9 100755
--- a/support/post-reviews.py
+++ b/support/post-reviews.py
@@ -85,7 +85,7 @@ if diff_stat:
 
 top_level_dir = execute(['git', 'rev-parse', '--show-toplevel']).strip()
 
-parent_branch = 'master'
+tracking_branch = 'master'
 
 branch_ref = execute(['git', 'symbolic-ref', 'HEAD']).strip()
 branch = branch_ref.replace('refs/heads/', '', 1)
@@ -103,7 +103,7 @@ atexit.register(lambda: execute(['git', 'branch', '-D', temporary_branch], True)
 # Always put us back on the original branch.
 atexit.register(lambda: execute(['git', 'checkout', branch]))
 
-merge_base = execute(['git', 'merge-base', parent_branch, branch_ref]).strip()
+merge_base = execute(['git', 'merge-base', tracking_branch, branch_ref]).strip()
 
 
 print 'Running \'%s\' across all of ...' % " ".join(post_review)
@@ -133,7 +133,7 @@ for line in log.split('\n'):
     shas.append(sha)
 
 
-previous = parent_branch
+previous = tracking_branch 
 parent_review_request_id = None
 for i in range(len(shas)):
     sha = shas[i]
@@ -175,7 +175,7 @@ for i in range(len(shas)):
           '--no-pager',
           'log',
           '--pretty=format:%Cred%H%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset',
-          parent_branch + '..' + previous])
+          tracking_branch + '..' + previous])
 
     try:
         raw_input('\nPress enter to continue or \'Ctrl-C\' to skip.\n')
@@ -188,7 +188,7 @@ for i in range(len(shas)):
     revision_range = previous + ':' + sha
 
     # Build the post-review/rbt command up to the point where they are common.
-    command = post_review + ['--tracking-branch=' + parent_branch]
+    command = post_review + ['--tracking-branch=' + tracking_branch]
     if review_request_id:
         command = command + ['--review-request-id=' + review_request_id]
 


[3/3] mesos git commit: Allowed post-reviews.py to configure tracking branch.

Posted by ji...@apache.org.
Allowed post-reviews.py to configure tracking branch.

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


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

Branch: refs/heads/master
Commit: 80437f3862aa34202497b4dbac7c8c94c6f4c008
Parents: 2e33379
Author: Jie Yu <yu...@gmail.com>
Authored: Wed May 20 11:40:14 2015 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Wed May 20 17:17:31 2015 -0700

----------------------------------------------------------------------
 support/post-reviews.py | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/80437f38/support/post-reviews.py
----------------------------------------------------------------------
diff --git a/support/post-reviews.py b/support/post-reviews.py
index 485b2f9..5733298 100755
--- a/support/post-reviews.py
+++ b/support/post-reviews.py
@@ -22,6 +22,7 @@
 # NOTE: post-reviews is currently specific to Mesos development,
 # but can easily be adapted for other projects.
 
+import argparse
 import atexit
 import os
 import sys
@@ -85,7 +86,13 @@ if diff_stat:
 
 top_level_dir = execute(['git', 'rev-parse', '--show-toplevel']).strip()
 
-tracking_branch = 'master'
+# Use the tracking_branch specified by the user if exists.
+# TODO(jieyu): Parse .reviewboardrc as well.
+parser = argparse.ArgumentParser(add_help=False)
+parser.add_argument('--tracking-branch')
+args, _ = parser.parse_known_args()
+
+tracking_branch = args.tracking_branch if args.tracking_branch else 'master'
 
 branch_ref = execute(['git', 'symbolic-ref', 'HEAD']).strip()
 branch = branch_ref.replace('refs/heads/', '', 1)
@@ -188,7 +195,11 @@ for i in range(len(shas)):
     revision_range = previous + ':' + sha
 
     # Build the post-review/rbt command up to the point where they are common.
-    command = post_review + ['--tracking-branch=' + tracking_branch]
+    command = post_review
+
+    if args.tracking_branch is None:
+        command = command + ['--tracking-branch=' + tracking_branch]
+
     if review_request_id:
         command = command + ['--review-request-id=' + review_request_id]