Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Unified Diff: webkit/tools/merge/merge.py

Issue 20289: On Windows, find all modified files after a WebKit merge and force them... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/tools/merge/diff3-wrapper.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/merge/merge.py
===================================================================
--- webkit/tools/merge/merge.py (revision 9626)
+++ webkit/tools/merge/merge.py (working copy)
@@ -18,6 +18,7 @@
import os
import re
import subprocess
+import sys
import xml.dom.minidom
import google.path_utils
@@ -68,6 +69,29 @@
if returncode != 0:
raise "Are you sure you're running SVN 1.5? svn --version to check"
+ # On Windows, find modified files and force them to LF. We trust dos2unix
+ # not to change binary files.
+ if sys.platform == 'win32':
+ command = [self._svn, "status", "--xml", directory]
+ print ' '.join(command)
+ info = subprocess.Popen(command, cwd=self._webkit_root, shell=True,
+ stdout=subprocess.PIPE).communicate()[0]
+ dom = xml.dom.minidom.parseString(info)
+ for entry in dom.getElementsByTagName("entry"):
+ file_path = entry.getAttribute("path")
+ type = os.path.splitext(file_path)[-1]
+ status = (entry.getElementsByTagName('wc-status')[0]
+ .getAttribute('item'))
+ # TODO(pamg): Is this the same in non-English svn?
+ if status == "modified":
+ command = ["dos2unix.exe", file_path]
+ if self._is_dry_run:
+ print ' '.join(command)
+ else:
+ subprocess.call('dos2unix.exe %s' % file_path,
ojan 2009/02/12 02:21:00 shouldn't this be using command?
+ cwd=self._webkit_root, shell=True)
+
+
def GetCurrentRepositoryAndRevision(webkit_merge_revision_path):
""" Gets the repository and revision we're currently merged to according to
the WEBKIT_MERGE_REVISION file checked in.
« no previous file with comments | « webkit/tools/merge/diff3-wrapper.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698