post-review should stop processing and display a useful error message if there is no matching repository path found.

Review Request #1819 — Created Oct. 12, 2010 and submitted

Information

RBTools

Reviewers

If there is a list of repository paths found on the post-review side of things (i.e. there is more than one, which would be a string, not a list,) and none of the list members match the repositories configured on the Review Board server, then display an error message indicating that the two don't match.

This is really an end-user configuration issue, but there was no meaningful error message (making things very hard to diagnose!)
This was very easy for me to test:
1 - Have multiple repository paths configured in Review Board (i.e. host:1666 and host.domain.com:1666 for Perforce)
2 - Have an environment where gethostbyaddr() returns multiple values (i.e. 192.168.1.1 returns "host" and "host.domain.com") for the Perforce server
3 - This will create a list of paths for the source repository (i.e. it will be a list of strings, not a string)
4 - Hide the paths on the ReviewBoard side (uncheck the "Show this repository" check box in the repository configuration)

When post-review runs, it will see multiple paths and compare them to the server.  If the server doesn't have any of those paths configured and showing, then post-review will fail with a concatenation error in the http upload processing (!).

With the fix, it will error out with a string showing what values were valid (configured on the server) and what was found by post-review.
EE
  1. test
  2. 
      
EE
  1. 
      
    1. This is a production server. Please don't post test messages here.
  2. 
      
chipx86
  1. Thanks. Committed to master (49a15d7)
  2. 
      
Loading...