)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"6a45584cc99f580f2be2c90813eab9430c49f1c0","unresolved":false,"context_lines":[{"line_number":1,"context_line":"Parent:     f47f70b4 (Merge \"Fix numbering of steps in proxy section of install_multinode\")"},{"line_number":2,"context_line":"Author:     vagrant \u003cchristian.schwede@enovance.com\u003e"},{"line_number":3,"context_line":"AuthorDate: 2014-02-04 21:29:49 +0000"},{"line_number":4,"context_line":"Commit:     vagrant \u003cchristian.schwede@enovance.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-02-04 21:29:49 +0000"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAUH%2F9skg%3D","line":2,"updated":"2014-02-04 21:57:52.000000000","message":"vagrant, eh?","commit_id":"f2823ef148146d39c5a7ae9495cd62cea8fdf374"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"6a45584cc99f580f2be2c90813eab9430c49f1c0","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     vagrant \u003cchristian.schwede@enovance.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-02-04 21:29:49 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"WIP - Add tests for swift-recon-builder"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"1. Move functionality from bin/swift-ring-builder"},{"line_number":10,"context_line":"   to swift.cli.ringbuilder"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAUH%2F9skc%3D","line":7,"updated":"2014-02-04 21:57:52.000000000","message":"*swift-ring-builder","commit_id":"f2823ef148146d39c5a7ae9495cd62cea8fdf374"}],"swift/cli/ringbuilder.py":[{"author":{"_account_id":866,"name":"Chmouel Boudjnah","email":"chmouel@chmouel.com","username":"chmouel"},"change_message_id":"c93a74731ebc58028e0e5168529f538de0954e6e","unresolved":false,"context_lines":[{"line_number":37,"context_line":"EXIT_WARNING \u003d 1"},{"line_number":38,"context_line":"EXIT_ERROR \u003d 2"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"global backup_dir, builder, builder_file, ring_file"},{"line_number":41,"context_line":"backup_dir \u003d builder \u003d builder_file \u003d ring_file \u003d None"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F9qW4%3D","line":40,"updated":"2014-02-05 08:55:27.000000000","message":"why we need those globals?","commit_id":"aa437328432a21a93667d314e1f96b9861d0e55c"},{"author":{"_account_id":866,"name":"Chmouel Boudjnah","email":"chmouel@chmouel.com","username":"chmouel"},"change_message_id":"aba485dd417c2aa011447abb513e91043c4d1c84","unresolved":false,"context_lines":[{"line_number":37,"context_line":"EXIT_WARNING \u003d 1"},{"line_number":38,"context_line":"EXIT_ERROR \u003d 2"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"global backup_dir, builder, builder_file, ring_file"},{"line_number":41,"context_line":"backup_dir \u003d builder \u003d builder_file \u003d ring_file \u003d None"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F9qSU%3D","line":40,"in_reply_to":"AAAAUH%2F9qV4%3D","updated":"2014-02-05 09:11:51.000000000","message":"cool, would like to avoid as much as possible 8-)","commit_id":"aa437328432a21a93667d314e1f96b9861d0e55c"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"62e2ec867dea2ac61f0476490324b21af7ec3ff9","unresolved":false,"context_lines":[{"line_number":37,"context_line":"EXIT_WARNING \u003d 1"},{"line_number":38,"context_line":"EXIT_ERROR \u003d 2"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"global backup_dir, builder, builder_file, ring_file"},{"line_number":41,"context_line":"backup_dir \u003d builder \u003d builder_file \u003d ring_file \u003d None"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F9qV4%3D","line":40,"in_reply_to":"AAAAUH%2F9qW4%3D","updated":"2014-02-05 08:59:38.000000000","message":"Otherwise we get a lot of warnings from flake8 tests because these variables are no longer global (they were assigned in the part of the code that is now inside main()).\n\nOf course I could refactor the code to avoid using globals at all, but then the review will get much longer I think. So my intentention was to first add a patch with only minimal changes to existing code.","commit_id":"aa437328432a21a93667d314e1f96b9861d0e55c"},{"author":{"_account_id":866,"name":"Chmouel Boudjnah","email":"chmouel@chmouel.com","username":"chmouel"},"change_message_id":"7508a25fd8bd927335671401108ad03c478f9d50","unresolved":false,"context_lines":[{"line_number":803,"context_line":"def main(arguments\u003dNone):"},{"line_number":804,"context_line":"    global argv, backup_dir, builder, builder_file, ring_file"},{"line_number":805,"context_line":"    if arguments:"},{"line_number":806,"context_line":"        argv \u003d arguments"},{"line_number":807,"context_line":"    if len(argv) \u003c 2:"},{"line_number":808,"context_line":"        print \"swift-ring-builder %(MAJOR_VERSION)s.%(MINOR_VERSION)s\\n\" % \\"},{"line_number":809,"context_line":"              globals()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F9pqo%3D","line":806,"updated":"2014-02-05 10:44:47.000000000","message":"I don\u0027t think I like very much the idea of redefining sys.argv but I guess you are trying not to refactor much.","commit_id":"c80755a2a3d375221fc53c3af11b075ad1cab7ce"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"952c4ea37c39b9e623a364d551b3b93a91cf6161","unresolved":false,"context_lines":[{"line_number":803,"context_line":"def main(arguments\u003dNone):"},{"line_number":804,"context_line":"    global argv, backup_dir, builder, builder_file, ring_file"},{"line_number":805,"context_line":"    if arguments:"},{"line_number":806,"context_line":"        argv \u003d arguments"},{"line_number":807,"context_line":"    if len(argv) \u003c 2:"},{"line_number":808,"context_line":"        print \"swift-ring-builder %(MAJOR_VERSION)s.%(MINOR_VERSION)s\\n\" % \\"},{"line_number":809,"context_line":"              globals()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F9o0M%3D","line":806,"in_reply_to":"AAAAUH%2F9pqo%3D","updated":"2014-02-05 13:33:46.000000000","message":"I don\u0027t like it either and fixed this with a small refactoring that doesn\u0027t change that much.","commit_id":"c80755a2a3d375221fc53c3af11b075ad1cab7ce"}],"test/unit/cli/test_ringbuilder.py":[{"author":{"_account_id":866,"name":"Chmouel Boudjnah","email":"chmouel@chmouel.com","username":"chmouel"},"change_message_id":"aba485dd417c2aa011447abb513e91043c4d1c84","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    def test_create_ring(self):"},{"line_number":76,"context_line":"        sys.argv \u003d [\"\", \"test.builder\", \"create\", \"6\","},{"line_number":77,"context_line":"                    \"3.14159265359\", \"1\", \"\"]"},{"line_number":78,"context_line":"        reload(swift.cli.ringbuilder)"},{"line_number":79,"context_line":"        self.assertRaises(SystemExit, swift.cli.ringbuilder.main)"},{"line_number":80,"context_line":"        ring \u003d RingBuilder.load(\u0027test.builder\u0027)"},{"line_number":81,"context_line":"        self.assertEqual(ring.part_power, 6)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F9qSM%3D","line":78,"updated":"2014-02-05 09:11:51.000000000","message":"this seems hacky, what about something like that instead :\n\nhttps://gist.github.com/chmouel/d1166ee0ef2d28396209\n\nwhich seems to be more pythonic for tests","commit_id":"aa437328432a21a93667d314e1f96b9861d0e55c"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"53974fa801741dc7808878d1805c7f0adfa1f3ef","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    def test_create_ring(self):"},{"line_number":76,"context_line":"        sys.argv \u003d [\"\", \"test.builder\", \"create\", \"6\","},{"line_number":77,"context_line":"                    \"3.14159265359\", \"1\", \"\"]"},{"line_number":78,"context_line":"        reload(swift.cli.ringbuilder)"},{"line_number":79,"context_line":"        self.assertRaises(SystemExit, swift.cli.ringbuilder.main)"},{"line_number":80,"context_line":"        ring \u003d RingBuilder.load(\u0027test.builder\u0027)"},{"line_number":81,"context_line":"        self.assertEqual(ring.part_power, 6)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F9py4%3D","line":78,"in_reply_to":"AAAAUH%2F9qSM%3D","updated":"2014-02-05 10:26:53.000000000","message":"Yes, good idea! I added an optional \"arguments\" to main() to avoid this.","commit_id":"aa437328432a21a93667d314e1f96b9861d0e55c"},{"author":{"_account_id":866,"name":"Chmouel Boudjnah","email":"chmouel@chmouel.com","username":"chmouel"},"change_message_id":"600503e1b2ccf86a208e2fe75b0af00187b33068","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        is not allowed \"\"\""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        # Ensure there is no existing test builder file because"},{"line_number":50,"context_line":"        # create_sample_ring() might be used more than once in a single test"},{"line_number":51,"context_line":"        try:"},{"line_number":52,"context_line":"            os.remove(\u0027test.builder\u0027)"},{"line_number":53,"context_line":"        except OSError:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9nuc%3D","line":50,"updated":"2014-02-05 15:56:48.000000000","message":"saving to a temporary file should sove that problem, right?","commit_id":"2e6249d258b3fe808aa39845dcbf299fcc0bbe5f"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"e2123d31d81480c7802475ebbccae335b5a32036","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        is not allowed \"\"\""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        # Ensure there is no existing test builder file because"},{"line_number":50,"context_line":"        # create_sample_ring() might be used more than once in a single test"},{"line_number":51,"context_line":"        try:"},{"line_number":52,"context_line":"            os.remove(\u0027test.builder\u0027)"},{"line_number":53,"context_line":"        except OSError:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9ngw%3D","line":50,"in_reply_to":"AAAAUH%2F9nuc%3D","updated":"2014-02-05 16:28:15.000000000","message":"Unfortunately not - because we need a clean ring file for each iteration in several tests, thus we can\u0027t create only one in __init__.\nWe could create each time a new one in create_sample_ring, but then we still would need to cleanup in tearDown. So somewhere we need to delete that stuff.","commit_id":"2e6249d258b3fe808aa39845dcbf299fcc0bbe5f"},{"author":{"_account_id":866,"name":"Chmouel Boudjnah","email":"chmouel@chmouel.com","username":"chmouel"},"change_message_id":"600503e1b2ccf86a208e2fe75b0af00187b33068","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                      \u0027port\u0027: 6001,"},{"line_number":70,"context_line":"                      \u0027device\u0027: \u0027sda2\u0027"},{"line_number":71,"context_line":"                      })"},{"line_number":72,"context_line":"        ring.save(\u0027test.builder\u0027)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def test_create_ring(self):"},{"line_number":75,"context_line":"        argv \u003d [\"\", \"test.builder\", \"create\", \"6\", \"3.14159265359\", \"1\"]"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9nvY%3D","line":72,"updated":"2014-02-05 15:56:48.000000000","message":"I think saving it to a generated tempfile() would be cleaner.","commit_id":"2e6249d258b3fe808aa39845dcbf299fcc0bbe5f"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"e2123d31d81480c7802475ebbccae335b5a32036","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                      \u0027port\u0027: 6001,"},{"line_number":70,"context_line":"                      \u0027device\u0027: \u0027sda2\u0027"},{"line_number":71,"context_line":"                      })"},{"line_number":72,"context_line":"        ring.save(\u0027test.builder\u0027)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def test_create_ring(self):"},{"line_number":75,"context_line":"        argv \u003d [\"\", \"test.builder\", \"create\", \"6\", \"3.14159265359\", \"1\"]"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9njA%3D","line":72,"in_reply_to":"AAAAUH%2F9nvY%3D","updated":"2014-02-05 16:28:15.000000000","message":"Yepp, done!","commit_id":"2e6249d258b3fe808aa39845dcbf299fcc0bbe5f"}]}
