post-review returns HTTP 500 with cribbed repository configuration

We run ReviewBoard at work; we set up each hosted Git repository as new projects are started. I made a silly error a few weeks ago: when I created a new repository, I filled in the Mirror Path setting with that of a previous repository. This mistake leads to client output like

$ post-review 7fdd345e22783b289be128205cc0c47935057e20
Error creating review request: HTTP 500

Your administrator mail address should receive a message with a body like

Traceback (most recent call last):

File "/usr/lib/python2.7/site-packages/Django-1.3.3-py2.7.egg/django/core/handlers/", line 111, in get_response
  response = callback(request, *callback_args, **callback_kwargs)

File "/usr/lib/python2.7/site-packages/Django-1.3.3-py2.7.egg/django/views/decorators/", line 79, in _wrapped_view_func
  response = view_func(request, *args, **kwargs)

File "/usr/lib/python2.7/site-packages/Django-1.3.3-py2.7.egg/django/views/decorators/", line 22, in inner_func
  response = func(*args, **kwargs)

File "/usr/lib/python2.7/site-packages/Djblets-0.6.22-py2.7.egg/djblets/webapi/", line 397, in __call__
  result = view(request, api_format=api_format, *args, **kwargs)

File "/usr/lib/python2.7/site-packages/Djblets-0.6.22-py2.7.egg/djblets/webapi/", line 581, in post
  return self.create(*args, **kwargs)

File "/usr/lib/python2.7/site-packages/ReviewBoard-1.6.11-py2.7.egg/reviewboard/webapi/", line 127, in _check
  return view_func(*args, **kwargs)

File "/usr/lib/python2.7/site-packages/Djblets-0.6.22-py2.7.egg/djblets/webapi/", line 88, in _checklogin
  return view_func(*args, **kwargs)

File "/usr/lib/python2.7/site-packages/Djblets-0.6.22-py2.7.egg/djblets/webapi/", line 62, in _call
  return view_func(*args, **kwargs)

File "/usr/lib/python2.7/site-packages/Djblets-0.6.22-py2.7.egg/djblets/webapi/", line 231, in _validate
  return view_func(*args, **new_kwargs)

File "/usr/lib/python2.7/site-packages/ReviewBoard-1.6.11-py2.7.egg/reviewboard/webapi/", line 5984, in create

File "/usr/lib/python2.7/site-packages/Django-1.3.3-py2.7.egg/django/db/models/", line 132, in get
  return self.get_query_set().get(*args, **kwargs)

File "/usr/lib/python2.7/site-packages/Django-1.3.3-py2.7.egg/django/db/models/", line 351, in get
  % (self.model._meta.object_name, num, kwargs))

MultipleObjectsReturned: get() returned more than one Repository -- it returned 2! Lookup parameters were {}

each time a review is submitted against one of these repositories.

You can fix this condition by correcting the Mirror Path of the new repository; it’s not a ReviewBoard issue.