)]}'
{"neutron/db/migration/cli.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"c03e5a02f60d821dc8b25bf4a2949f591b553c35","unresolved":false,"context_lines":[{"line_number":266,"context_line":"    \u0027\u0027\u0027Return the path of the file that contains latest head(s), depending on"},{"line_number":267,"context_line":"       whether multiple branches are used."},{"line_number":268,"context_line":"    \u0027\u0027\u0027"},{"line_number":269,"context_line":"    if _separate_migration_branches_supported(neutron_config):"},{"line_number":270,"context_line":"        return _get_heads_file_path(neutron_config)"},{"line_number":271,"context_line":"    return _get_head_file_path(neutron_config)"},{"line_number":272,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_e3b6c83c","line":269,"updated":"2015-07-20 12:17:34.000000000","message":"Nit: There\u0027s some duplication in calling here. I see _get_heads_file_path() called on L270 and L284 for the same flow, and _get_root_versions_dir() called twice.\n\nCould consider changing _separate_migration_branches_supported() to instead of returning True/False, have it return path or None, and then either use the path on L270 or make the other call on L271. May want to rename the method as well, since it is returning the path. For example:\n\n    def get_head(base, filename):\n        full_path \u003d os.path.join(base, filename)\n        return full_path if os.path.exists(full_path) else None\n\n    def _get_active_head_file_path(neutron_config):\n        base \u003d _get_root_versions_dir(neutron_config)\n        return get_head(base, HEADS_FILENAME) if not None else get_head(base, HEAD_FILENAME)\n\n    def _set_version_locations(config):\n        ...\n        base \u003d _get_root_versions_dir(CONF)\n        if get_head(base, HEADS_FILENAME):\n            for branch in MIGRATION_BRANCHES:\n                ...","commit_id":"04f71b22e7a52c6dd01d498bdbed286007a65aa3"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"5f77d9e6d091b8fe3e7c957b16f5d0892dbb726d","unresolved":false,"context_lines":[{"line_number":266,"context_line":"    \u0027\u0027\u0027Return the path of the file that contains latest head(s), depending on"},{"line_number":267,"context_line":"       whether multiple branches are used."},{"line_number":268,"context_line":"    \u0027\u0027\u0027"},{"line_number":269,"context_line":"    if _separate_migration_branches_supported(neutron_config):"},{"line_number":270,"context_line":"        return _get_heads_file_path(neutron_config)"},{"line_number":271,"context_line":"    return _get_head_file_path(neutron_config)"},{"line_number":272,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_d96542b5","line":269,"in_reply_to":"3a50d1a3_1be3a234","updated":"2015-07-22 10:34:55.000000000","message":"OK, lets have this permanent change for now.","commit_id":"04f71b22e7a52c6dd01d498bdbed286007a65aa3"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"72fae5e045c0086670857d74af5d0b48e25799d5","unresolved":false,"context_lines":[{"line_number":266,"context_line":"    \u0027\u0027\u0027Return the path of the file that contains latest head(s), depending on"},{"line_number":267,"context_line":"       whether multiple branches are used."},{"line_number":268,"context_line":"    \u0027\u0027\u0027"},{"line_number":269,"context_line":"    if _separate_migration_branches_supported(neutron_config):"},{"line_number":270,"context_line":"        return _get_heads_file_path(neutron_config)"},{"line_number":271,"context_line":"    return _get_head_file_path(neutron_config)"},{"line_number":272,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_1be3a234","line":269,"in_reply_to":"3a50d1a3_2a099531","updated":"2015-07-22 09:59:40.000000000","message":"TODO is in line 29. Do you want to have another one here?","commit_id":"04f71b22e7a52c6dd01d498bdbed286007a65aa3"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"94b817d1ff345b79b627a332c34318feb9592022","unresolved":false,"context_lines":[{"line_number":266,"context_line":"    \u0027\u0027\u0027Return the path of the file that contains latest head(s), depending on"},{"line_number":267,"context_line":"       whether multiple branches are used."},{"line_number":268,"context_line":"    \u0027\u0027\u0027"},{"line_number":269,"context_line":"    if _separate_migration_branches_supported(neutron_config):"},{"line_number":270,"context_line":"        return _get_heads_file_path(neutron_config)"},{"line_number":271,"context_line":"    return _get_head_file_path(neutron_config)"},{"line_number":272,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_95b7afd7","line":269,"in_reply_to":"3a50d1a3_35d7d0ee","updated":"2015-07-21 14:37:59.000000000","message":"Overall, your comments seem applicable if only we didn\u0027t plan to migrate _separate_migration_branches_supported from checking for HEADS file existance to some other, separate flag, and maintaining HEAD file per branch.\n\n(see line 29).\n\nAfter it\u0027s implemented, there won\u0027t be duplication, while the intent of the functions will stay the same.\n\nComments?","commit_id":"04f71b22e7a52c6dd01d498bdbed286007a65aa3"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"e47e041f25a3b7f560086804d91337ed251f261c","unresolved":false,"context_lines":[{"line_number":266,"context_line":"    \u0027\u0027\u0027Return the path of the file that contains latest head(s), depending on"},{"line_number":267,"context_line":"       whether multiple branches are used."},{"line_number":268,"context_line":"    \u0027\u0027\u0027"},{"line_number":269,"context_line":"    if _separate_migration_branches_supported(neutron_config):"},{"line_number":270,"context_line":"        return _get_heads_file_path(neutron_config)"},{"line_number":271,"context_line":"    return _get_head_file_path(neutron_config)"},{"line_number":272,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_2a099531","line":269,"in_reply_to":"3a50d1a3_95b7afd7","updated":"2015-07-21 16:27:58.000000000","message":"OK so this is a temporary change. Makes sense. If you spin again, maybe you can just add a TODO to remove the HEAD related code.","commit_id":"04f71b22e7a52c6dd01d498bdbed286007a65aa3"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"c9b91ebdd9b702cc9cd2ba0b804a2fc4b16eb683","unresolved":false,"context_lines":[{"line_number":266,"context_line":"    \u0027\u0027\u0027Return the path of the file that contains latest head(s), depending on"},{"line_number":267,"context_line":"       whether multiple branches are used."},{"line_number":268,"context_line":"    \u0027\u0027\u0027"},{"line_number":269,"context_line":"    if _separate_migration_branches_supported(neutron_config):"},{"line_number":270,"context_line":"        return _get_heads_file_path(neutron_config)"},{"line_number":271,"context_line":"    return _get_head_file_path(neutron_config)"},{"line_number":272,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_35d7d0ee","line":269,"in_reply_to":"3a50d1a3_e3b6c83c","updated":"2015-07-21 09:03:41.000000000","message":"I agree with Paul here, I don\u0027t think we need both _get_head_file_path and _get_heads_file_path.","commit_id":"04f71b22e7a52c6dd01d498bdbed286007a65aa3"}]}
