Don't double-normalize the destination file path.

Review Request #7399 — Created June 9, 2015 and submitted

Information

Review Board
release-2.0.x
33a10a0...

Reviewers

A recent change added some improved normalization of file paths, which
would take care of doing join of the basedir path (if any) and the
destination file path in a diff.

However, there was still a second case where the path would get
normalized in exactly the same way, later in the file processing. It was
expecting to do the normalization, and didn't account for the
possibility that it'd already be normalized.

Since we're now normalizing both paths earlier, at the same time,
there's no reason to normalize again later. This just removes that step.

Unit tests passed. They failed before the fix, with the double path reported.

Verified the workaround of adding a leading slash with the customer.

Description From Last Updated

redefinition of unused 'FileDiffMigrationTests' from line 1039

reviewbotreviewbot
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/diffviewer/managers.py
        reviewboard/diffviewer/tests.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/diffviewer/managers.py
        reviewboard/diffviewer/tests.py
    
    
  2. reviewboard/diffviewer/tests.py (Diff revision 1)
     
     
    Show all issues
     redefinition of unused 'FileDiffMigrationTests' from line 1039
    
    1. We keep dropping this issue. Isn't it actually important?

    2. Yeah, we need to fix that.. I'll take a look after this.

  3. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.0.x (05d6cec)
Loading...