)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"030e920a3ea9f4d4acce54b595b4c4fb5617e289","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Rodrigo Duarte Sousa \u003crodrigodsousa@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-09-07 18:58:30 -0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Refactor: expand_ref() in resource/controllers.py"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The expand_ref() method does lot of different things, this refactoring"},{"line_number":10,"context_line":"splits the method into different ones that perform different parts"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"da20952f_0aa8b9da","line":7,"updated":"2015-09-08 15:05:15.000000000","message":"s/expand_ref()/_expand_project_ref()","commit_id":"9be45ae355575216646e67f7a960b071d2093c64"},{"author":{"_account_id":13055,"name":"Alexander Makarov","email":"ajiekcahdp.makapob@gmail.com","username":"amakarov"},"change_message_id":"acd685de4171fb1765d770d8796033dce48303e3","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Rodrigo Duarte Sousa \u003crodrigodsousa@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-09-07 18:58:30 -0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Refactor: expand_ref() in resource/controllers.py"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The expand_ref() method does lot of different things, this refactoring"},{"line_number":10,"context_line":"splits the method into different ones that perform different parts"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"da20952f_50809f49","line":7,"in_reply_to":"da20952f_0aa8b9da","updated":"2015-09-08 17:30:44.000000000","message":"+1 It\u0027d be nice to have correct naming to ease the life of those exploring the logs in the future","commit_id":"9be45ae355575216646e67f7a960b071d2093c64"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"202b2fd838a01c9eafdf8fa567f7b2b705eee212","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Rodrigo Duarte Sousa \u003crodrigodsousa@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-09-07 18:58:30 -0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Refactor: expand_ref() in resource/controllers.py"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The expand_ref() method does lot of different things, this refactoring"},{"line_number":10,"context_line":"splits the method into different ones that perform different parts"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ba15a1d1_89628515","line":7,"in_reply_to":"da20952f_50809f49","updated":"2015-09-21 13:26:16.000000000","message":"Done. Included it in the body.","commit_id":"9be45ae355575216646e67f7a960b071d2093c64"}],"keystone/resource/controllers.py":[{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"3d427780a1c65add405fa57628fed6a6d2bcd554","unresolved":false,"context_lines":[{"line_number":216,"context_line":"        refs \u003d self.resource_api.list_projects(hints\u003dhints)"},{"line_number":217,"context_line":"        return ProjectV3.wrap_collection(context, refs, hints\u003dhints)"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    def _assert_mutual_exclusive_query_params(self, query_params):"},{"line_number":220,"context_line":"        # parents_as_list and parents_as_ids are mutually exclusive"},{"line_number":221,"context_line":"        if query_params[\u0027parents_as_list\u0027] and query_params[\u0027parents_as_ids\u0027]:"},{"line_number":222,"context_line":"            msg \u003d _(\u0027Cannot use parents_as_list and parents_as_ids query \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_727ba3f5","line":219,"updated":"2015-09-07 09:48:14.000000000","message":"This method can only be used in _expand_project_ref(...) as well.","commit_id":"680c732ca3a5431b7517a48b0608c27b8a599bff"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"0e75241fd7a08d55d99f70adbab00c3edfac39dd","unresolved":false,"context_lines":[{"line_number":216,"context_line":"        refs \u003d self.resource_api.list_projects(hints\u003dhints)"},{"line_number":217,"context_line":"        return ProjectV3.wrap_collection(context, refs, hints\u003dhints)"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    def _assert_mutual_exclusive_query_params(self, query_params):"},{"line_number":220,"context_line":"        # parents_as_list and parents_as_ids are mutually exclusive"},{"line_number":221,"context_line":"        if query_params[\u0027parents_as_list\u0027] and query_params[\u0027parents_as_ids\u0027]:"},{"line_number":222,"context_line":"            msg \u003d _(\u0027Cannot use parents_as_list and parents_as_ids query \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_6168aaf5","line":219,"in_reply_to":"da20952f_727ba3f5","updated":"2015-09-07 12:38:55.000000000","message":"yeah... actually... I believe this should be used in _get_query_params() and leave _expand_project_ref() with the task of only adding attributes to the project ref if necessary","commit_id":"680c732ca3a5431b7517a48b0608c27b8a599bff"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"4f518b1d7c52fd4546744b7bc93b59b72e1c4ced","unresolved":false,"context_lines":[{"line_number":229,"context_line":"                    \u0027params at the same time.\u0027)"},{"line_number":230,"context_line":"            raise exception.ValidationError(msg)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def _get_query_params(self, context):"},{"line_number":233,"context_line":"        params \u003d context[\u0027query_string\u0027]"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        def _get_boolean_param(query):"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_ecc89357","line":232,"updated":"2015-09-03 18:45:15.000000000","message":"I\u0027m not sure I like this broken out since you\u0027re creating a dictionary when it\u0027s not really needed. I\u0027d rather see the four assignments happen in the caller.","commit_id":"680c732ca3a5431b7517a48b0608c27b8a599bff"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"0e75241fd7a08d55d99f70adbab00c3edfac39dd","unresolved":false,"context_lines":[{"line_number":229,"context_line":"                    \u0027params at the same time.\u0027)"},{"line_number":230,"context_line":"            raise exception.ValidationError(msg)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def _get_query_params(self, context):"},{"line_number":233,"context_line":"        params \u003d context[\u0027query_string\u0027]"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        def _get_boolean_param(query):"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_8174de35","line":232,"in_reply_to":"da20952f_d265cfae","updated":"2015-09-07 12:38:55.000000000","message":"the idea of extracting this from the caller was to separate the \"responsibilities\". In the future we may have query params removed or added here.","commit_id":"680c732ca3a5431b7517a48b0608c27b8a599bff"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"3d427780a1c65add405fa57628fed6a6d2bcd554","unresolved":false,"context_lines":[{"line_number":229,"context_line":"                    \u0027params at the same time.\u0027)"},{"line_number":230,"context_line":"            raise exception.ValidationError(msg)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def _get_query_params(self, context):"},{"line_number":233,"context_line":"        params \u003d context[\u0027query_string\u0027]"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        def _get_boolean_param(query):"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_d265cfae","line":232,"in_reply_to":"da20952f_ecc89357","updated":"2015-09-07 09:48:14.000000000","message":"nested sub-function in _expand_project_ref(...)?","commit_id":"680c732ca3a5431b7517a48b0608c27b8a599bff"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"4f518b1d7c52fd4546744b7bc93b59b72e1c4ced","unresolved":false,"context_lines":[{"line_number":232,"context_line":"    def _get_query_params(self, context):"},{"line_number":233,"context_line":"        params \u003d context[\u0027query_string\u0027]"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        def _get_boolean_param(query):"},{"line_number":236,"context_line":"            return query in params and ("},{"line_number":237,"context_line":"                self.query_filter_is_true(params[query]))"},{"line_number":238,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_aceb7bdb","line":235,"updated":"2015-09-03 18:45:15.000000000","message":"This has a bad name. It\u0027s not a boolean param.","commit_id":"680c732ca3a5431b7517a48b0608c27b8a599bff"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"0e75241fd7a08d55d99f70adbab00c3edfac39dd","unresolved":false,"context_lines":[{"line_number":232,"context_line":"    def _get_query_params(self, context):"},{"line_number":233,"context_line":"        params \u003d context[\u0027query_string\u0027]"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        def _get_boolean_param(query):"},{"line_number":236,"context_line":"            return query in params and ("},{"line_number":237,"context_line":"                self.query_filter_is_true(params[query]))"},{"line_number":238,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_21e9527f","line":235,"in_reply_to":"da20952f_aceb7bdb","updated":"2015-09-07 12:38:55.000000000","message":"removed this","commit_id":"680c732ca3a5431b7517a48b0608c27b8a599bff"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"030e920a3ea9f4d4acce54b595b4c4fb5617e289","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        params \u003d context[\u0027query_string\u0027]"},{"line_number":221,"context_line":"        query_params \u003d {}"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"        def _assert_mutual_exclusive_params(param1, param2):"},{"line_number":224,"context_line":"            if query_params[param1] and query_params[param2]:"},{"line_number":225,"context_line":"                msg \u003d _(\u0027Cannot use %(param1)s and %(param2)s query \u0027"},{"line_number":226,"context_line":"                        \u0027params at the same time.\u0027) % ("}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_4a77919f","line":223,"updated":"2015-09-08 15:05:15.000000000","message":"I like this update. :)","commit_id":"9be45ae355575216646e67f7a960b071d2093c64"},{"author":{"_account_id":13055,"name":"Alexander Makarov","email":"ajiekcahdp.makapob@gmail.com","username":"amakarov"},"change_message_id":"acd685de4171fb1765d770d8796033dce48303e3","unresolved":false,"context_lines":[{"line_number":239,"context_line":"        _assert_mutual_exclusive_params(\u0027parents_as_list\u0027, \u0027parents_as_ids\u0027)"},{"line_number":240,"context_line":"        _assert_mutual_exclusive_params(\u0027subtree_as_list\u0027, \u0027subtree_as_ids\u0027)"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"        return query_params"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"    def _expand_project_ref(self, context, ref):"},{"line_number":245,"context_line":"        user_id \u003d self.get_auth_context(context).get(\u0027user_id\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_bc07971c","line":242,"updated":"2015-09-08 17:30:44.000000000","message":"I\u0027d rather use tuple here: you aren\u0027t going to expose this function in any way - so you don\u0027t need to assemble a dict; as for me, using variables in calling function is more compact and readable","commit_id":"9be45ae355575216646e67f7a960b071d2093c64"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"b8421ef93d6239e8b03636b49bf998dec390abde","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        user_id \u003d self.get_auth_context(context).get(\u0027user_id\u0027)"},{"line_number":264,"context_line":"        query_params \u003d self._resolve_query_params(context)"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"        if query_params[\u0027parents_as_list\u0027]:"},{"line_number":267,"context_line":"            parents \u003d self.resource_api.list_project_parents("},{"line_number":268,"context_line":"                ref[\u0027id\u0027], user_id)"},{"line_number":269,"context_line":"            ref[\u0027parents\u0027] \u003d [ProjectV3.wrap_member(context, p)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_05561cd2","line":266,"updated":"2015-09-22 13:47:04.000000000","message":"Making something a dict value instead from a variable only because you\u0027ve moved to to a method is the opposite of refactoring.","commit_id":"c1a508b8754e724698425bce24474e5e473df4b4"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"85ae12f26f6eb04803519b77a01f535685b00519","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        user_id \u003d self.get_auth_context(context).get(\u0027user_id\u0027)"},{"line_number":264,"context_line":"        query_params \u003d self._resolve_query_params(context)"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"        if query_params[\u0027parents_as_list\u0027]:"},{"line_number":267,"context_line":"            parents \u003d self.resource_api.list_project_parents("},{"line_number":268,"context_line":"                ref[\u0027id\u0027], user_id)"},{"line_number":269,"context_line":"            ref[\u0027parents\u0027] \u003d [ProjectV3.wrap_member(context, p)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_96e146d3","line":266,"in_reply_to":"ba15a1d1_05561cd2","updated":"2015-10-02 01:01:50.000000000","message":"of course not, refactoring is related to improve readability and maintainability as well - which this patch is doing (btw, the code in master is mine and when I steped into it again, found that could be improved). there is no good reason for you be against the dict - I am in favor, sadly you gave a -2.","commit_id":"c1a508b8754e724698425bce24474e5e473df4b4"}]}
