)]}'
{"docker/base/set_configs.py":[{"author":{"_account_id":1390,"name":"Paul Bourke","email":"pauldbourke@proton.me","username":"pauldbourke"},"change_message_id":"90f1f8be46d6f8c42e8f0c0b2cd5a0f9436951a3","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        shutil.copy(source, dest)"},{"line_number":79,"context_line":"        self._set_properties(source, dest)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def _copy_recursively(self, source, dest):"},{"line_number":82,"context_line":"        LOG.info(\u0027Copying %s to %s\u0027, source, dest)"},{"line_number":83,"context_line":"        if os.path.isdir(source):"},{"line_number":84,"context_line":"            if os.path.exists(dest) and not os.path.isdir(dest):"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f201791_066bedf0","line":81,"range":{"start_line":81,"start_character":8,"end_line":81,"end_character":25},"updated":"2017-06-26 14:17:49.000000000","message":"I think a better name for this would be \"_merge_directories\".\n\n_copy_recursively is a bit unclear, _copy_file above already will do the equivalent of \u0027cp -r\u0027 when given directories.","commit_id":"a9f5dfbc39654a544af257321522eac296237ba3"},{"author":{"_account_id":13039,"name":"Martin André","email":"m.andre@redhat.com","username":"mandre"},"change_message_id":"5a561f218d1cb0b54f5dc76ff24ad3eaa83679b1","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        shutil.copy(source, dest)"},{"line_number":79,"context_line":"        self._set_properties(source, dest)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def _copy_recursively(self, source, dest):"},{"line_number":82,"context_line":"        LOG.info(\u0027Copying %s to %s\u0027, source, dest)"},{"line_number":83,"context_line":"        if os.path.isdir(source):"},{"line_number":84,"context_line":"            if os.path.exists(dest) and not os.path.isdir(dest):"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f201791_92d3b660","line":81,"range":{"start_line":81,"start_character":8,"end_line":81,"end_character":25},"in_reply_to":"5f201791_066bedf0","updated":"2017-06-26 16:50:13.000000000","message":"Agreed, _merge_directories is a much better name.","commit_id":"a9f5dfbc39654a544af257321522eac296237ba3"},{"author":{"_account_id":1390,"name":"Paul Bourke","email":"pauldbourke@proton.me","username":"pauldbourke"},"change_message_id":"90f1f8be46d6f8c42e8f0c0b2cd5a0f9436951a3","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        if not os.path.exists(parent_path):"},{"line_number":110,"context_line":"            os.makedirs(parent_path)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def _set_properties(self, source, dest):"},{"line_number":113,"context_line":"        if self.preserve_properties:"},{"line_number":114,"context_line":"            self._set_properties_from_file(source, dest)"},{"line_number":115,"context_line":"        else:"},{"line_number":116,"context_line":"            self._set_properties_from_conf(dest)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def _set_properties_from_file(self, source, dest):"},{"line_number":119,"context_line":"        shutil.copystat(source, dest)"},{"line_number":120,"context_line":"        stat \u003d os.stat(source)"},{"line_number":121,"context_line":"        os.chown(dest, stat.st_uid, stat.st_gid)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def _set_properties_from_conf(self, path):"},{"line_number":124,"context_line":"        handle_permissions({\u0027owner\u0027: self.owner, \u0027path\u0027: path,"},{"line_number":125,"context_line":"                            \u0027perm\u0027: self.perm})"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def copy(self):"},{"line_number":128,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5f201791_a60c3941","line":125,"range":{"start_line":112,"start_character":0,"end_line":125,"end_character":47},"updated":"2017-06-26 14:17:49.000000000","message":"There is now three functions for handling permissions/properties(would be nice to consolidate these two terms) in different places. It might be better just within the copy functions to do the copy, if preserve_properties use shutil.copy2(), otherwise do the regular copy and then call handle_permissions()","commit_id":"a9f5dfbc39654a544af257321522eac296237ba3"},{"author":{"_account_id":13039,"name":"Martin André","email":"m.andre@redhat.com","username":"mandre"},"change_message_id":"5a561f218d1cb0b54f5dc76ff24ad3eaa83679b1","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        if not os.path.exists(parent_path):"},{"line_number":110,"context_line":"            os.makedirs(parent_path)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def _set_properties(self, source, dest):"},{"line_number":113,"context_line":"        if self.preserve_properties:"},{"line_number":114,"context_line":"            self._set_properties_from_file(source, dest)"},{"line_number":115,"context_line":"        else:"},{"line_number":116,"context_line":"            self._set_properties_from_conf(dest)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def _set_properties_from_file(self, source, dest):"},{"line_number":119,"context_line":"        shutil.copystat(source, dest)"},{"line_number":120,"context_line":"        stat \u003d os.stat(source)"},{"line_number":121,"context_line":"        os.chown(dest, stat.st_uid, stat.st_gid)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def _set_properties_from_conf(self, path):"},{"line_number":124,"context_line":"        handle_permissions({\u0027owner\u0027: self.owner, \u0027path\u0027: path,"},{"line_number":125,"context_line":"                            \u0027perm\u0027: self.perm})"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def copy(self):"},{"line_number":128,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5f201791_3db4b3d0","line":125,"range":{"start_line":112,"start_character":0,"end_line":125,"end_character":47},"in_reply_to":"5f201791_a60c3941","updated":"2017-06-26 16:50:13.000000000","message":"Yeah, but I don\u0027t think we would gain anything by moving the complexity into copy(), because shutil.copy2() only works on file, and we need to be able to keep the properties of the directories as well. It would be a pile of if/else cases. I\u0027d rather have the copy functions call _set_properties().","commit_id":"a9f5dfbc39654a544af257321522eac296237ba3"},{"author":{"_account_id":1390,"name":"Paul Bourke","email":"pauldbourke@proton.me","username":"pauldbourke"},"change_message_id":"90f1f8be46d6f8c42e8f0c0b2cd5a0f9436951a3","unresolved":false,"context_lines":[{"line_number":369,"context_line":"    LOG.info(\"Kolla config strategy set to: %s\", config_strategy)"},{"line_number":370,"context_line":"    if config_strategy \u003d\u003d \"COPY_ALWAYS\":"},{"line_number":371,"context_line":"        copy_config(config)"},{"line_number":372,"context_line":"        handle_permissions(config)"},{"line_number":373,"context_line":"    elif config_strategy \u003d\u003d \"COPY_ONCE\":"},{"line_number":374,"context_line":"        if os.path.exists(\u0027/configured\u0027):"},{"line_number":375,"context_line":"            raise ImmutableConfig("}],"source_content_type":"text/x-python","patch_set":4,"id":"5f201791_0681adc3","line":372,"range":{"start_line":372,"start_character":0,"end_line":372,"end_character":34},"updated":"2017-06-26 14:17:49.000000000","message":"Will this overwrite the outcome set by preserve_properties? Same on line 380 for COPY_ONCE","commit_id":"a9f5dfbc39654a544af257321522eac296237ba3"},{"author":{"_account_id":13039,"name":"Martin André","email":"m.andre@redhat.com","username":"mandre"},"change_message_id":"5a561f218d1cb0b54f5dc76ff24ad3eaa83679b1","unresolved":false,"context_lines":[{"line_number":369,"context_line":"    LOG.info(\"Kolla config strategy set to: %s\", config_strategy)"},{"line_number":370,"context_line":"    if config_strategy \u003d\u003d \"COPY_ALWAYS\":"},{"line_number":371,"context_line":"        copy_config(config)"},{"line_number":372,"context_line":"        handle_permissions(config)"},{"line_number":373,"context_line":"    elif config_strategy \u003d\u003d \"COPY_ONCE\":"},{"line_number":374,"context_line":"        if os.path.exists(\u0027/configured\u0027):"},{"line_number":375,"context_line":"            raise ImmutableConfig("}],"source_content_type":"text/x-python","patch_set":4,"id":"5f201791_32374250","line":372,"range":{"start_line":372,"start_character":0,"end_line":372,"end_character":34},"in_reply_to":"5f201791_0681adc3","updated":"2017-06-26 16:50:13.000000000","message":"It does if you specify a file in \u0027permissions\u0027 that was also in \u0027config_files\u0027. Note that this was already the case before this patch.","commit_id":"a9f5dfbc39654a544af257321522eac296237ba3"},{"author":{"_account_id":1390,"name":"Paul Bourke","email":"pauldbourke@proton.me","username":"pauldbourke"},"change_message_id":"3657e9ac4a3fcd0e5971a6bc29af4278918efffc","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        if not os.path.exists(parent_path):"},{"line_number":110,"context_line":"            os.makedirs(parent_path)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def _set_properties(self, source, dest):"},{"line_number":113,"context_line":"        if self.preserve_properties:"},{"line_number":114,"context_line":"            self._set_properties_from_file(source, dest)"},{"line_number":115,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f201791_940caba5","line":112,"updated":"2017-06-27 09:59:12.000000000","message":"This is cleaner, looks good!","commit_id":"e313c896219b3942d66a00d5388ba2cda6bcce87"}]}
