Commit 46b9fee9 authored by maruel@chromium.org's avatar maruel@chromium.org

gclient_utils.FileWrite() assumes text data but trychange doesn't.

Use manual file writing, it's just two lines.

TBR=nsylvain@chromium.org
BUG=
TEST=git try works with non-ascii patches


Review URL: https://chromiumcodereview.appspot.com/10815009

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@147447 0039d316-1c4b-4281-b951-d872f2087c98
parent 49e3d807
......@@ -399,7 +399,8 @@ def _SendChangeSVN(options):
file_name = (Escape(options.user) + '.' + Escape(options.name) +
'.%s.diff' % current_time)
full_path = os.path.join(temp_dir, file_name)
gclient_utils.FileWrite(full_path, options.diff, 'wb')
with open(full_path, 'wb') as f:
f.write(options.diff)
# Committing it will trigger a try job.
if sys.platform == "cygwin":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment