Revert "Remove code duplication and improve style."

This reverts commit 850ee065dd840ef7112671c11fc54d9e6b52aa2f.

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56894 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/scm.py b/scm.py
index 924f126..1f24219 100644
--- a/scm.py
+++ b/scm.py
@@ -215,7 +215,7 @@
       # pipe at a time.
       # The -100 is an arbitrary limit so we don't search forever.
       cmd = ['git', 'log', '-100', '--pretty=medium']
-      proc = gclient_utils.Popen(cmd, stdout=subprocess.PIPE, cwd=cwd)
+      proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, cwd=cwd)
       for line in proc.stdout:
         match = git_svn_re.match(line)
         if match:
@@ -371,11 +371,19 @@
     """
     c = [SVN.COMMAND]
     c.extend(args)
+
+    # *Sigh*:  Windows needs shell=True, or else it won't search %PATH% for
+    # the svn.exe executable, but shell=True makes subprocess on Linux fail
+    # when it's called with a list because it only tries to execute the
+    # first string ("svn").
     stderr = None
     if not print_error:
       stderr = subprocess.PIPE
-    return gclient_utils.Popen(c, cwd=in_directory, stdout=subprocess.PIPE,
-        stderr=stderr).communicate()[0]
+    return subprocess.Popen(c,
+                            cwd=in_directory,
+                            shell=(sys.platform == 'win32'),
+                            stdout=subprocess.PIPE,
+                            stderr=stderr).communicate()[0]
 
   @staticmethod
   def RunAndGetFileList(verbose, args, in_directory, file_list):