)]}'
{"keystone/assignment/controllers.py":[{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"b6c43a475c8d6c6146e75ef5635ab1babeb26e17","unresolved":false,"context_lines":[{"line_number":383,"context_line":"    def delete_domain(self, context, domain_id):"},{"line_number":384,"context_line":"        return self.assignment_api.delete_domain(domain_id)"},{"line_number":385,"context_line":""},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"@dependency.requires(\u0027assignment_api\u0027)"},{"line_number":388,"context_line":"class ProjectV3(controller.V3Controller):"},{"line_number":389,"context_line":"    collection_name \u003d \u0027projects\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_1942e1ad","line":386,"updated":"2015-01-27 09:57:11.000000000","message":"only assignment_api is dependency.","commit_id":"8e908bf7bab1c1d738f9e098378c4fbbfae9afca"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"7f5cef2174bf0e579203a23fa2ad8f646268c216","unresolved":false,"context_lines":[{"line_number":436,"context_line":""},{"line_number":437,"context_line":"        # subtree_as_list and subtree_as_ids are mutually exclusive"},{"line_number":438,"context_line":"        if subtree_as_list and subtree_as_ids:"},{"line_number":439,"context_line":"            msg \u003d _(\u0027cannot use subtree_as_list and subtree_as_ids query \u0027"},{"line_number":440,"context_line":"                    \u0027params at the same time.\u0027)"},{"line_number":441,"context_line":"            raise exception.ValidationError(msg)"},{"line_number":442,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_0b4e1097","line":439,"updated":"2015-01-27 06:26:41.000000000","message":"same comment on capitalisation as the previous patch","commit_id":"8e908bf7bab1c1d738f9e098378c4fbbfae9afca"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"b6c43a475c8d6c6146e75ef5635ab1babeb26e17","unresolved":false,"context_lines":[{"line_number":436,"context_line":""},{"line_number":437,"context_line":"        # subtree_as_list and subtree_as_ids are mutually exclusive"},{"line_number":438,"context_line":"        if subtree_as_list and subtree_as_ids:"},{"line_number":439,"context_line":"            msg \u003d _(\u0027cannot use subtree_as_list and subtree_as_ids query \u0027"},{"line_number":440,"context_line":"                    \u0027params at the same time.\u0027)"},{"line_number":441,"context_line":"            raise exception.ValidationError(msg)"},{"line_number":442,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_7943e5ae","line":439,"in_reply_to":"1a930d6b_0b4e1097","updated":"2015-01-27 09:57:11.000000000","message":"++","commit_id":"8e908bf7bab1c1d738f9e098378c4fbbfae9afca"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"275f4349121363386831190d2972fdd9e4bf9ab7","unresolved":false,"context_lines":[{"line_number":460,"context_line":""},{"line_number":461,"context_line":"        if subtree_as_ids:"},{"line_number":462,"context_line":"            ref[\u0027subtree\u0027] \u003d ("},{"line_number":463,"context_line":"                self.assignment_api.get_projects_in_subtree_as_ids(ref[\u0027id\u0027]))"},{"line_number":464,"context_line":""},{"line_number":465,"context_line":"    @controller.protected()"},{"line_number":466,"context_line":"    def get_project(self, context, project_id):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_a6cc538a","line":463,"updated":"2015-01-27 06:30:32.000000000","message":"should call resource directly here, no need to go via assignments","commit_id":"8e908bf7bab1c1d738f9e098378c4fbbfae9afca"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"b6c43a475c8d6c6146e75ef5635ab1babeb26e17","unresolved":false,"context_lines":[{"line_number":460,"context_line":""},{"line_number":461,"context_line":"        if subtree_as_ids:"},{"line_number":462,"context_line":"            ref[\u0027subtree\u0027] \u003d ("},{"line_number":463,"context_line":"                self.assignment_api.get_projects_in_subtree_as_ids(ref[\u0027id\u0027]))"},{"line_number":464,"context_line":""},{"line_number":465,"context_line":"    @controller.protected()"},{"line_number":466,"context_line":"    def get_project(self, context, project_id):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_59f1c993","line":463,"in_reply_to":"1a930d6b_a6cc538a","updated":"2015-01-27 09:57:11.000000000","message":"see comment comment, resource_api seems to not be dependency for ProjectV3.","commit_id":"8e908bf7bab1c1d738f9e098378c4fbbfae9afca"}],"keystone/assignment/core.py":[{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"7f5cef2174bf0e579203a23fa2ad8f646268c216","unresolved":false,"context_lines":[{"line_number":636,"context_line":"        return self.resource_api.list_projects_in_subtree(project_id, user_id)"},{"line_number":637,"context_line":""},{"line_number":638,"context_line":"    @deprecated_to_resource_api"},{"line_number":639,"context_line":"    def get_projects_in_subtree_as_ids(self, project_id):"},{"line_number":640,"context_line":"        return self.resource_api.get_projects_in_subtree_as_ids(project_id)"},{"line_number":641,"context_line":""},{"line_number":642,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_0b1c5077","line":639,"updated":"2015-01-27 06:26:41.000000000","message":"I don\u0027t think we need this....since this code is new and so nobody should be calling assignment for it.","commit_id":"8e908bf7bab1c1d738f9e098378c4fbbfae9afca"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"b6c43a475c8d6c6146e75ef5635ab1babeb26e17","unresolved":false,"context_lines":[{"line_number":636,"context_line":"        return self.resource_api.list_projects_in_subtree(project_id, user_id)"},{"line_number":637,"context_line":""},{"line_number":638,"context_line":"    @deprecated_to_resource_api"},{"line_number":639,"context_line":"    def get_projects_in_subtree_as_ids(self, project_id):"},{"line_number":640,"context_line":"        return self.resource_api.get_projects_in_subtree_as_ids(project_id)"},{"line_number":641,"context_line":""},{"line_number":642,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_1970210a","line":639,"in_reply_to":"1a930d6b_0b1c5077","updated":"2015-01-27 09:57:11.000000000","message":"see comments in previous file","commit_id":"8e908bf7bab1c1d738f9e098378c4fbbfae9afca"}],"keystone/resource/controllers.py":[{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"67a8ad576273412e5be9565a16440064a464e040","unresolved":false,"context_lines":[{"line_number":186,"context_line":"            ref[\u0027subtree\u0027] \u003d [ProjectV3.wrap_member(context, p)"},{"line_number":187,"context_line":"                              for p in subtree]"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        if (\u0027subtree_ids\u0027 in context[\u0027query_string\u0027] and"},{"line_number":190,"context_line":"                self.query_filter_is_true("},{"line_number":191,"context_line":"                    context[\u0027query_string\u0027][\u0027subtree_ids\u0027])):"},{"line_number":192,"context_line":"            ref[\u0027subtree\u0027] \u003d self.resource_api.get_projects_ids_in_subtree("}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_97abba88","line":189,"updated":"2015-01-21 11:31:52.000000000","message":"can\u0027t be used along with \"subtree_as_list\"","commit_id":"5b6e0c217eb4df3d45aab3de941f33330fe6afe8"},{"author":{"_account_id":9142,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@lsd.ufcg.edu.br","username":"samuel-z","inactive":true},"change_message_id":"aab9c49b1c6e651ee43b3d9d50a9276c0be28dc4","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        if (\u0027subtree_ids\u0027 in context[\u0027query_string\u0027] and"},{"line_number":190,"context_line":"                self.query_filter_is_true("},{"line_number":191,"context_line":"                    context[\u0027query_string\u0027][\u0027subtree_ids\u0027])):"},{"line_number":192,"context_line":"            ref[\u0027subtree\u0027] \u003d self.resource_api.get_projects_ids_in_subtree("},{"line_number":193,"context_line":"                ref[\u0027id\u0027])"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    @controller.protected()"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_2ac70a14","line":192,"updated":"2015-01-21 04:22:54.000000000","message":"Why not \u0027get_project_subtree_ids\u0027? It matches better the query param name and keep consistency with \u0027get_project_parents_ids\u0027.","commit_id":"5b6e0c217eb4df3d45aab3de941f33330fe6afe8"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"67a8ad576273412e5be9565a16440064a464e040","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        if (\u0027subtree_ids\u0027 in context[\u0027query_string\u0027] and"},{"line_number":190,"context_line":"                self.query_filter_is_true("},{"line_number":191,"context_line":"                    context[\u0027query_string\u0027][\u0027subtree_ids\u0027])):"},{"line_number":192,"context_line":"            ref[\u0027subtree\u0027] \u003d self.resource_api.get_projects_ids_in_subtree("},{"line_number":193,"context_line":"                ref[\u0027id\u0027])"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    @controller.protected()"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_773c8e94","line":192,"in_reply_to":"1a930d6b_2ac70a14","updated":"2015-01-21 11:31:52.000000000","message":"the idea was to make it consistent with the previous method to list the subtree.\n\nthe name of the method to get the parents was equally chosen to be consistent with the method to list the parents.","commit_id":"5b6e0c217eb4df3d45aab3de941f33330fe6afe8"}],"keystone/resource/core.py":[{"author":{"_account_id":9142,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@lsd.ufcg.edu.br","username":"samuel-z","inactive":true},"change_message_id":"aab9c49b1c6e651ee43b3d9d50a9276c0be28dc4","unresolved":false,"context_lines":[{"line_number":285,"context_line":"        subtree_ids \u003d self._build_subtree_ids_dict("},{"line_number":286,"context_line":"            project_id, _projects_indexed_by_parent(subtree_list))"},{"line_number":287,"context_line":"        return subtree_ids"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"    @cache.on_arguments(should_cache_fn\u003dSHOULD_CACHE,"},{"line_number":290,"context_line":"                        expiration_time\u003dEXPIRATION_TIME)"},{"line_number":291,"context_line":"    def get_domain(self, domain_id):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_edb8bc2c","line":288,"updated":"2015-01-21 04:22:54.000000000","message":"Since driver.list_projects_in_subtree already returns an ordered list of children (child at index i is at the same level or higher than project i+1), what about:\n\n    def get_projects_ids_in_subtree(self, project_id):\n        def subtree_ids(subtree_list, parent_id):\n            result \u003d {}\n            for i in range(len(subtree_list)):\n                child \u003d subtree_list[i]\n                if child[\u0027parent_id\u0027] \u003d\u003d parent_id:\n                    result[child[\u0027id\u0027]] \u003d subtree_ids(subtree_list[(i + 1)::],\n                                                      child[\u0027id\u0027])\n            return result if result else None\n\n        subtree_list \u003d self.driver.list_projects_in_subtree(project_id)\n        return subtree_ids(subtree_list, project_id)","commit_id":"5b6e0c217eb4df3d45aab3de941f33330fe6afe8"},{"author":{"_account_id":9142,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@lsd.ufcg.edu.br","username":"samuel-z","inactive":true},"change_message_id":"54532ee518d911547fecded14078345f3f2d410b","unresolved":false,"context_lines":[{"line_number":285,"context_line":"        subtree_ids \u003d self._build_subtree_ids_dict("},{"line_number":286,"context_line":"            project_id, _projects_indexed_by_parent(subtree_list))"},{"line_number":287,"context_line":"        return subtree_ids"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"    @cache.on_arguments(should_cache_fn\u003dSHOULD_CACHE,"},{"line_number":290,"context_line":"                        expiration_time\u003dEXPIRATION_TIME)"},{"line_number":291,"context_line":"    def get_domain(self, domain_id):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_b71196ae","line":288,"in_reply_to":"1a930d6b_97581afc","updated":"2015-01-21 11:40:32.000000000","message":"Well, it was just a proposed alternative. If it does not match your preferences and your code is good enough (it\u0027s the case), sure we can keep it :)","commit_id":"5b6e0c217eb4df3d45aab3de941f33330fe6afe8"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"67a8ad576273412e5be9565a16440064a464e040","unresolved":false,"context_lines":[{"line_number":285,"context_line":"        subtree_ids \u003d self._build_subtree_ids_dict("},{"line_number":286,"context_line":"            project_id, _projects_indexed_by_parent(subtree_list))"},{"line_number":287,"context_line":"        return subtree_ids"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"    @cache.on_arguments(should_cache_fn\u003dSHOULD_CACHE,"},{"line_number":290,"context_line":"                        expiration_time\u003dEXPIRATION_TIME)"},{"line_number":291,"context_line":"    def get_domain(self, domain_id):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_97581afc","line":288,"in_reply_to":"1a930d6b_edb8bc2c","updated":"2015-01-21 11:31:52.000000000","message":"same as previous change, we can\u0027t guarantee this will always be true. Also the suggestion has not better readability nor run time.","commit_id":"5b6e0c217eb4df3d45aab3de941f33330fe6afe8"},{"author":{"_account_id":9101,"name":"wanghong","email":"reviewwanghong@126.com","username":"wanghong"},"change_message_id":"3fd506f02eef2f32d4a071e72bd1b420d2672f7e","unresolved":false,"context_lines":[{"line_number":269,"context_line":""},{"line_number":270,"context_line":"        return traverse_subtree_hierarchy(project_id)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def get_projects_ids_in_subtree(self, project_id):"},{"line_number":273,"context_line":"        def _projects_indexed_by_parent(projects_list):"},{"line_number":274,"context_line":"            projects_by_parent \u003d {}"},{"line_number":275,"context_line":"            for proj in projects_list:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_1566c651","line":272,"updated":"2015-01-22 03:18:40.000000000","message":"Sugest add a comment to describe the structure of return data.","commit_id":"74512eadaf46cc219db4ec420832ea48e881983d"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"5dbda944df07c0f76978fc4d6fe216f9f45cd9fe","unresolved":false,"context_lines":[{"line_number":269,"context_line":""},{"line_number":270,"context_line":"        return traverse_subtree_hierarchy(project_id)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def get_projects_ids_in_subtree(self, project_id):"},{"line_number":273,"context_line":"        def _projects_indexed_by_parent(projects_list):"},{"line_number":274,"context_line":"            projects_by_parent \u003d {}"},{"line_number":275,"context_line":"            for proj in projects_list:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_d8c45742","line":272,"in_reply_to":"1a930d6b_1566c651","updated":"2015-01-22 18:10:54.000000000","message":"Done","commit_id":"74512eadaf46cc219db4ec420832ea48e881983d"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"7f5cef2174bf0e579203a23fa2ad8f646268c216","unresolved":false,"context_lines":[{"line_number":277,"context_line":"            self._filter_projects_list(subtree, user_id)"},{"line_number":278,"context_line":"        return subtree"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    def _build_subtree_as_ids_dict(self, project_id, subtree_by_parent):"},{"line_number":281,"context_line":"        def traverse_subtree_hierarchy(project_id):"},{"line_number":282,"context_line":"            children \u003d subtree_by_parent.get(project_id)"},{"line_number":283,"context_line":"            if not children:"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_e6665bba","line":280,"updated":"2015-01-27 06:26:41.000000000","message":"a bit like the previous patch, I find it quite difficult to convince myself this is doing the right thing...maybe some explanation comments would help.","commit_id":"8e908bf7bab1c1d738f9e098378c4fbbfae9afca"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"b6c43a475c8d6c6146e75ef5635ab1babeb26e17","unresolved":false,"context_lines":[{"line_number":277,"context_line":"            self._filter_projects_list(subtree, user_id)"},{"line_number":278,"context_line":"        return subtree"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    def _build_subtree_as_ids_dict(self, project_id, subtree_by_parent):"},{"line_number":281,"context_line":"        def traverse_subtree_hierarchy(project_id):"},{"line_number":282,"context_line":"            children \u003d subtree_by_parent.get(project_id)"},{"line_number":283,"context_line":"            if not children:"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_b9cd4d33","line":280,"in_reply_to":"1a930d6b_e6665bba","updated":"2015-01-27 09:57:11.000000000","message":"a comment explaining the traversal?","commit_id":"8e908bf7bab1c1d738f9e098378c4fbbfae9afca"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"7f5cef2174bf0e579203a23fa2ad8f646268c216","unresolved":false,"context_lines":[{"line_number":308,"context_line":"        dictionary::"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"            \u0027subtree\u0027: {"},{"line_number":311,"context_line":"                \u0027B\u0027: {"},{"line_number":312,"context_line":"                    \u0027C\u0027: None,"},{"line_number":313,"context_line":"                    \u0027D\u0027: None"},{"line_number":314,"context_line":"                }"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_46f3af09","line":311,"updated":"2015-01-27 06:26:41.000000000","message":"see comment in previous patch","commit_id":"8e908bf7bab1c1d738f9e098378c4fbbfae9afca"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"b6c43a475c8d6c6146e75ef5635ab1babeb26e17","unresolved":false,"context_lines":[{"line_number":308,"context_line":"        dictionary::"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"            \u0027subtree\u0027: {"},{"line_number":311,"context_line":"                \u0027B\u0027: {"},{"line_number":312,"context_line":"                    \u0027C\u0027: None,"},{"line_number":313,"context_line":"                    \u0027D\u0027: None"},{"line_number":314,"context_line":"                }"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_594d49c3","line":311,"in_reply_to":"1a930d6b_46f3af09","updated":"2015-01-27 09:57:11.000000000","message":"++","commit_id":"8e908bf7bab1c1d738f9e098378c4fbbfae9afca"}],"keystone/tests/test_v3_assignment.py":[{"author":{"_account_id":9142,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@lsd.ufcg.edu.br","username":"samuel-z","inactive":true},"change_message_id":"aab9c49b1c6e651ee43b3d9d50a9276c0be28dc4","unresolved":false,"context_lines":[{"line_number":590,"context_line":"        subtree_ids \u003d r.result[\u0027project\u0027][\u0027subtree\u0027]"},{"line_number":591,"context_line":""},{"line_number":592,"context_line":"        # projects[0] has only one direct child"},{"line_number":593,"context_line":"        self.assertEqual(1, len(subtree_ids))"},{"line_number":594,"context_line":""},{"line_number":595,"context_line":"        # The subtree hierarchy from projects[0] should have the following"},{"line_number":596,"context_line":"        # structure:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_edbd1c04","line":593,"updated":"2015-01-21 04:22:54.000000000","message":"Since we assert the exact dict at line 610, we could remove this assert.","commit_id":"5b6e0c217eb4df3d45aab3de941f33330fe6afe8"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"67a8ad576273412e5be9565a16440064a464e040","unresolved":false,"context_lines":[{"line_number":590,"context_line":"        subtree_ids \u003d r.result[\u0027project\u0027][\u0027subtree\u0027]"},{"line_number":591,"context_line":""},{"line_number":592,"context_line":"        # projects[0] has only one direct child"},{"line_number":593,"context_line":"        self.assertEqual(1, len(subtree_ids))"},{"line_number":594,"context_line":""},{"line_number":595,"context_line":"        # The subtree hierarchy from projects[0] should have the following"},{"line_number":596,"context_line":"        # structure:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_171a6a17","line":593,"in_reply_to":"1a930d6b_edbd1c04","updated":"2015-01-21 11:31:52.000000000","message":"I think this is useful in this case, since we show the actual hierarchy and it is pretty clear whether one query should return 1 or 2 keys.","commit_id":"5b6e0c217eb4df3d45aab3de941f33330fe6afe8"},{"author":{"_account_id":9142,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@lsd.ufcg.edu.br","username":"samuel-z","inactive":true},"change_message_id":"aab9c49b1c6e651ee43b3d9d50a9276c0be28dc4","unresolved":false,"context_lines":[{"line_number":616,"context_line":"        subtree_ids \u003d r.result[\u0027project\u0027][\u0027subtree\u0027]"},{"line_number":617,"context_line":""},{"line_number":618,"context_line":"        # projects[1] has two direct childs"},{"line_number":619,"context_line":"        self.assertEqual(2, len(subtree_ids))"},{"line_number":620,"context_line":""},{"line_number":621,"context_line":"        # The subtree hierarchy from projects[1] should have the following"},{"line_number":622,"context_line":"        # structure:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_8d465822","line":619,"updated":"2015-01-21 04:22:54.000000000","message":"Same as for line 593.","commit_id":"5b6e0c217eb4df3d45aab3de941f33330fe6afe8"},{"author":{"_account_id":9142,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@lsd.ufcg.edu.br","username":"samuel-z","inactive":true},"change_message_id":"aab9c49b1c6e651ee43b3d9d50a9276c0be28dc4","unresolved":false,"context_lines":[{"line_number":630,"context_line":"        }"},{"line_number":631,"context_line":""},{"line_number":632,"context_line":"        self.assertDictEqual(expected_dict, subtree_ids)"},{"line_number":633,"context_line":""},{"line_number":634,"context_line":"    def test_get_project_with_subtree_list(self):"},{"line_number":635,"context_line":"        \"\"\"Call ``GET /projects/{project_id}?subtree_as_list``.\"\"\""},{"line_number":636,"context_line":"        projects \u003d self._create_projects_hierarchy(hierarchy_size\u003d2)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_ad4a3425","line":633,"updated":"2015-01-21 04:22:54.000000000","message":"I think it could be worth it to add a test asserting the response for  a leaf project.","commit_id":"5b6e0c217eb4df3d45aab3de941f33330fe6afe8"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"67a8ad576273412e5be9565a16440064a464e040","unresolved":false,"context_lines":[{"line_number":630,"context_line":"        }"},{"line_number":631,"context_line":""},{"line_number":632,"context_line":"        self.assertDictEqual(expected_dict, subtree_ids)"},{"line_number":633,"context_line":""},{"line_number":634,"context_line":"    def test_get_project_with_subtree_list(self):"},{"line_number":635,"context_line":"        \"\"\"Call ``GET /projects/{project_id}?subtree_as_list``.\"\"\""},{"line_number":636,"context_line":"        projects \u003d self._create_projects_hierarchy(hierarchy_size\u003d2)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_371766ef","line":633,"in_reply_to":"1a930d6b_ad4a3425","updated":"2015-01-21 11:31:52.000000000","message":"++","commit_id":"5b6e0c217eb4df3d45aab3de941f33330fe6afe8"},{"author":{"_account_id":9101,"name":"wanghong","email":"reviewwanghong@126.com","username":"wanghong"},"change_message_id":"3fd506f02eef2f32d4a071e72bd1b420d2672f7e","unresolved":false,"context_lines":[{"line_number":588,"context_line":"          |    |    |"},{"line_number":589,"context_line":"          |    B    |"},{"line_number":590,"context_line":"          |  /   \\\\  |"},{"line_number":591,"context_line":"          | C     D |"},{"line_number":592,"context_line":"          +---------+"},{"line_number":593,"context_line":""},{"line_number":594,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_f5793afd","line":591,"updated":"2015-01-22 03:18:40.000000000","message":"This should be:\n    A\n    |\n    B\n   / \\\n  C   D","commit_id":"74512eadaf46cc219db4ec420832ea48e881983d"},{"author":{"_account_id":9101,"name":"wanghong","email":"reviewwanghong@126.com","username":"wanghong"},"change_message_id":"9a4e475fca61eb40f3109e520cf88fa34a3c3123","unresolved":false,"context_lines":[{"line_number":588,"context_line":"          |    |    |"},{"line_number":589,"context_line":"          |    B    |"},{"line_number":590,"context_line":"          |  /   \\\\  |"},{"line_number":591,"context_line":"          | C     D |"},{"line_number":592,"context_line":"          +---------+"},{"line_number":593,"context_line":""},{"line_number":594,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_b506d21e","line":591,"in_reply_to":"1a930d6b_958636b8","updated":"2015-01-22 03:40:29.000000000","message":"It is confusing when reading code. How about this:\n   A\n   |\n+--B--+\n|     |\nC     D","commit_id":"74512eadaf46cc219db4ec420832ea48e881983d"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"5dbda944df07c0f76978fc4d6fe216f9f45cd9fe","unresolved":false,"context_lines":[{"line_number":588,"context_line":"          |    |    |"},{"line_number":589,"context_line":"          |    B    |"},{"line_number":590,"context_line":"          |  /   \\\\  |"},{"line_number":591,"context_line":"          | C     D |"},{"line_number":592,"context_line":"          +---------+"},{"line_number":593,"context_line":""},{"line_number":594,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_58b147e0","line":591,"in_reply_to":"1a930d6b_b506d21e","updated":"2015-01-22 18:10:54.000000000","message":"Done","commit_id":"74512eadaf46cc219db4ec420832ea48e881983d"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"68a4cae3eae853a207a4c7e52deed7d3bab69079","unresolved":false,"context_lines":[{"line_number":588,"context_line":"          |    |    |"},{"line_number":589,"context_line":"          |    B    |"},{"line_number":590,"context_line":"          |  /   \\\\  |"},{"line_number":591,"context_line":"          | C     D |"},{"line_number":592,"context_line":"          +---------+"},{"line_number":593,"context_line":""},{"line_number":594,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_958636b8","line":591,"in_reply_to":"1a930d6b_f5793afd","updated":"2015-01-22 03:23:44.000000000","message":"not really, the double \\ is intentional and the extra space before | is because the double \\ turns into one once the doc is built.","commit_id":"74512eadaf46cc219db4ec420832ea48e881983d"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"3f50affd2d43797755503a5d7302a779e02f77b4","unresolved":false,"context_lines":[{"line_number":585,"context_line":"                                    |"},{"line_number":586,"context_line":"                                  +-B-+"},{"line_number":587,"context_line":"                                  |   |"},{"line_number":588,"context_line":"                                  C   D"},{"line_number":589,"context_line":""},{"line_number":590,"context_line":"        \"\"\""},{"line_number":591,"context_line":"        projects \u003d self._create_projects_hierarchy(hierarchy_size\u003d2)"}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_352669b8","line":588,"updated":"2015-02-02 16:28:10.000000000","message":"Because of the complexity of the code under tests that build a list of sub tree hierarchies as a cache, I\u0027d prefer to see there be more than one child of A in this test.","commit_id":"77a74791d36284e3a74ee99c2da5e9234e6aa3ee"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"99a3d0009a32a9b6b1b887880be283a8394737fc","unresolved":false,"context_lines":[{"line_number":585,"context_line":"                                    |"},{"line_number":586,"context_line":"                                  +-B-+"},{"line_number":587,"context_line":"                                  |   |"},{"line_number":588,"context_line":"                                  C   D"},{"line_number":589,"context_line":""},{"line_number":590,"context_line":"        \"\"\""},{"line_number":591,"context_line":"        projects \u003d self._create_projects_hierarchy(hierarchy_size\u003d2)"}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_211547f1","line":588,"in_reply_to":"da86d52c_352669b8","updated":"2015-02-02 17:25:46.000000000","message":"craeted a hierarchy with 5 projects like:\n\n                                  +--A--+                                                                     \n                                  |     |                                                                     \n                               +--B--+  C                                                                     \n                               |     |  |                                                                     \n                               D     E  F","commit_id":"77a74791d36284e3a74ee99c2da5e9234e6aa3ee"}]}
