Martin Fuchs <martin-fuchs@gmx.net>


Review
r847320

r847320 | rey4 | 2003-09-29 20:59:50 +0000 (Mon, 29 Sep 2003)

Changes to cvs2svn.py and its regression testing script so they will
work on Windows. Martin Fuchs <martin-fuchs@gmx.net> and
François Beausoleil <fbos@users.sourceforge.net> helped test this
patch at different points and comments from Max Bowsher <maxb@ukf.net>
and <cmpilato@collab.net> helped improve the code.

Review by: Martin Fuchs <martin-fuchs@gmx.net>
           François Beausoleil <fbos@users.sourceforge.net>
           Max Bowsher <maxb@ukf.net>
           C. Michael Pilato <cmpilato@collab.net> 

* tools/cvs2svn/cvs2svn.py
  (relative_name):
    Changed this function to expect os.sep in the file path passed to
    it instead of forward slashes.

  (escape_shell_arg):
    new function to escape shell arguments, works differently on unix
    and windows

  (Dumper.add_or_change_path):
    changed to use the escape_shell_arg function

  (pass2):
    explicitly specify text mode when opening list of filenames

* tools/cvs2svn/run-tests.py
  (run_cvs2svn):
    changed command line used to start cvs2svn on windows

  (repos_to_url):
    Added missing slash detection. Needed because absolute paths on
    windows begin with a drive letter instead of a slash.

  (svn_strptime):
    new function to take the place of time.strptime, which doesn't
    exist on windows

  (Log.__init__):
    replaced time.strptime() call with svn_strptime() call.