Commit c6d170e5 authored by maruel@chromium.org's avatar maruel@chromium.org

Fix gcl upload with moved files without modification on Windows.

Review URL: http://codereview.chromium.org/2545001

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48793 0039d316-1c4b-4281-b951-d872f2087c98
parent 0c6b52b5
......@@ -45,6 +45,7 @@ def GetCasedPath(path):
def GenFakeDiff(filename):
"""Generates a fake diff from a file."""
file_content = gclient_utils.FileRead(filename, 'rb').splitlines(True)
filename = filename.replace(os.sep, '/')
nb_lines = len(file_content)
# We need to use / since patch on unix will fail otherwise.
data = cStringIO.StringIO()
......@@ -730,7 +731,7 @@ class SVN(object):
data = SVN.Capture(command, None)
if not data:
# We put in an empty Index entry so upload.py knows about them.
data = "Index: %s\n" % filename
data = "Index: %s\n" % filename.replace(os.sep, '/')
# Otherwise silently ignore directories.
else:
if info.get("Node Kind") != "directory":
......
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