)]}'
{"manila/data/utils.py":[{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"760e9234d7f1aff3c9b4f954e93e8622d463192d","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def get_progress(self):"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        # Empty share or empty contents"},{"line_number":43,"context_line":"        if self.completed and self.total_size \u003d\u003d 0:"},{"line_number":44,"context_line":"            return {\u0027total_progress\u0027: 100}"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        if not self.initialized or self.current_copy is None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3ac371cc_031ce868","line":43,"range":{"start_line":43,"start_character":30,"end_line":43,"end_character":50},"updated":"2016-08-17 01:55:21.000000000","message":"why must check total_size\u003d\u003d0?\nCan\u0027t completed\u003d\u003dtrue indicate that the copy progress is done?","commit_id":"d9d66cccb095b5b0a183c9d296bc811f3af33e9b"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"a420c130ae5d970b6c78a837b8ec33c114157521","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def get_progress(self):"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        # Empty share or empty contents"},{"line_number":43,"context_line":"        if self.completed and self.total_size \u003d\u003d 0:"},{"line_number":44,"context_line":"            return {\u0027total_progress\u0027: 100}"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        if not self.initialized or self.current_copy is None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3ac371cc_c17f5364","line":43,"range":{"start_line":43,"start_character":30,"end_line":43,"end_character":50},"in_reply_to":"3ac371cc_031ce868","updated":"2016-08-17 11:40:49.000000000","message":"completed is to indicate that the copy process is done, it is set in line 90 and is not related to the increment in size performed in line 147. We should not return total_progress \u003d 100 just because the copy is done. Progress must be 100 to be considered done, but it cannot be computed if all files are empty or there only directories, so this specific condition is addressing this.","commit_id":"d9d66cccb095b5b0a183c9d296bc811f3af33e9b"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"3e38fa73c63b839749e388ddfc6f598fd79f3c32","unresolved":false,"context_lines":[{"line_number":47,"context_line":"            return {\u0027total_progress\u0027: 0}"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        # If share is not empty, there will be files"},{"line_number":50,"context_line":"        if self.current_copy is not None:"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"            try:"},{"line_number":53,"context_line":"                size, err \u003d utils.execute(\"stat\", \"-c\", \"%s\","}],"source_content_type":"text/x-python","patch_set":1,"id":"1ac06dbe_fedc331a","line":50,"updated":"2016-08-19 14:34:44.000000000","message":"Since self.current_copy cannot be None (because of line 46) this \u0027if\u0027 should be removed.","commit_id":"d9d66cccb095b5b0a183c9d296bc811f3af33e9b"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"bf76f4335152c4f92e5e3a0a23451d68da5b755e","unresolved":false,"context_lines":[{"line_number":47,"context_line":"            return {\u0027total_progress\u0027: 0}"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        # If share is not empty, there will be files"},{"line_number":50,"context_line":"        if self.current_copy is not None:"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"            try:"},{"line_number":53,"context_line":"                size, err \u003d utils.execute(\"stat\", \"-c\", \"%s\","}],"source_content_type":"text/x-python","patch_set":1,"id":"1ac06dbe_2fe8577c","line":50,"in_reply_to":"1ac06dbe_fedc331a","updated":"2016-08-19 15:12:43.000000000","message":"Done","commit_id":"d9d66cccb095b5b0a183c9d296bc811f3af33e9b"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"760e9234d7f1aff3c9b4f954e93e8622d463192d","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":"            current_file_progress \u003d 0"},{"line_number":61,"context_line":"            if self.current_copy[\u0027size\u0027] \u003e 0:"},{"line_number":62,"context_line":"                current_file_progress \u003d size * 100 / self.current_copy[\u0027size\u0027]"},{"line_number":63,"context_line":"            current_file_path \u003d self.current_copy[\u0027file_path\u0027]"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"            total_progress \u003d 0"}],"source_content_type":"text/x-python","patch_set":1,"id":"3ac371cc_4339c0a3","line":62,"range":{"start_line":62,"start_character":40,"end_line":62,"end_character":78},"updated":"2016-08-17 01:55:21.000000000","message":"also need to convert by int?","commit_id":"d9d66cccb095b5b0a183c9d296bc811f3af33e9b"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"a420c130ae5d970b6c78a837b8ec33c114157521","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":"            current_file_progress \u003d 0"},{"line_number":61,"context_line":"            if self.current_copy[\u0027size\u0027] \u003e 0:"},{"line_number":62,"context_line":"                current_file_progress \u003d size * 100 / self.current_copy[\u0027size\u0027]"},{"line_number":63,"context_line":"            current_file_path \u003d self.current_copy[\u0027file_path\u0027]"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"            total_progress \u003d 0"}],"source_content_type":"text/x-python","patch_set":1,"id":"3ac371cc_86ce112c","line":62,"range":{"start_line":62,"start_character":40,"end_line":62,"end_character":78},"in_reply_to":"3ac371cc_4339c0a3","updated":"2016-08-17 11:40:49.000000000","message":"see lines 56 and 142. No need to convert again.","commit_id":"d9d66cccb095b5b0a183c9d296bc811f3af33e9b"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"85fab1ce364c84e5e18128f3727ba5be8945eaf3","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                                      self.current_copy[\u0027file_path\u0027],"},{"line_number":52,"context_line":"                                      run_as_root\u003dTrue)"},{"line_number":53,"context_line":"            size \u003d int(size)"},{"line_number":54,"context_line":"        except utils.processutils.ProcessExecutionError:"},{"line_number":55,"context_line":"            size \u003d 0"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        current_file_progress \u003d 0"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ac06dbe_4899446e","line":54,"range":{"start_line":54,"start_character":34,"end_line":54,"end_character":55},"updated":"2016-08-19 17:34:46.000000000","message":"Not a very specific error check. Hitting errors here will never hang the copy in a progress check loop, right? I think this is OK because the copy would fail and finish incomplete. So this should be OK, but might be nice to log the error at least for debug.","commit_id":"e4ddb090aede72b5a40cfaaa15bb2ff72d2a1e89"}]}
