Allow fetching patch files for individual commits

Review Request #7131 — Created March 28, 2015 and submitted

Information

Review Board
dvcs
4b3d41f...

Reviewers

The patch file for an individual commit is now fetchable by sending the
Accept: text/x-patch header to the DiffCommitResource and
DraftDiffCommitResource. This patch is composed of the individual
patches for all FileDiffs in the DiffCommit.

Ran unit tests.

Uploaded a review request with commit history and made an HTTP request
to the DiffCommitResource API endpoint with a Accept: text/x-patch
header. The returned response was a patch file that contained only the
diff information for FileDiffs in that commit.

Description From Last Updated

Blank line above this.

daviddavid

While I don't expect it to be a problem, we should make sure this doesn't contain commas.

daviddavid
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/diffviewer/parser.py
        reviewboard/webapi/resources/diff_commit.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/diffviewer/parser.py
        reviewboard/webapi/resources/diff_commit.py
    
    
  2. 
      
brennie
david
  1. 
      
  2. Show all issues

    Blank line above this.

  3. Show all issues

    While I don't expect it to be a problem, we should make sure this doesn't contain commas.

    1. The commit_id cannot contain commas. We ensure that it is alphanumeric when we store it in the DB.

  4. 
      
brennie
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/diffviewer/parser.py
        reviewboard/webapi/resources/diff_commit.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        reviewboard/diffviewer/parser.py
        reviewboard/webapi/resources/diff_commit.py
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
brennie
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to dvcs (da4fab8)
Loading...