You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by rx...@apache.org on 2014/02/09 22:54:32 UTC

git commit: Merge pull request #569 from pwendell/merge-fixes.

Updated Branches:
  refs/heads/master b69f8b2a0 -> 94ccf869a


Merge pull request #569 from pwendell/merge-fixes.

Fixes bug where merges won't close associated pull request.

Previously we added "Closes #XX" in the title. Github will sometimes
linbreak the title in a way that causes this to not work. This patch
instead adds the line in the body.

This also makes the commit format more concise for merge commits.
We might consider just dropping those in the future.

Author: Patrick Wendell <pw...@gmail.com>

Closes #569 and squashes the following commits:

732eba1 [Patrick Wendell] Fixes bug where merges won't close associated pull request.


Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/94ccf869
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/94ccf869
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/94ccf869

Branch: refs/heads/master
Commit: 94ccf869aacbe99b7ca7a40ca585a759923cb407
Parents: b69f8b2
Author: Patrick Wendell <pw...@gmail.com>
Authored: Sun Feb 9 13:54:27 2014 -0800
Committer: Reynold Xin <rx...@apache.org>
Committed: Sun Feb 9 13:54:27 2014 -0800

----------------------------------------------------------------------
 dev/merge_spark_pr.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/94ccf869/dev/merge_spark_pr.py
----------------------------------------------------------------------
diff --git a/dev/merge_spark_pr.py b/dev/merge_spark_pr.py
index 40a02cb..03f8fc2 100755
--- a/dev/merge_spark_pr.py
+++ b/dev/merge_spark_pr.py
@@ -93,10 +93,11 @@ def merge_pr(pr_num, target_ref):
     '--pretty=format:%an <%ae>']).split("\n")
   distinct_authors = sorted(set(commit_authors), key=lambda x: commit_authors.count(x), reverse=True)
   primary_author = distinct_authors[0]
-  commits = run_cmd(['git', 'log', 'HEAD..%s' % pr_branch_name]).split("\n\n")
+  commits = run_cmd(['git', 'log', 'HEAD..%s' % pr_branch_name, 
+    '--pretty=format:%h [%an] %s']).split("\n\n")
 
-  merge_message = "Merge pull request #%s from %s. Closes #%s.\n\n%s\n\n%s" % (
-    pr_num, pr_repo_desc, pr_num, title, body)
+  merge_message = "Merge pull request #%s from %s.\n\n%s\n\n%s" % (
+    pr_num, pr_repo_desc, title, body)
   merge_message_parts = merge_message.split("\n\n")
   merge_message_flags = []
 
@@ -104,7 +105,8 @@ def merge_pr(pr_num, target_ref):
     merge_message_flags = merge_message_flags + ["-m", p]
   authors = "\n".join(["Author: %s" % a for a in distinct_authors])
   merge_message_flags = merge_message_flags + ["-m", authors]
-  merge_message_flags = merge_message_flags + ["-m", "== Merge branch commits =="]
+  merge_message_flags = merge_message_flags + [
+    "-m", "Closes #%s and squashes the following commits:" % pr_num]
   for c in commits:
     merge_message_flags = merge_message_flags + ["-m", c]