• 
      

    Work around different versions of patch in unit tests

    Review Request #10208 — Created Oct. 9, 2018 and submitted

    Information

    Review Board
    release-3.0.x
    48a0ed7...

    Reviewers

    Review request https://reviews.reviewboard.org/r/10164/ landed on
    release-4.0.x, but the underlying issue was introduced on release-3.0.x.
    This patch is a backport of that patch. The original commit message
    follows:

    We had a unit test that depended on the specific version of patch
    installed. Newer versions of patch will accept a diff that contains no
    hunks, whereas older versions will fail with a message saying that the
    input contained only garbage.

    We now have unit tests that check the correct behaviour happens in both
    cases by replacing our call to patch.

    Ran unit tests.

    Description From Last Updated

    Summary and description should be updated too.

    chipx86chipx86

    Why the "patch(1)"?

    chipx86chipx86

    We should be using keyword arguments for all PatchError calls. It's a complicated bunch of parameters.

    chipx86chipx86
    chipx86
    1. 
        
    2. Show all issues

      Why the "patch(1)"?

      1. I'm assuming this is to differentiate patch files from the patch binary the way man would do it, but that wouldn't be appropriate here. I'd say "with GNU patch ..." instead.

      2. We have no guarantee that it will be gnu patch. It could be BSD patch (im sure somewhere out there a dev is using review board on BSD)

        Also the other patch already has this. :/

      3. Let's say "patch tool" then. The other one can be fixed in merge.

    3. reviewboard/diffviewer/tests/test_diffutils.py (Diff revision 1)
       
       
       
       
       
       
       
       
      Show all issues

      We should be using keyword arguments for all PatchError calls. It's a complicated bunch of parameters.

    4. 
        
    brennie
    brennie
    chipx86
    1. 
        
    2. Show all issues

      Summary and description should be updated too.

    3. 
        
    brennie
    brennie
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-3.0.x (156c7ce)