You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jo...@apache.org on 2017/05/18 19:57:33 UTC

mesos git commit: Windows: Fixed apply-reviews.py to retain line feeds.

Repository: mesos
Updated Branches:
  refs/heads/master 2aafd7d60 -> 7acec00b6


Windows: Fixed apply-reviews.py to retain line feeds.

Write using 'wb' instead of 'w' for binary mode. This writes the
downloaded patch file exactly as it came, instead of treating as text
and changing line endings. This resolves a bug where `git apply` doesn't
always work with CRLF endings in patch files.

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


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

Branch: refs/heads/master
Commit: 7acec00b6aefa43b89bee3fa66579b2eded56af4
Parents: 2aafd7d
Author: Andrew Schwartzmeyer <an...@schwartzmeyer.com>
Authored: Thu May 18 12:56:42 2017 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Thu May 18 12:56:42 2017 -0700

----------------------------------------------------------------------
 support/apply-reviews.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/7acec00b/support/apply-reviews.py
----------------------------------------------------------------------
diff --git a/support/apply-reviews.py b/support/apply-reviews.py
index b495675..0b1028c 100755
--- a/support/apply-reviews.py
+++ b/support/apply-reviews.py
@@ -153,7 +153,7 @@ def fetch_patch():
   if platform.system() == 'Windows':
     r = urllib2.urlopen(patch_url(), context=ssl_create_default_context())
 
-    with open('%s.patch' % patch_id(), 'w') as patch:
+    with open('%s.patch' % patch_id(), 'wb') as patch:
       patch.write(r.read())
   else:
     # NOTE: SSL contexts are only supported in Python 2.7.9+. The version