)]}'
{"jenkins/scripts/project-requirements-change.py":[{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"4a9af966c60687ebe8b6193f9509a14cb6f59cb1","unresolved":false,"context_lines":[{"line_number":23,"context_line":"import sys"},{"line_number":24,"context_line":"import tempfile"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"SUPPORTED_BRANCHES \u003d (\u0027stable/icehouse\u0027, \u0027master\u0027)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"def run_command(cmd):"}],"source_content_type":"text/x-python","patch_set":2,"id":"baa201ad_22d7774c","line":26,"updated":"2014-10-07 17:14:21.000000000","message":"I think supported branches should be generated from git branch -a (we can alpha sort and special case master). Otherwise this is another location that humans have to rememer to update when we cut a release. Much easier to simply create a branch and have the tools handle that situation.","commit_id":"793b758db61addda18ff86611d0cff08ef8346dc"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"013d99f68def94cc0684ebba70538e03619708ba","unresolved":false,"context_lines":[{"line_number":23,"context_line":"import sys"},{"line_number":24,"context_line":"import tempfile"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"SUPPORTED_BRANCHES \u003d (\u0027stable/icehouse\u0027, \u0027master\u0027)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"def run_command(cmd):"}],"source_content_type":"text/x-python","patch_set":2,"id":"baa201ad_ad4bef57","line":26,"updated":"2014-09-30 18:23:43.000000000","message":"Should a comment be left here to remind that the tuple is ordered from oldest to newest?","commit_id":"793b758db61addda18ff86611d0cff08ef8346dc"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"28fdb8a46cf69e84d63b54a77c4723c3c3c97a08","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    curdir \u003d os.getcwd()"},{"line_number":106,"context_line":"    os.chdir(reqdir)"},{"line_number":107,"context_line":"    supported \u003d []"},{"line_number":108,"context_line":"    branches \u003d run_command(\"git branch -a | sort\").split(\"\\n\")"},{"line_number":109,"context_line":"    for branch in branches:"},{"line_number":110,"context_line":"        if \"remotes/origin/stable/\" in branch:"},{"line_number":111,"context_line":"            supported.append(branch.split(\u0027/origin/\u0027)[1])"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa7fdbe_4b92af4c","line":108,"updated":"2014-10-28 15:18:33.000000000","message":"As an alternative to chdiring you can tell git where the repo is, but this is fine.","commit_id":"c1740000d29fdbe0c958d08b1238af9b315bac8b"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"28fdb8a46cf69e84d63b54a77c4723c3c3c97a08","unresolved":false,"context_lines":[{"line_number":178,"context_line":"            # check against oldest stable branch, because we\u0027re going to need"},{"line_number":179,"context_line":"            # to sync the world here"},{"line_number":180,"context_line":"            required \u003d supported_branches[0]"},{"line_number":181,"context_line":"            check_requirements_for_branch(required, head, head_reqs, reqdir)"},{"line_number":182,"context_line":"        else:"},{"line_number":183,"context_line":"            check_requirements_for_branch(branch, head, head_reqs, reqdir)"},{"line_number":184,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa7fdbe_6b1853d3","line":181,"updated":"2014-10-28 15:18:33.000000000","message":"The commit message says this should check against all supported branches. Should we iterate across supported_branches instead of popping the first element off only?","commit_id":"c1740000d29fdbe0c958d08b1238af9b315bac8b"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"3b44683daa368fd8fafe8dea57923e9c7ee10fad","unresolved":false,"context_lines":[{"line_number":178,"context_line":"            # check against oldest stable branch, because we\u0027re going to need"},{"line_number":179,"context_line":"            # to sync the world here"},{"line_number":180,"context_line":"            required \u003d supported_branches[0]"},{"line_number":181,"context_line":"            check_requirements_for_branch(required, head, head_reqs, reqdir)"},{"line_number":182,"context_line":"        else:"},{"line_number":183,"context_line":"            check_requirements_for_branch(branch, head, head_reqs, reqdir)"},{"line_number":184,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa7fdbe_0b4d07c4","line":181,"in_reply_to":"9aa7fdbe_6b1853d3","updated":"2014-10-28 15:21:06.000000000","message":"yes, probably","commit_id":"c1740000d29fdbe0c958d08b1238af9b315bac8b"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"ed4616d75e7a876864551d323386c3c08e6eb0a0","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"def supports_branches(branches):"},{"line_number":94,"context_line":"    branches \u003d run_command(\"git branch -r -l\").split(\"\\n\")"},{"line_number":95,"context_line":"    for required in branches:"},{"line_number":96,"context_line":"        if not \"origin/%s\" % required in branches:"},{"line_number":97,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":4,"id":"9aa7fdbe_19b39d4d","line":94,"updated":"2014-10-28 15:57:08.000000000","message":"branches is re-used here rendering the intent of this function unclear","commit_id":"ca0a67b8ea6cdc9c758b74aa7e8ed663d2e21891"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"b51273286ad8900be93e6f00f0fee4c9f3961c85","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"def supports_branches(branches):"},{"line_number":94,"context_line":"    branches \u003d run_command(\"git branch -r -l\").split(\"\\n\")"},{"line_number":95,"context_line":"    for required in branches:"},{"line_number":96,"context_line":"        if not \"origin/%s\" % required in branches:"},{"line_number":97,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":4,"id":"9aa7fdbe_8e0e608a","line":94,"in_reply_to":"9aa7fdbe_19b39d4d","updated":"2014-10-28 18:07:50.000000000","message":"doh, yeh, completely munged that in the refactor","commit_id":"ca0a67b8ea6cdc9c758b74aa7e8ed663d2e21891"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"ed4616d75e7a876864551d323386c3c08e6eb0a0","unresolved":false,"context_lines":[{"line_number":103,"context_line":"# stable/* with master at the end)"},{"line_number":104,"context_line":"def collect_supported_branches(reqdir):"},{"line_number":105,"context_line":"    curdir \u003d os.getcwd()"},{"line_number":106,"context_line":"    os.chdir(reqdir)"},{"line_number":107,"context_line":"    supported \u003d []"},{"line_number":108,"context_line":"    branches \u003d run_command(\"git branch -a | sort\").split(\"\\n\")"},{"line_number":109,"context_line":"    for branch in branches:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9aa7fdbe_3985c159","line":106,"updated":"2014-10-28 15:57:08.000000000","message":"There\u0027s a \u0027--git-dir\u0027 argument that could be used to avoid the chdirs","commit_id":"ca0a67b8ea6cdc9c758b74aa7e8ed663d2e21891"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"b51273286ad8900be93e6f00f0fee4c9f3961c85","unresolved":false,"context_lines":[{"line_number":103,"context_line":"# stable/* with master at the end)"},{"line_number":104,"context_line":"def collect_supported_branches(reqdir):"},{"line_number":105,"context_line":"    curdir \u003d os.getcwd()"},{"line_number":106,"context_line":"    os.chdir(reqdir)"},{"line_number":107,"context_line":"    supported \u003d []"},{"line_number":108,"context_line":"    branches \u003d run_command(\"git branch -a | sort\").split(\"\\n\")"},{"line_number":109,"context_line":"    for branch in branches:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9aa7fdbe_2ef1f46a","line":106,"in_reply_to":"9aa7fdbe_3985c159","updated":"2014-10-28 18:07:50.000000000","message":"Done","commit_id":"ca0a67b8ea6cdc9c758b74aa7e8ed663d2e21891"},{"author":{"_account_id":5263,"name":"Jeremy Stanley","display_name":"fungi","email":"fungi@yuggoth.org","username":"fungi","status":"missing, presumed fed"},"change_message_id":"0544efac412c5f726978ff60b00e588895899467","unresolved":false,"context_lines":[{"line_number":165,"context_line":"    run_command(\"git remote update\")"},{"line_number":166,"context_line":"    run_command(\"git checkout remotes/origin/%s\" % branch)"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    with tempfile.TemporaryDirectory() as reqroot:"},{"line_number":169,"context_line":"        reqdir \u003d os.path.join(reqroot, \"requirements\")"},{"line_number":170,"context_line":"        run_command(\"git clone https://review.openstack.org/p/openstack/\""},{"line_number":171,"context_line":"                    \"requirements --depth 1 %s\" % reqdir)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_c30a5125","line":168,"updated":"2014-11-14 19:33:40.000000000","message":"Getting...\n\n    Traceback (most recent call last):\n      File \"../../openstack-infra/project-config/jenkins/scripts/project-requirements-change.py\", line 191, in \u003cmodule\u003e\n        main()\n      File \"../../openstack-infra/project-config/jenkins/scripts/project-requirements-change.py\", line 174, in main\n        with tempfile.TemporaryDirectory() as reqroot:\n    AttributeError: \u0027module\u0027 object has no attribute \u0027TemporaryDirectory\u0027\n\n\"New in 3.2\" according to https://docs.python.org/3/library/tempfile.html . Looks like this will need to use tempfile.mkdtemp plus some cleanup instead?","commit_id":"511f2554e4aa940579c917315f768e5615cf916c"}]}
