4401: Repository mirror path is ignored by rbtools

benbelly

What version are you running?

rbtools 0.7.6 with reviewboard 2.5.2 from OS X with Perforce

What steps will reproduce the problem?

  1. Create a repository with a mirror path.
  2. Run rbtools post from a client that uses the mirror path

What is the expected output? What do you see instead?

I expect a review to be posted. Instead I get an unknown repository error.
In the debug output below, the perforce server has two names. The one being saught here is the mirror-path (devlab.company.com)

What operating system are you using?

OS X

Attach the debug out from the command.

$ rbt post -o 323483
Generating diff for pending changeset 323483
Review request #12280 posted.

https://reviewboard.company.com/r/12280/
https://reviewboard.company.com/r/12280/diff/
bshmbp:my_user_lip my_user$ rbt post --debug -o 323483
>>> RBTools 0.8 alpha 0 (dev)
>>> Python 2.7.10 (default, Oct 23 2015, 19:19:21) 
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)]
>>> Running on Darwin-15.4.0-x86_64-i386-64bit
>>> Home = /Users/my_user
>>> Current directory = /Users/my_user/Dev/my_user_lip
>>> Checking for a Subversion repository...
>>> Running: svn --non-interactive info
>>> Command exited with rc 1: ['svn', '--non-interactive', u'info']
svn: E155007: '/Users/my_user/Dev/my_user_lip' is not a working copy
---
>>> Checking for a Git repository...
>>> Running: git rev-parse --git-dir
>>> Command exited with rc 128: ['git', 'rev-parse', '--git-dir']
fatal: Not a git repository (or any of the parent directories): .git
---
>>> Checking for a Mercurial repository...
>>> Unable to execute "hg --help": skipping Mercurial
>>> Checking for a CVS repository...
>>> Unable to execute "cvs": skipping CVS
>>> Checking for a Perforce repository...
>>> Running: p4 info
>>> Running: diff --version
>>> repository info: Path: [u'company-source.devlab.company.com:1666', u'171.90.112.10.in-addr.arpa:1666'], Base path: None, Supports changesets: True
>>> Running: p4 counters
>>> Making HTTP GET request to https://reviewboard.company.com/api/
>>> Running: p4 info
Generating diff for pending changeset 323483
>>> Processing edit of //lip/Clarke/readme.md
>>> Writing "//lip/Clarke/readme.md#3" to "/var/folders/bj/wdx5j_zj1wsc1gv7bc_ty0vc0000gn/T/tmpH4v5MX"
>>> Running: p4 print -o /var/folders/bj/wdx5j_zj1wsc1gv7bc_ty0vc0000gn/T/tmpH4v5MX -q //lip/Clarke/readme.md#3
>>> Running: diff -urNp /var/folders/bj/wdx5j_zj1wsc1gv7bc_ty0vc0000gn/T/tmpH4v5MX /Users/my_user/Dev/my_user_lip/readme.md
>>> Command exited with rc 1: [u'diff', u'-urNp', '/var/folders/bj/wdx5j_zj1wsc1gv7bc_ty0vc0000gn/T/tmpH4v5MX', '/Users/my_user/Dev/my_user_lip/readme.md']
>>> Making HTTP GET request to https://reviewboard.company.com/api/repositories/?only-links=&only-fields=path
>>> Cached response for HTTP GET https://reviewboard.company.com/api/repositories/?only-links=&only-fields=path expired and was modified
Traceback (most recent call last):
  File "/usr/local/bin/rbt", line 9, in <module>
    load_entry_point('RBTools==0.8alpha0.dev', 'console_scripts', 'rbt')()
  File "/Library/Python/2.7/site-packages/RBTools-0.8alpha0.dev-py2.7.egg/rbtools/commands/main.py", line 120, in main
    command.run_from_argv([RB_MAIN, command_name] + args)
  File "/Library/Python/2.7/site-packages/RBTools-0.8alpha0.dev-py2.7.egg/rbtools/commands/__init__.py", line 680, in run_from_argv
    exit_code = self.main(*args) or 0
  File "/Library/Python/2.7/site-packages/RBTools-0.8alpha0.dev-py2.7.egg/rbtools/commands/post.py", line 739, in main
    self.get_repository_path(repository_info, api_root))
  File "/Library/Python/2.7/site-packages/RBTools-0.8alpha0.dev-py2.7.egg/rbtools/commands/post.py", line 380, in get_repository_path
    raise CommandError(''.join(error_str))
rbtools.commands.CommandError: There was an error creating this review request.

There was no matching repository path found on the server.
Unknown repository paths found:
    company-source.devlab.company.com:1666
    171.90.112.10.in-addr.arpa:1666
Ask the administrator to add one of these repositories
to the Review Board server.

Please provide any additional information below.

I have a patch for this I will be posting momentarily to be code reviewed.

david
#1 david

Fixed in release-0.7.x (58e4ea3). This will ship in 0.7.7. Thanks!

  • -New
    +Fixed