You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2013/07/17 02:21:57 UTC

git commit: Reverted the post-reviews.py hacks.

Updated Branches:
  refs/heads/master ea69c0123 -> 14430d693


Reverted the post-reviews.py hacks.

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


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

Branch: refs/heads/master
Commit: 14430d693a2c3944d5478f1cac6adde46561539c
Parents: ea69c01
Author: Benjamin Mahler <bm...@twitter.com>
Authored: Tue Jul 16 16:44:47 2013 -0700
Committer: Benjamin Mahler <bm...@twitter.com>
Committed: Tue Jul 16 17:21:30 2013 -0700

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


http://git-wip-us.apache.org/repos/asf/mesos/blob/14430d69/support/post-reviews.py
----------------------------------------------------------------------
diff --git a/support/post-reviews.py b/support/post-reviews.py
index ef6c9a2..602e660 100755
--- a/support/post-reviews.py
+++ b/support/post-reviews.py
@@ -65,7 +65,7 @@ if diff_stat:
 
 top_level_dir = execute(['git', 'rev-parse', '--show-toplevel']).strip()
 
-repository = 'git://git.apache.org/incubator-mesos.git'
+repository = 'git://git.apache.org/mesos.git'
 
 parent_branch = 'master'
 
@@ -157,36 +157,17 @@ for i in range(len(shas)):
 
     revision_range = previous + ':' + sha
 
-    #################################################################
-    # THIS IS A GIANT HACK FOR GETTING POST-REVIEWS TO WORK UNTIL
-    # APACHE INFRASTRUCTURE MANAGES TO FIX REVIEW BOARD!
-
-    # Create a temporary branch from incubator-mesos/master.
-    hack_temporary_branch = '_post-reviews_' + branch + '_' + str(i)
-    execute(['git', 'checkout', '--track', '-b', hack_temporary_branch, 'incubator-mesos/master'])
-    atexit.register(lambda: execute(['git', 'branch', '-D', hack_temporary_branch], True))
-
-    # Then 'cherry-pick' from 'git merge-base incubator-mesos/master
-    # master' to 'sha'. This assumes your branch's parent is 'master'.
-    hack_merge_base = execute(['git', 'merge-base', hack_temporary_branch, 'master']).strip()
-    execute(['git', 'cherry-pick', hack_merge_base + '..' + sha])
-
-    # Then post-review with '--tracking-branch=incubator-mesos/master'
-    # and '--revision-range=HEAD~1:HEAD'
     if review_request_id is None:
         output = execute(['post-review',
                           '--repository-url=' + repository,
-                          '--tracking-branch=incubator-mesos/master',
-                          '--revision-range=HEAD~1:HEAD'] + sys.argv[1:]).strip()
+                          '--tracking-branch=' + parent_branch,
+                          '--revision-range=' + revision_range] + sys.argv[1:]).strip()
     else:
         output = execute(['post-review',
                           '--review-request-id=' + review_request_id,
                           '--repository-url=' + repository,
-                          '--tracking-branch=incubator-mesos/master',
-                          '--revision-range=HEAD~1:HEAD'] + sys.argv[1:]).strip()
-    execute(['git', 'checkout', branch])
-    execute(['git', 'branch', '-D', hack_temporary_branch])
-    #################################################################
+                          '--tracking-branch=' + parent_branch,
+                          '--revision-range=' + revision_range] + sys.argv[1:]).strip()
 
     print output