Fix path concatenation to prevent leading double slash

Review Request #6962 — Created Feb. 18, 2015 and submitted

Information

RBTools
master
2fdeb88...

Reviewers

In SVNClient.convert_to_absolute_paths() when concatenating paths when the --repository-url option is specified, it was possible to end up with a leading double slash when repository_info.base_path was '/'. Switch to posixpath.join() to correctly concatenate paths for all cases, with platform independent Unix-style slashes.

Tested on both Linux and Windows.

Tested where base_path = '/':
Old output: //file.txt
New output: /file.txt

Tested where base_path = '/foo':
Old output: /foo/file.txt
New output: /foo/file.txt
Description From Last Updated

If running on a windows system, does this do the wrong thing and join with '\'?

daviddavid
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        rbtools/clients/svn.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        rbtools/clients/svn.py
    
    
  2. 
      
david
  1. 
      
  2. rbtools/clients/svn.py (Diff revision 1)
     
     
    Show all issues

    If running on a windows system, does this do the wrong thing and join with '\'?

    1. Ugh.  You're right this is not cross-platform.  Can't believe I overlooked this.  I'll find a more robust solution and make sure I've tested it in Windows and Linux.
  3. 
      
gmyers
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        rbtools/clients/svn.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        rbtools/clients/svn.py
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
gmyers
Review request changed
Status:
Completed
Change Summary:
Pushed to release-0.7.x (f6828a5)