)]}'
{"openstack_releases/gitutils.py":[{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"dfb02f4f171c1e2897f3064e3d6e67d4b4f4c926","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    return filenames"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"def commit_exists(repo, ref):"},{"line_number":43,"context_line":"    \"\"\"Return boolean specifying whether the reference exists in the repository."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    Uses a cgit query instead of looking locally to avoid cloning a"},{"line_number":46,"context_line":"    repository or having Depends-On settings in a commit message allow"},{"line_number":47,"context_line":"    someone to fool the check."},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    \"\"\""},{"line_number":50,"context_line":"    url \u003d CGIT_SHA_TEMPLATE % (repo, ref)"},{"line_number":51,"context_line":"    response \u003d requests.get(url)"},{"line_number":52,"context_line":"    missing_commit \u003d ("},{"line_number":53,"context_line":"        (response.status_code // 100 !\u003d 2) or \u0027Bad object id\u0027 in response.text"},{"line_number":54,"context_line":"    )"},{"line_number":55,"context_line":"    return not missing_commit"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"def tag_exists(repo, ref):"},{"line_number":59,"context_line":"    \"\"\"Return boolean specifying whether the reference exists in the repository."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    Uses a cgit query instead of looking locally to avoid cloning a"},{"line_number":62,"context_line":"    repository or having Depends-On settings in a commit message allow"},{"line_number":63,"context_line":"    someone to fool the check."},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    \"\"\""},{"line_number":66,"context_line":"    url \u003d CGIT_TAG_TEMPLATE % (repo, ref)"},{"line_number":67,"context_line":"    response \u003d requests.get(url)"},{"line_number":68,"context_line":"    missing_commit \u003d ("},{"line_number":69,"context_line":"        (response.status_code // 100 !\u003d 2) or \u0027Bad object id\u0027 in response.text"},{"line_number":70,"context_line":"    )"},{"line_number":71,"context_line":"    return not missing_commit"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"def clone_repo(workdir, repo):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3ac371cc_a3d074f7","line":71,"range":{"start_line":42,"start_character":0,"end_line":71,"end_character":29},"updated":"2016-08-17 02:03:59.000000000","message":"As commit_exists and tag_exists are basically the same function (AFICT it\u0027s only the URL that chnages.  Wouldn\u0027t it be neater to do something like:\n\n def __cgit_object_exists(url):\n     response \u003d requests.get(url)\n     missing_object \u003d (\n         (response.status_code // 100 !\u003d 2) or \u0027Bad object id\u0027 in response.text\n     )\n     return not missing_object\n \n \n def commit_exists(repo, ref):\n     return __cgit_object_exists(CGIT_SHA_TEMPLATE % (repo, ref))\n \n \n def tag_exists(repo, ref):\n     return __cgit_object_exists(CGIT_TAG_TEMPLATE % (repo, ref))\n\nonly with docstrings :)","commit_id":"1227800a3759175b9686a83474a11ea2bf0771f5"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"309318fcefd29c9f358f649795a1189f33ba6b6b","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    return filenames"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"def commit_exists(repo, ref):"},{"line_number":43,"context_line":"    \"\"\"Return boolean specifying whether the reference exists in the repository."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    Uses a cgit query instead of looking locally to avoid cloning a"},{"line_number":46,"context_line":"    repository or having Depends-On settings in a commit message allow"},{"line_number":47,"context_line":"    someone to fool the check."},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    \"\"\""},{"line_number":50,"context_line":"    url \u003d CGIT_SHA_TEMPLATE % (repo, ref)"},{"line_number":51,"context_line":"    response \u003d requests.get(url)"},{"line_number":52,"context_line":"    missing_commit \u003d ("},{"line_number":53,"context_line":"        (response.status_code // 100 !\u003d 2) or \u0027Bad object id\u0027 in response.text"},{"line_number":54,"context_line":"    )"},{"line_number":55,"context_line":"    return not missing_commit"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"def tag_exists(repo, ref):"},{"line_number":59,"context_line":"    \"\"\"Return boolean specifying whether the reference exists in the repository."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    Uses a cgit query instead of looking locally to avoid cloning a"},{"line_number":62,"context_line":"    repository or having Depends-On settings in a commit message allow"},{"line_number":63,"context_line":"    someone to fool the check."},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    \"\"\""},{"line_number":66,"context_line":"    url \u003d CGIT_TAG_TEMPLATE % (repo, ref)"},{"line_number":67,"context_line":"    response \u003d requests.get(url)"},{"line_number":68,"context_line":"    missing_commit \u003d ("},{"line_number":69,"context_line":"        (response.status_code // 100 !\u003d 2) or \u0027Bad object id\u0027 in response.text"},{"line_number":70,"context_line":"    )"},{"line_number":71,"context_line":"    return not missing_commit"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"def clone_repo(workdir, repo):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3ac371cc_c06a8d80","line":71,"range":{"start_line":42,"start_character":0,"end_line":71,"end_character":29},"in_reply_to":"3ac371cc_a3d074f7","updated":"2016-08-17 20:47:03.000000000","message":"Yeah, I was looking for the least invasive change to unblock the release that\u0027s sitting on top of this one. I\u0027ll do more cleanup once that release is out.","commit_id":"1227800a3759175b9686a83474a11ea2bf0771f5"}]}
