• 
      

    Plumb problems with p4 repos through the webapi.

    Review Request #2454 — Created July 7, 2011 and submitted

    Information

    Review Board

    Reviewers

    Plumb problems with p4 repos through the webapi.
    
    Right now, if someone tries to post-review against a p4 server with a broken
    setup (wrong auth, wrong P4PORT, etc), they'll get a generic 500 error and a
    traceback will be sent to the server admins. We can do better by translating
    P4Errors into SCMErrors, and then translating SCMErrors into webapi error codes.
    
    This also adds validation of the perforce repository to the creation form, so
    hopefully these errors will be caught sooner.
    Newly added unit tests.
    Description From Last Updated

    I'd either change the order, or update sshutils.py to be more specific about the key, because it assumes the key …

    chipx86 chipx86
    chipx86
    1. 
        
    2. reviewboard/scmtools/perforce.py (Diff revision 1)
       
       
       
       
      We should probably log the actual error too, so there's more info to go by.
    3. 
        
    david
    chipx86
    1. 
        
    2. reviewboard/scmtools/errors.py (Diff revision 2)
       
       
      Show all issues
      I'd either change the order, or update sshutils.py to be more specific about the key, because it assumes the key is the second parameter when raising this. Maybe be specific about the parameter for the msg in the new call too, for good measure.
    3. 
        
    david
    Review request changed
    Change Summary:
    Fix AuthenticationError args, add validation at the admin form step.
    Description:
       

    Plumb problems with p4 repos through the webapi.

       
       

    Right now, if someone tries to post-review against a p4 server with a broken

        setup (wrong auth, wrong P4PORT, etc), they'll get a generic 500 error and a
        traceback will be sent to the server admins. We can do better by translating
        P4Errors into SCMErrors, and then translating SCMErrors into webapi error codes.

      +
      +

    This also adds validation of the perforce repository to the creation form, so

      + hopefully these errors will be caught sooner.

    chipx86
    1. Okay, one trivial thing and then ship it. Awesome change :) Should make things far less confusing.
    2. reviewboard/webapi/tests.py (Diff revision 3)
       
       
      < 80 chars.
    3.