1682: post-review mangles the Perforce server name when the IP is in /etc/hosts

bbu****@gmai***** (Google Code) (Is this you? Claim this profile.)
Feb. 1, 2014
1717
What version are you running?
RBTools-0.2

What's the URL of the page containing the problem?


What steps will reproduce the problem?
1. Put the following line in /etc/hosts: nnn.nnn.nnn.nnn	depot
2. Run post-review
3.

What is the expected output? What do you see instead?
Expected: posts the review, uses the server name from P4
Actual:
Error creating review request: The repository path specified is not in the list of known repositories (code 206)

What operating system are you using? What browser?
Ubuntu 9.04

Please provide any additional information below.
post-review should use the P4PORT value as-is and not try to do a reverse lookup on the IP.
#1 bbu****@gmai***** (Google Code) (Is this you? Claim this profile.)
The problem is probably somewhere around here in PerforceClient:

            hostname, port = repository_path.split(":")
            info = socket.gethostbyaddr(hostname)

Is the gethostbyaddr() call necessary?
david
#3 david
  • +Component-SCMTools
david
#4 david
This has been fixed for a while.
  • +Fixed