Index: tools/cvs2svn/cvs2svn.py
===================================================================
--- tools/cvs2svn/cvs2svn.py  (revision 7422)
+++ tools/cvs2svn/cvs2svn.py  (working copy)
@@ -2004,11 +2004,22 @@


 def pass3(ctx):
+  # On Windows, redirection does not seem to work when called from Python.
+  # So, in this case, we tell the sort command to output into a named file,
+  # instead of going to stdout.  In addition, sort is supposed to be faster
+  # when *not* redirecting.
+  if os.name == 'nt':
+    outputparam = '/O'
+  else:
+    outputparam = '>'
+
   # sort the log files
-  os.system('sort %s > %s' % (ctx.log_fname_base + CLEAN_REVS_SUFFIX,
+  rval = os.system('sort %s %s %s' % (ctx.log_fname_base + CLEAN_REVS_SUFFIX,
+                              outputparam,
                               ctx.log_fname_base + SORTED_REVS_SUFFIX))
+  if rval != 0:
+    raise RuntimeError, ('Sort program unavailable.  Return value is %s' % rval)

-
 def pass4(ctx):
   sym_tracker = SymbolicNameTracker()
