Support marking files as deleted in the diff viewer.

Review Request #1685 — Created June 26, 2010 and submitted

chipx86
Review Board
394, 1066
reviewboard
Support marking files as deleted in the diff viewer.

We've always treated deleted files as just another file change. A file with
a bunch of removes. However, this isn't as clear, and it's often just extra
noise. In the case of CVS, it actually doesn't work, because the files
referenced in the diff don't contain enough data to locate the source file.

Diff parsers can now flag a file as being deleted, which will prevent
any file existence checks and instead indicate in the diff viewer that the
file was deleted. This is similar in appearance to the binary indicator.

Right now, only CVS supports this, but support can easily be added to other
SCMTools later.
Verified that I could take a CVS diff with a deleted file and view it in the diff viewer.
Previously, I could not, and it was failing with an error.
david
  1. 
      
  2. reviewboard/diffviewer/forms.py (Diff revision 1)
     
     
     
     
     
    I don't recall what our minimum python version is. Can this be:
    
    status = FileDiff.DELETED if f.deleted else FileDiff.MODIFIED
    
    ?
    1. This code will likely change to support other flags later on, such as RENAME/MOVE (see bug 1066). At that point, this will have to change back to what I have here. Going to keep it as-is for now.
  3. 
      
Loading...