• 
      

    Raise error when no history entries present or a history entry is empty

    Review Request #10281 — Created Oct. 25, 2018 and submitted

    Information

    RBTools
    master
    8f8e58d...

    Reviewers

    Previously, the case where SCMTool.get_commit_history returned None
    was not graciously handled in rbt post leading to an exception. We now
    explicitly handle this case and report this to the user.

    Additionally, we now explicitly handle the case of a commit containing
    an empty diff (e.g., if the commit was created with
    git commit --allow-empty), which will not pass validation with Review
    Board (as it doesn't allow empty diff uploads).

    • Attempted to post an empty history and the appropriate error was
      shown.
    • Attempted to post a history with an empty commit and the
      appropriate error was shown.
    Description From Last Updated

    Typo in the description: "wehre" -> "where"

    chipx86chipx86

    Can we just check entry['diff'] for truthiness?

    chipx86chipx86

    Raises:

    chipx86chipx86

    "is empty"

    chipx86chipx86

    Same comment about checking for truthiness here.

    chipx86chipx86
    chipx86
    1. 
        
    2. Show all issues

      Typo in the description: "wehre" -> "where"

    3. rbtools/commands/post.py (Diff revision 1)
       
       
      Show all issues

      Can we just check entry['diff'] for truthiness?

    4. rbtools/commands/post.py (Diff revision 1)
       
       
      Show all issues

      Raises:

    5. rbtools/commands/post.py (Diff revision 1)
       
       
      Show all issues

      "is empty"

    6. 
        
    brennie
    chipx86
    1. 
        
    2. rbtools/commands/post.py (Diff revision 2)
       
       
      Show all issues

      Same comment about checking for truthiness here.

    3. 
        
    brennie
    chipx86
    1. Ship It!
    2. 
        
    brennie
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to master (2d6ab55)