)]}'
{"openstack_releases/cmds/validate.py":[{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"9cf9fe09a997141b763f81750e2f9ee266d36c3a","unresolved":false,"context_lines":[{"line_number":254,"context_line":"                        old_sha \u003d gitutils.sha_for_tag("},{"line_number":255,"context_line":"                            workdir,"},{"line_number":256,"context_line":"                            project[\u0027repo\u0027],"},{"line_number":257,"context_line":"                            prev_version,"},{"line_number":258,"context_line":"                        )"},{"line_number":259,"context_line":"                        if old_sha \u003d\u003d project[\u0027hash\u0027]:"},{"line_number":260,"context_line":"                            # FIXME(dhellmann): This needs a test."}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_78a42207","line":257,"range":{"start_line":257,"start_character":28,"end_line":257,"end_character":40},"updated":"2016-11-29 01:07:22.000000000","message":"So I got to the bottom of why I was confused.  In I81f0aa50a7b2b7982ccecac558e0dc584945db4f we removed a[1]\n\n  if prev_version:\n   print() \n\nwhich guarded all this code which I think meant skipped a lot of this code (including the version validation).  Now the new code has a better structure but is does mean that we\u0027re now going to hit this call with prev_version\u003dNone.  Which is okay except it means gitutils.sha_for_tag() is going to take the exception path and print:\n\n   ERROR getting SHA for tag None: Command \u0027[\u0027git\u0027, \u0027log\u0027, \u0027None\u0027, \u0027-n\u0027, \u00271\u0027, \u0027--pretty\u003dformat:%H\u0027]\u0027 returned non-zero exit status 128 [fatal: ambiguous argument \u0027None\u0027: unknown revision or path not in the working tree.\nUse \u0027--\u0027 to separate paths from revisions, like this:\n\u0027git \u003ccommand\u003e [\u003crevision\u003e...] -- [\u003cfile\u003e...]\u0027]\n\nwhich is a little annoying as we\u0027ll see it for the first release of any deliverable in each cycle.\n\nI think we need to either:\n\n  old_sha \u003d \u0027\u0027\n  if prev_version:\n      old_sha \u003d gitutils.sha_for_tag(....)\n\nOr add a shortcut in gitutils.sha_for_tag():\n\n  def sha_for_tag(workdir, repo, version):\n        if version is None:\n             return \u0027\u0027\n\n\n[1] https://review.openstack.org/#/c/401792/1/openstack_releases/cmds/validate.py@242","commit_id":"d49034d16dd375557e7618a5e046702a605e06f4"},{"author":{"_account_id":308,"name":"Thierry Carrez","email":"thierry@openstack.org","username":"ttx"},"change_message_id":"fda8c275263014ba3d9c5e0469e3b2d56866a807","unresolved":false,"context_lines":[{"line_number":254,"context_line":"                        old_sha \u003d gitutils.sha_for_tag("},{"line_number":255,"context_line":"                            workdir,"},{"line_number":256,"context_line":"                            project[\u0027repo\u0027],"},{"line_number":257,"context_line":"                            prev_version,"},{"line_number":258,"context_line":"                        )"},{"line_number":259,"context_line":"                        if old_sha \u003d\u003d project[\u0027hash\u0027]:"},{"line_number":260,"context_line":"                            # FIXME(dhellmann): This needs a test."}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_fe21de9e","line":257,"range":{"start_line":257,"start_character":28,"end_line":257,"end_character":40},"in_reply_to":"5a74a57a_78a42207","updated":"2016-11-29 14:17:07.000000000","message":"I agree with Tony. The ancestry tests should just be skipped if there is no prev_version. I think I\u0027ll refactor this function when I add the \"check that SHA is on right branch\" test, as the logic is becoming pretty convoluted.","commit_id":"d49034d16dd375557e7618a5e046702a605e06f4"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"aba9acfce68e38ddccd3cb30feca9d206b68ccea","unresolved":false,"context_lines":[{"line_number":254,"context_line":"                        old_sha \u003d gitutils.sha_for_tag("},{"line_number":255,"context_line":"                            workdir,"},{"line_number":256,"context_line":"                            project[\u0027repo\u0027],"},{"line_number":257,"context_line":"                            prev_version,"},{"line_number":258,"context_line":"                        )"},{"line_number":259,"context_line":"                        if old_sha \u003d\u003d project[\u0027hash\u0027]:"},{"line_number":260,"context_line":"                            # FIXME(dhellmann): This needs a test."}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_8d143aa0","line":257,"range":{"start_line":257,"start_character":28,"end_line":257,"end_character":40},"in_reply_to":"5a74a57a_fe21de9e","updated":"2016-11-29 15:50:25.000000000","message":"Done","commit_id":"d49034d16dd375557e7618a5e046702a605e06f4"}],"openstack_releases/tests/test_validate.py":[{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"cb1d1e375fb7ea9d37bd8970ad4ec33aa6d10a16","unresolved":false,"context_lines":[{"line_number":339,"context_line":"            warnings.append,"},{"line_number":340,"context_line":"            errors.append,"},{"line_number":341,"context_line":"        )"},{"line_number":342,"context_line":"        print(warnings, errors)"},{"line_number":343,"context_line":"        self.assertEqual(0, len(warnings))"},{"line_number":344,"context_line":"        self.assertEqual(0, len(errors))"},{"line_number":345,"context_line":"        check_jobs.assert_called_once()"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_fdec3f2b","line":342,"updated":"2016-11-24 02:12:28.000000000","message":"Should this be here?","commit_id":"93671adba5e3395785ae9a17597374c5bf525e24"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"ed17076c9ead79af4e81cd9b7e6240263d228938","unresolved":false,"context_lines":[{"line_number":339,"context_line":"            warnings.append,"},{"line_number":340,"context_line":"            errors.append,"},{"line_number":341,"context_line":"        )"},{"line_number":342,"context_line":"        print(warnings, errors)"},{"line_number":343,"context_line":"        self.assertEqual(0, len(warnings))"},{"line_number":344,"context_line":"        self.assertEqual(0, len(errors))"},{"line_number":345,"context_line":"        check_jobs.assert_called_once()"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_760b6ed6","line":342,"in_reply_to":"5a74a57a_fdec3f2b","updated":"2016-11-28 15:10:56.000000000","message":"Done","commit_id":"93671adba5e3395785ae9a17597374c5bf525e24"}]}
