3127: https://git.reviewboard.kde.org/api/repositories "object does not exist"

*@vidsol******* (Google Code) (Is this you? Claim this profile.)
Nov. 2, 2013
What version are you running?
1.7.16


What's the URL of the page containing the problem?
https://reviewboard.kde.org/api/repositories

What steps will reproduce the problem?
1. go to https://reviewboard.kde.org/api/repositories
2. POST msg with body: 

trust_host=1&name=kturtle-data&path=/var/git/others/kturtle-data/.git&mirror_path=git://anongit.kde.org/others/kturtle-data&bug_tracker=http://bugs.kde.org/show_bug.cgi?id=%s&tool=Git

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

Expected: Repository is created.
Actual: 

<rsp>
<stat>fail</stat>
<err>
<msg>Object does not exist</msg>
<code>100</code>
</err>
</rsp>

I use a script to create repositories for the KDE instace of reviewboard (script attached). 


What operating system are you using? What browser?


Please provide any additional information below.
#!/usr/bin/python -W ignore::DeprecationWarning
# -*- coding: utf-8 -*-
#   Copyright 2011 Luca Beltrame <einar@heavensinferno.net>
#   Copyright 2011 David Solbach <d@vidsolbach.de>
#
#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License, under
#   version 2 of the License, or (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details
#
#   You should have received a copy of the GNU General Public
#   License along with this program; if not, write to the
#   Free Software Foundation, Inc.,
#   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
import getopt
import json
import logging
import sys
import os
import urllib
import urlparse
from restful_lib import Connection
# B
#1 *@vidsol******* (Google Code) (Is this you? Claim this profile.)
Ups sorry about the formatting of the description. I hit submit to early. But the Information is basically in it. Strange thing is that the script used to work. I can't quite remember if it worked with 1.7.14, but certainly on the version before that.

I suspect it's some kind of user error? 
david
#2 david
One thing that changed was that we started requiring the trailing slash on URLs. Theoretically the documentation always said that it was required, but it's only recently that it was changed. Can you change repo_resource in your script to "/repositories/" and see if it works?
  • +NeedInfo
#3 *@vidsol******* (Google Code) (Is this you? Claim this profile.)
Wow, that was quick. And easy, I could have seen that myself. Works now. Thanks a lot!
david
#4 david
Glad it's working!
  • -NeedInfo
    +UserError