)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":17001,"name":"Tim Buckley","email":"timothy.jas.buckley@hpe.com","username":"timothy.jas.buckley"},"change_message_id":"20f605fbe05c35e474da7023be05919b59cebe53","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Saad Zaher \u003csaad.zaher@hpe.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-06-23 17:32:58 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Freezer metadata part2"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I9a6febb0ce427630c3e6602047613d6804b360dd"},{"line_number":10,"context_line":"Implements-blueprint: freezer-metadata"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"3aaa91ec_945a8cf0","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":22},"updated":"2016-06-24 15:12:53.000000000","message":"Given how enormous this patch is, it would really benefit from a better title and a very detailed commit message :(","commit_id":"bf459310604ac6890867136445d4bf8a10f83ae2"},{"author":{"_account_id":17001,"name":"Tim Buckley","email":"timothy.jas.buckley@hpe.com","username":"timothy.jas.buckley"},"change_message_id":"20f605fbe05c35e474da7023be05919b59cebe53","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Freezer metadata part2"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I9a6febb0ce427630c3e6602047613d6804b360dd"},{"line_number":10,"context_line":"Implements-blueprint: freezer-metadata"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"3aaa91ec_1467bcb7","line":10,"range":{"start_line":10,"start_character":0,"end_line":10,"end_character":38},"updated":"2016-06-24 15:12:53.000000000","message":"This should be\n\n    Implements: blueprint freezer-metadata\n\naccording to https://wiki.openstack.org/wiki/GitCommitMessages#Summary_of_Git_commit_message_structure","commit_id":"bf459310604ac6890867136445d4bf8a10f83ae2"}],"freezer/common/config.py":[{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"05c5ac95847ea2cad055408f1ff35539cc555eb5","unresolved":false,"context_lines":[{"line_number":455,"context_line":"            if not os.path.exists(work_dir):"},{"line_number":456,"context_line":"                try:"},{"line_number":457,"context_line":"                    os.makedirs(work_dir)"},{"line_number":458,"context_line":"                    log_file \u003d prepare_logging(work_dir + \"/freezer.log\")"},{"line_number":459,"context_line":"                except (OSError, IOError) as err_msg:"},{"line_number":460,"context_line":"                    # This avoids freezer-agent to crash if it can\u0027t write to"},{"line_number":461,"context_line":"                    # ~/.freezer, which may happen on some env (for me,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3aaa91ec_81c22c83","line":458,"updated":"2016-06-26 02:36:00.000000000","message":"Why  use os.path.join above and not here?","commit_id":"cba8959c0bac499d274018ecf9da4f1e2dc7a95d"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"05c5ac95847ea2cad055408f1ff35539cc555eb5","unresolved":false,"context_lines":[{"line_number":456,"context_line":"                try:"},{"line_number":457,"context_line":"                    os.makedirs(work_dir)"},{"line_number":458,"context_line":"                    log_file \u003d prepare_logging(work_dir + \"/freezer.log\")"},{"line_number":459,"context_line":"                except (OSError, IOError) as err_msg:"},{"line_number":460,"context_line":"                    # This avoids freezer-agent to crash if it can\u0027t write to"},{"line_number":461,"context_line":"                    # ~/.freezer, which may happen on some env (for me,"},{"line_number":462,"context_line":"                    # it happens in Jenkins, as freezer-agent can\u0027t write to"}],"source_content_type":"text/x-python","patch_set":12,"id":"3aaa91ec_e1bdf002","line":459,"updated":"2016-06-26 02:36:00.000000000","message":"err_msg seems like a misnomer. An exception it being caught not an error message.","commit_id":"cba8959c0bac499d274018ecf9da4f1e2dc7a95d"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"05c5ac95847ea2cad055408f1ff35539cc555eb5","unresolved":false,"context_lines":[{"line_number":461,"context_line":"                    # ~/.freezer, which may happen on some env (for me,"},{"line_number":462,"context_line":"                    # it happens in Jenkins, as freezer-agent can\u0027t write to"},{"line_number":463,"context_line":"                    # /var/lib/jenkins)."},{"line_number":464,"context_line":"                    print(encodeutils.safe_decode(\u0027{}\u0027.format(err_msg)),"},{"line_number":465,"context_line":"                          file\u003dsys.stderr)"},{"line_number":466,"context_line":"        if log_file:"},{"line_number":467,"context_line":"            CONF.set_default(\u0027log_file\u0027, log_file)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3aaa91ec_21d37861","line":464,"updated":"2016-06-26 02:36:00.000000000","message":"Why is encodeutils.safe_decode necessary?","commit_id":"cba8959c0bac499d274018ecf9da4f1e2dc7a95d"},{"author":{"_account_id":15041,"name":"Domhnall Walsh","email":"domhnall.eam.walsh@hpe.com","username":"domhnall"},"change_message_id":"263a530eb451e38c4ff75235aaaac646b45158f2","unresolved":false,"context_lines":[{"line_number":176,"context_line":"                 help\u003d\"Restart the backup from level 0 after n days. Valid \""},{"line_number":177,"context_line":"                      \"only if --always-level option if set. If \""},{"line_number":178,"context_line":"                      \"--always-level is used together with \""},{"line_number":179,"context_line":"                      \"--remove-older-then, there might be \""},{"line_number":180,"context_line":"                      \"the chance where the initial level 0 will be removed. \""},{"line_number":181,"context_line":"                      \"Default False (Disabled)\"),"},{"line_number":182,"context_line":"    cfg.FloatOpt(\u0027remove-older-than\u0027,"}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_0d838399","line":179,"range":{"start_line":179,"start_character":38,"end_line":179,"end_character":42},"updated":"2016-07-29 12:50:48.000000000","message":"should be \"than\"","commit_id":"344592024f4a38925fe27b0eefb1de93402664a4"},{"author":{"_account_id":15041,"name":"Domhnall Walsh","email":"domhnall.eam.walsh@hpe.com","username":"domhnall"},"change_message_id":"263a530eb451e38c4ff75235aaaac646b45158f2","unresolved":false,"context_lines":[{"line_number":182,"context_line":"    cfg.FloatOpt(\u0027remove-older-than\u0027,"},{"line_number":183,"context_line":"                 short\u003d\u0027R\u0027,"},{"line_number":184,"context_line":"                 dest\u003d\u0027remove_older_than\u0027,"},{"line_number":185,"context_line":"                 help\u003d\"Checks in the specified container for object older than\""},{"line_number":186,"context_line":"                      \" the specified days. If i.e. 30 is specified, it will \""},{"line_number":187,"context_line":"                      \"remove the remote object older than 30 days. Default \""},{"line_number":188,"context_line":"                      \"False (Disabled)\"),"}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_8de93383","line":185,"range":{"start_line":185,"start_character":61,"end_line":185,"end_character":67},"updated":"2016-07-29 12:50:48.000000000","message":"Should probably be \"objects\" (plural)","commit_id":"344592024f4a38925fe27b0eefb1de93402664a4"},{"author":{"_account_id":15041,"name":"Domhnall Walsh","email":"domhnall.eam.walsh@hpe.com","username":"domhnall"},"change_message_id":"263a530eb451e38c4ff75235aaaac646b45158f2","unresolved":false,"context_lines":[{"line_number":473,"context_line":"            if not os.path.exists(work_dir):"},{"line_number":474,"context_line":"                try:"},{"line_number":475,"context_line":"                    os.makedirs(work_dir)"},{"line_number":476,"context_line":"                    log_file \u003d prepare_logging(work_dir + \"/freezer.log\")"},{"line_number":477,"context_line":"                except (OSError, IOError) as err_msg:"},{"line_number":478,"context_line":"                    # This avoids freezer-agent to crash if it can\u0027t write to"},{"line_number":479,"context_line":"                    # ~/.freezer, which may happen on some env (for me,"}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_ed542f22","line":476,"range":{"start_line":476,"start_character":46,"end_line":476,"end_character":72},"updated":"2016-07-29 12:50:48.000000000","message":"use os.path.join() here for compatibility.","commit_id":"344592024f4a38925fe27b0eefb1de93402664a4"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"1a313fccf00fd9f0f66d132aef47d1a681e4a5ec","unresolved":false,"context_lines":[{"line_number":473,"context_line":"            if not os.path.exists(work_dir):"},{"line_number":474,"context_line":"                try:"},{"line_number":475,"context_line":"                    os.makedirs(work_dir)"},{"line_number":476,"context_line":"                    log_file \u003d prepare_logging(work_dir + \"/freezer.log\")"},{"line_number":477,"context_line":"                except (OSError, IOError) as err_msg:"},{"line_number":478,"context_line":"                    # This avoids freezer-agent to crash if it can\u0027t write to"},{"line_number":479,"context_line":"                    # ~/.freezer, which may happen on some env (for me,"}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_dd9e9db7","line":476,"range":{"start_line":476,"start_character":46,"end_line":476,"end_character":72},"in_reply_to":"bacf61ea_ed542f22","updated":"2016-08-02 18:56:25.000000000","message":"os.path.join needs to be used so that this works on other os.","commit_id":"344592024f4a38925fe27b0eefb1de93402664a4"}],"freezer/engine/engine.py":[{"author":{"_account_id":14101,"name":"yapeng Yang","email":"a394954369@gmail.com","username":"yapeng"},"change_message_id":"ccb9861535424ce85b00165c084cec90649993d6","unresolved":false,"context_lines":[{"line_number":23,"context_line":"# PyCharm will not recognize queue. Puts red squiggle line under it. That\u0027s OK."},{"line_number":24,"context_line":"from six.moves import queue"},{"line_number":25,"context_line":"import shutil"},{"line_number":26,"context_line":"import six"},{"line_number":27,"context_line":"import tempfile"},{"line_number":28,"context_line":"import time"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3aaa91ec_470d7b3d","line":26,"updated":"2016-06-23 03:04:41.000000000","message":"import six and shutil shoud above of from six .moves import queue","commit_id":"5ee9e377d9f78a496622de065fa80e299470575d"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"192e2bf21ae3381cf5639165b68077d14009b431","unresolved":false,"context_lines":[{"line_number":116,"context_line":"            always_level\u003dalways_level,"},{"line_number":117,"context_line":"            restart_always_level\u003drestart_always_level"},{"line_number":118,"context_line":"        )"},{"line_number":119,"context_line":"        tmpdir \u003d tempfile.mkdtemp()"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        try:"},{"line_number":122,"context_line":"            engine_meta \u003d utils.path_join(tmpdir, \"engine_meta\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_08ea2ddb","line":119,"updated":"2016-06-23 21:19:00.000000000","message":"At this point, what happens if tmpdir cannot be created? How is this case handled? Probably needs to be inside a try block.","commit_id":"bf459310604ac6890867136445d4bf8a10f83ae2"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"192e2bf21ae3381cf5639165b68077d14009b431","unresolved":false,"context_lines":[{"line_number":127,"context_line":"            timestamp \u003d utils.DateTime.now().timestamp"},{"line_number":128,"context_line":"            backup \u003d base.Backup("},{"line_number":129,"context_line":"                engine\u003dself,"},{"line_number":130,"context_line":"                hostname_backup_name\u003dhostname_backup_name,"},{"line_number":131,"context_line":"                level_zero_timestamp\u003dprev_backup.level_zero_timestamp"},{"line_number":132,"context_line":"                if prev_backup else timestamp,"},{"line_number":133,"context_line":"                timestamp\u003dtimestamp,"}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_c8f14503","line":130,"updated":"2016-06-23 21:19:00.000000000","message":"Should \u003d have spaces around it?","commit_id":"bf459310604ac6890867136445d4bf8a10f83ae2"},{"author":{"_account_id":17001,"name":"Tim Buckley","email":"timothy.jas.buckley@hpe.com","username":"timothy.jas.buckley"},"change_message_id":"20f605fbe05c35e474da7023be05919b59cebe53","unresolved":false,"context_lines":[{"line_number":127,"context_line":"            timestamp \u003d utils.DateTime.now().timestamp"},{"line_number":128,"context_line":"            backup \u003d base.Backup("},{"line_number":129,"context_line":"                engine\u003dself,"},{"line_number":130,"context_line":"                hostname_backup_name\u003dhostname_backup_name,"},{"line_number":131,"context_line":"                level_zero_timestamp\u003dprev_backup.level_zero_timestamp"},{"line_number":132,"context_line":"                if prev_backup else timestamp,"},{"line_number":133,"context_line":"                timestamp\u003dtimestamp,"}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_de50b434","line":130,"in_reply_to":"3aaa91ec_c8f14503","updated":"2016-06-24 15:12:53.000000000","message":"For kwargs I think no spaces is standard, it would be a pep8 error otherwise.","commit_id":"bf459310604ac6890867136445d4bf8a10f83ae2"},{"author":{"_account_id":17001,"name":"Tim Buckley","email":"timothy.jas.buckley@hpe.com","username":"timothy.jas.buckley"},"change_message_id":"20f605fbe05c35e474da7023be05919b59cebe53","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            backup \u003d base.Backup("},{"line_number":129,"context_line":"                engine\u003dself,"},{"line_number":130,"context_line":"                hostname_backup_name\u003dhostname_backup_name,"},{"line_number":131,"context_line":"                level_zero_timestamp\u003dprev_backup.level_zero_timestamp"},{"line_number":132,"context_line":"                if prev_backup else timestamp,"},{"line_number":133,"context_line":"                timestamp\u003dtimestamp,"},{"line_number":134,"context_line":"                level\u003dprev_backup.level + 1 if prev_backup else 0"},{"line_number":135,"context_line":"            )"}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_1eb99c79","line":132,"range":{"start_line":131,"start_character":16,"end_line":132,"end_character":45},"updated":"2016-06-24 15:12:53.000000000","message":"This is some pretty odd formatting, maybe it would benefit from some parenthesis (and some indentation) around the conditional value?","commit_id":"bf459310604ac6890867136445d4bf8a10f83ae2"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"192e2bf21ae3381cf5639165b68077d14009b431","unresolved":false,"context_lines":[{"line_number":181,"context_line":"                b_file.write(json.dumps(self.metadata()))"},{"line_number":182,"context_line":"            self.storage.put_metadata(engine_meta, freezer_meta, backup)"},{"line_number":183,"context_line":"        finally:"},{"line_number":184,"context_line":"            shutil.rmtree(tmpdir)"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    def read_blocks(self, backup, write_pipe, read_pipe, except_queue):"},{"line_number":187,"context_line":"        # Close the read pipe in this child as it is unneeded"}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_68e491e0","line":184,"updated":"2016-06-23 21:19:00.000000000","message":"At this point, tmpdir may not have been created successfully and an exception may be thrown. This exception may overshadow the original exception that was the cause of the tmpdir not being created.","commit_id":"bf459310604ac6890867136445d4bf8a10f83ae2"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"192e2bf21ae3381cf5639165b68077d14009b431","unresolved":false,"context_lines":[{"line_number":218,"context_line":"        :param restore_path:"},{"line_number":219,"context_line":"        :param overwrite:"},{"line_number":220,"context_line":"        :param recent_to_date:"},{"line_number":221,"context_line":"        :return:"},{"line_number":222,"context_line":"        \"\"\""},{"line_number":223,"context_line":"        logging.info(\"Creation restore path: {0}\".format(restore_path))"},{"line_number":224,"context_line":"        utils.create_dir_tree(restore_path)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_680bf18e","line":221,"updated":"2016-06-23 21:19:00.000000000","message":"What does this function return?","commit_id":"bf459310604ac6890867136445d4bf8a10f83ae2"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"192e2bf21ae3381cf5639165b68077d14009b431","unresolved":false,"context_lines":[{"line_number":221,"context_line":"        :return:"},{"line_number":222,"context_line":"        \"\"\""},{"line_number":223,"context_line":"        logging.info(\"Creation restore path: {0}\".format(restore_path))"},{"line_number":224,"context_line":"        utils.create_dir_tree(restore_path)"},{"line_number":225,"context_line":"        if not overwrite and not utils.is_empty_dir(restore_path):"},{"line_number":226,"context_line":"            raise Exception("},{"line_number":227,"context_line":"                \"Restore dir is not empty. \""}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_08706d0a","line":224,"updated":"2016-06-23 21:19:00.000000000","message":"What happens if restore path cannot be created? Probably need to wrap this entire method in a try-catch block to handle errors.","commit_id":"bf459310604ac6890867136445d4bf8a10f83ae2"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"05c5ac95847ea2cad055408f1ff35539cc555eb5","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        :rtype: str"},{"line_number":90,"context_line":"        :return: Engine name"},{"line_number":91,"context_line":"        \"\"\""},{"line_number":92,"context_line":"        pass"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def backup_stream(self, backup_path, rich_queue, manifest_path):"},{"line_number":95,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"3aaa91ec_2161b8a9","line":92,"updated":"2016-06-26 02:36:00.000000000","message":"Should this throw a NotImplementedError?","commit_id":"cba8959c0bac499d274018ecf9da4f1e2dc7a95d"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"05c5ac95847ea2cad055408f1ff35539cc555eb5","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        try:"},{"line_number":121,"context_line":"            tmpdir \u003d tempfile.mkdtemp()"},{"line_number":122,"context_line":"        except Exception as e:"},{"line_number":123,"context_line":"            raise e"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3aaa91ec_010bdcd6","line":122,"updated":"2016-06-26 02:36:00.000000000","message":"At this point it would be good to log a message to give info about the error, and then reraise the exception.","commit_id":"cba8959c0bac499d274018ecf9da4f1e2dc7a95d"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"05c5ac95847ea2cad055408f1ff35539cc555eb5","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        try:"},{"line_number":126,"context_line":"            engine_meta \u003d utils.path_join(tmpdir, \"engine_meta\")"},{"line_number":127,"context_line":"            freezer_meta \u003d utils.path_join(tmpdir, \"freezer_meta\")"},{"line_number":128,"context_line":"            if prev_backup is not None:"},{"line_number":129,"context_line":"                prev_backup.storage.get_file(prev_backup.engine_metadata_path,"},{"line_number":130,"context_line":"                                             engine_meta)"},{"line_number":131,"context_line":"            timestamp \u003d utils.DateTime.now().timestamp"}],"source_content_type":"text/x-python","patch_set":12,"id":"3aaa91ec_41116403","line":128,"updated":"2016-06-26 02:36:00.000000000","message":"\"if prev_backup\" is equivalent to \"if prev_backup is not None\".","commit_id":"cba8959c0bac499d274018ecf9da4f1e2dc7a95d"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"05c5ac95847ea2cad055408f1ff35539cc555eb5","unresolved":false,"context_lines":[{"line_number":241,"context_line":"        max_level \u003d max(backups.keys())"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"        # Use SimpleQueue because Queue does not work on Mac OS X."},{"line_number":244,"context_line":"        read_except_queue \u003d SimpleQueue()"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"        for level in range(0, max_level + 1):"},{"line_number":247,"context_line":"            backup \u003d backups[level]"}],"source_content_type":"text/x-python","patch_set":12,"id":"3aaa91ec_21a418b8","line":244,"updated":"2016-06-26 02:36:00.000000000","message":"A new queue needs to be created for each level.","commit_id":"cba8959c0bac499d274018ecf9da4f1e2dc7a95d"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"05c5ac95847ea2cad055408f1ff35539cc555eb5","unresolved":false,"context_lines":[{"line_number":309,"context_line":""},{"line_number":310,"context_line":"    @abc.abstractmethod"},{"line_number":311,"context_line":"    def metadata(self):"},{"line_number":312,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":12,"id":"3aaa91ec_a1980879","line":312,"updated":"2016-06-26 02:36:00.000000000","message":"Should throw NotImplementedError?","commit_id":"cba8959c0bac499d274018ecf9da4f1e2dc7a95d"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"1a313fccf00fd9f0f66d132aef47d1a681e4a5ec","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        Should return stream for storing data."},{"line_number":107,"context_line":"        :return: stream"},{"line_number":108,"context_line":"        \"\"\""},{"line_number":109,"context_line":"        prev_backup \u003d self.storage.previous_backup("},{"line_number":110,"context_line":"            engine\u003dself,"},{"line_number":111,"context_line":"            hostname_backup_name\u003dhostname_backup_name,"},{"line_number":112,"context_line":"            no_incremental\u003dno_incremental,"},{"line_number":113,"context_line":"            max_level\u003dmax_level,"},{"line_number":114,"context_line":"            always_level\u003dalways_level,"},{"line_number":115,"context_line":"            restart_always_level\u003drestart_always_level"},{"line_number":116,"context_line":"        )"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_37870dd9","line":115,"range":{"start_line":109,"start_character":1,"end_line":115,"end_character":53},"updated":"2016-08-02 18:56:25.000000000","message":"This looks very convoluted. Is there a way that you can make this cleaner and more understandable.","commit_id":"344592024f4a38925fe27b0eefb1de93402664a4"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"1a313fccf00fd9f0f66d132aef47d1a681e4a5ec","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            tmpdir \u003d tempfile.mkdtemp()"},{"line_number":120,"context_line":"        except Exception as e:"},{"line_number":121,"context_line":"            LOG.error(\"Unable to create a tmp directory\")"},{"line_number":122,"context_line":"            raise e"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        try:"},{"line_number":125,"context_line":"            engine_meta \u003d utils.path_join(tmpdir, \"engine_meta\")"}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_1d5cb5ec","line":122,"updated":"2016-08-02 18:56:25.000000000","message":"Just need raise without the e. OW, the original stack trace is lost.","commit_id":"344592024f4a38925fe27b0eefb1de93402664a4"},{"author":{"_account_id":15041,"name":"Domhnall Walsh","email":"domhnall.eam.walsh@hpe.com","username":"domhnall"},"change_message_id":"263a530eb451e38c4ff75235aaaac646b45158f2","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        :param overwrite:"},{"line_number":224,"context_line":"        :param recent_to_date:"},{"line_number":225,"context_line":"        \"\"\""},{"line_number":226,"context_line":"        LOG.info(\"Creation restore path: {0}\".format(restore_path))"},{"line_number":227,"context_line":"        # if restore path can\u0027t be created this function will raise exception"},{"line_number":228,"context_line":"        utils.create_dir_tree(restore_path)"},{"line_number":229,"context_line":"        if not overwrite and not utils.is_empty_dir(restore_path):"}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_b80f132d","line":226,"range":{"start_line":226,"start_character":18,"end_line":226,"end_character":39},"updated":"2016-07-29 12:50:48.000000000","message":"Should this read \"Creating restore path\"?","commit_id":"344592024f4a38925fe27b0eefb1de93402664a4"},{"author":{"_account_id":15041,"name":"Domhnall Walsh","email":"domhnall.eam.walsh@hpe.com","username":"domhnall"},"change_message_id":"263a530eb451e38c4ff75235aaaac646b45158f2","unresolved":false,"context_lines":[{"line_number":231,"context_line":"                \"Restore dir is not empty. \""},{"line_number":232,"context_line":"                \"Please use --overwrite or provide different path.\")"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        LOG.info(\"Creation restore path completed\")"},{"line_number":235,"context_line":"        backups \u003d self.storage.get_latest_level_zero_increments("},{"line_number":236,"context_line":"            engine\u003dself,"},{"line_number":237,"context_line":"            hostname_backup_name\u003dhostname_backup_name,"}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_5827f7b5","line":234,"range":{"start_line":234,"start_character":18,"end_line":234,"end_character":49},"updated":"2016-07-29 12:50:48.000000000","message":"How about \"Restore path creation completed\" or \"Restore path created\"?","commit_id":"344592024f4a38925fe27b0eefb1de93402664a4"},{"author":{"_account_id":15041,"name":"Domhnall Walsh","email":"domhnall.eam.walsh@hpe.com","username":"domhnall"},"change_message_id":"263a530eb451e38c4ff75235aaaac646b45158f2","unresolved":false,"context_lines":[{"line_number":244,"context_line":""},{"line_number":245,"context_line":"        for level in range(0, max_level + 1):"},{"line_number":246,"context_line":"            backup \u003d backups[level]"},{"line_number":247,"context_line":"            LOG.info(\"Restore backup {0}\".format(backup))"},{"line_number":248,"context_line":"            read_pipe, write_pipe \u003d multiprocessing.Pipe()"},{"line_number":249,"context_line":"            process_stream \u003d multiprocessing.Process("},{"line_number":250,"context_line":"                target\u003dself.read_blocks,"}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_d83be7cf","line":247,"range":{"start_line":247,"start_character":22,"end_line":247,"end_character":29},"updated":"2016-07-29 12:50:48.000000000","message":"\"Restoring\"?","commit_id":"344592024f4a38925fe27b0eefb1de93402664a4"},{"author":{"_account_id":15041,"name":"Domhnall Walsh","email":"domhnall.eam.walsh@hpe.com","username":"domhnall"},"change_message_id":"263a530eb451e38c4ff75235aaaac646b45158f2","unresolved":false,"context_lines":[{"line_number":290,"context_line":"                raise EngineException(\"Engine error. Failed to restore.\")"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"        LOG.info("},{"line_number":293,"context_line":"            \u0027Restore execution successfully executed for backup name \u0027"},{"line_number":294,"context_line":"            \u0027{0}\u0027.format(backups[max_level]))"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_78a91bdf","line":293,"range":{"start_line":293,"start_character":13,"end_line":293,"end_character":52},"updated":"2016-07-29 12:50:48.000000000","message":"\"execution successfully executed\" is redundant. How about just \"Restore completed successfully\" instead?","commit_id":"344592024f4a38925fe27b0eefb1de93402664a4"}],"freezer/engine/tar/tar_engine.py":[{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"192e2bf21ae3381cf5639165b68077d14009b431","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            \"compression\": self.compression_algo,"},{"line_number":55,"context_line":"            # the encrypt_pass_file might be key content so we need to covert"},{"line_number":56,"context_line":"            # to boolean"},{"line_number":57,"context_line":"            \"encryption\": not not self.encrypt_pass_file}"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def backup_data(self, backup_path, manifest_path):"},{"line_number":60,"context_line":"        logging.info(\"Tar engine backup stream enter\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_630cb2ed","line":57,"updated":"2016-06-23 21:19:00.000000000","message":"\"not not\"? Is that really what you meant to have there?","commit_id":"bf459310604ac6890867136445d4bf8a10f83ae2"},{"author":{"_account_id":17001,"name":"Tim Buckley","email":"timothy.jas.buckley@hpe.com","username":"timothy.jas.buckley"},"change_message_id":"20f605fbe05c35e474da7023be05919b59cebe53","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            \"compression\": self.compression_algo,"},{"line_number":55,"context_line":"            # the encrypt_pass_file might be key content so we need to covert"},{"line_number":56,"context_line":"            # to boolean"},{"line_number":57,"context_line":"            \"encryption\": not not self.encrypt_pass_file}"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def backup_data(self, backup_path, manifest_path):"},{"line_number":60,"context_line":"        logging.info(\"Tar engine backup stream enter\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_d466d4eb","line":57,"in_reply_to":"3aaa91ec_630cb2ed","updated":"2016-06-24 15:12:53.000000000","message":"If the goal is to convert to a boolean, you might want to consider\n\n    bool(self.encrypt_pass_file)\n\ninstead?","commit_id":"bf459310604ac6890867136445d4bf8a10f83ae2"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"192e2bf21ae3381cf5639165b68077d14009b431","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        :param read_pipe:"},{"line_number":109,"context_line":"        :type backup: freezer.storage.base.Backup"},{"line_number":110,"context_line":"        :param backup:"},{"line_number":111,"context_line":"        :return:"},{"line_number":112,"context_line":"        \"\"\""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_08050d45","line":111,"updated":"2016-06-23 21:19:00.000000000","message":"What does this method return?","commit_id":"bf459310604ac6890867136445d4bf8a10f83ae2"},{"author":{"_account_id":15041,"name":"Domhnall Walsh","email":"domhnall.eam.walsh@hpe.com","username":"domhnall"},"change_message_id":"263a530eb451e38c4ff75235aaaac646b45158f2","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        }"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def backup_data(self, backup_path, manifest_path):"},{"line_number":64,"context_line":"        LOG.info(\"Tar engine backup stream enter\")"},{"line_number":65,"context_line":"        tar_command \u003d tar_builders.TarCommandBuilder("},{"line_number":66,"context_line":"            backup_path, self.compression_algo, self.is_windows)"},{"line_number":67,"context_line":"        if self.encrypt_pass_file:"}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_18573fcf","line":64,"range":{"start_line":64,"start_character":17,"end_line":64,"end_character":48},"updated":"2016-07-29 12:50:48.000000000","message":"This is bad English. What is the action actually taking place? Is it \"Tar engine beginning backup\" or \"Opening Tar engine backup stream\" or something?","commit_id":"344592024f4a38925fe27b0eefb1de93402664a4"},{"author":{"_account_id":15041,"name":"Domhnall Walsh","email":"domhnall.eam.walsh@hpe.com","username":"domhnall"},"change_message_id":"263a530eb451e38c4ff75235aaaac646b45158f2","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        self.check_process_output(tar_process, \u0027Backup\u0027)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        LOG.info(\"Tar engine streaming end\")"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def restore_level(self, restore_path, read_pipe, backup, except_queue):"},{"line_number":91,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_585ff7e4","line":88,"range":{"start_line":88,"start_character":18,"end_line":88,"end_character":42},"updated":"2016-07-29 12:50:48.000000000","message":"Could be worded better.","commit_id":"344592024f4a38925fe27b0eefb1de93402664a4"}],"freezer/job.py":[{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"05c5ac95847ea2cad055408f1ff35539cc555eb5","unresolved":false,"context_lines":[{"line_number":260,"context_line":""},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"class ConsistencyCheckException(Exception):"},{"line_number":263,"context_line":"    pass"}],"source_content_type":"text/x-python","patch_set":12,"id":"3aaa91ec_c199d47a","line":263,"updated":"2016-06-26 02:36:00.000000000","message":"Exceptions should go in another file/module?","commit_id":"cba8959c0bac499d274018ecf9da4f1e2dc7a95d"}],"freezer/main.py":[{"author":{"_account_id":17001,"name":"Tim Buckley","email":"timothy.jas.buckley@hpe.com","username":"timothy.jas.buckley"},"change_message_id":"20f605fbe05c35e474da7023be05919b59cebe53","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        \u0027exec\u0027: job.ExecJob}[conf.action](conf, storage)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    start_time \u003d utils.DateTime.now()"},{"line_number":124,"context_line":"    LOG.info(\u0027[*] Job execution Started at: {0}\u0027.format(start_time))"},{"line_number":125,"context_line":"    response \u003d freezer_job.execute()"},{"line_number":126,"context_line":"    end_time \u003d utils.DateTime.now()"},{"line_number":127,"context_line":"    LOG.info(\u0027[*] Job execution Finished, at: {0}\u0027.format(end_time))"}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_74ec402a","line":124,"range":{"start_line":124,"start_character":14,"end_line":124,"end_character":17},"updated":"2016-06-24 15:12:53.000000000","message":"Given I23de0558409e63978303963d592a4e5ee4dee2b5 we should probably avoid adding new log messages with \u0027[*]\u0027","commit_id":"bf459310604ac6890867136445d4bf8a10f83ae2"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"1a313fccf00fd9f0f66d132aef47d1a681e4a5ec","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        freezer_main(backup_args)"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"    except Exception as err:"},{"line_number":222,"context_line":"        LOG.exception(err)"},{"line_number":223,"context_line":"        quiet \u003d backup_args.quiet if backup_args else False"},{"line_number":224,"context_line":"        LOG.exception(err)"},{"line_number":225,"context_line":"        LOG.critical(\"End freezer agent process unsuccessfully\")"}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_1703e977","line":222,"range":{"start_line":222,"start_character":7,"end_line":222,"end_character":26},"updated":"2016-08-02 18:56:25.000000000","message":"Duplicate","commit_id":"344592024f4a38925fe27b0eefb1de93402664a4"}],"freezer/storage/base.py":[{"author":{"_account_id":14084,"name":"Einst Crazy","email":"yu.changcai@99cloud.net","username":"Einst"},"change_message_id":"ea00b39a046faf2dc3acbccda3d523455a342426","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                                    recent_to_date\u003drecent_to_date)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        err_msg \u003d \u0027[*] No matching backup name \"{0}\" found\u0027\\"},{"line_number":89,"context_line":"            .format(hostname_backup_name)"},{"line_number":90,"context_line":"        if not zeros:"},{"line_number":91,"context_line":"            raise IndexError(err_msg)"},{"line_number":92,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9abb7d3a_4619c221","line":89,"updated":"2016-05-31 15:12:46.000000000","message":"I think move these 2 lines into if condition is better.","commit_id":"d53121b411e0938e4b6290251a1bcc89ac21742c"},{"author":{"_account_id":14084,"name":"Einst Crazy","email":"yu.changcai@99cloud.net","username":"Einst"},"change_message_id":"ea00b39a046faf2dc3acbccda3d523455a342426","unresolved":false,"context_lines":[{"line_number":270,"context_line":"            metadata_content \u003d f.readlines()"},{"line_number":271,"context_line":"        LOG.info(\"metadata content download {0}\".format(metadata_content))"},{"line_number":272,"context_line":"        metadata_file.close()"},{"line_number":273,"context_line":"        utils.delete_file(metadata_file.name)"},{"line_number":274,"context_line":"        return json.loads(metadata_content[0])"}],"source_content_type":"text/x-python","patch_set":7,"id":"9abb7d3a_da7102aa","line":273,"updated":"2016-05-31 15:12:46.000000000","message":"As in the function  tempfile.NamedTemporaryFile\u0027s help says, \u0027delete\u0027 -- whether the file is deleted on close (default True). So does we need delete file here also?","commit_id":"d53121b411e0938e4b6290251a1bcc89ac21742c"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"192e2bf21ae3381cf5639165b68077d14009b431","unresolved":false,"context_lines":[{"line_number":89,"context_line":"                                    recent_to_date\u003drecent_to_date)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        err_msg \u003d \u0027[*] No matching backup name \"{0}\" found\u0027\\"},{"line_number":92,"context_line":"            .format(hostname_backup_name)"},{"line_number":93,"context_line":"        if not zeros:"},{"line_number":94,"context_line":"            raise IndexError(err_msg)"},{"line_number":95,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_23458ab2","line":92,"updated":"2016-06-23 21:19:00.000000000","message":"The err_msg creation should be after the if statement, should it?","commit_id":"bf459310604ac6890867136445d4bf8a10f83ae2"},{"author":{"_account_id":15041,"name":"Domhnall Walsh","email":"domhnall.eam.walsh@hpe.com","username":"domhnall"},"change_message_id":"263a530eb451e38c4ff75235aaaac646b45158f2","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# (c) Copyright 2015 Hewlett-Packard Development Company, L.P."},{"line_number":2,"context_line":"# (c) Copyright 2016 Hewlett-Packard Enterprise Development Company, L.P."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":5,"context_line":"# you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_181c5f11","line":2,"range":{"start_line":1,"start_character":0,"end_line":2,"end_character":73},"updated":"2016-07-29 12:50:48.000000000","message":"I think the word \"Company\" is gone from this.","commit_id":"344592024f4a38925fe27b0eefb1de93402664a4"},{"author":{"_account_id":15041,"name":"Domhnall Walsh","email":"domhnall.eam.walsh@hpe.com","username":"domhnall"},"change_message_id":"263a530eb451e38c4ff75235aaaac646b45158f2","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import abc"},{"line_number":18,"context_line":"import json"},{"line_number":19,"context_line":"import six"},{"line_number":20,"context_line":"import tempfile"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from oslo_log import log"}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_f8ed0bf0","line":19,"updated":"2016-07-29 12:50:48.000000000","message":"Should this blank line be here?","commit_id":"344592024f4a38925fe27b0eefb1de93402664a4"}],"freezer/storage/fslike.py":[{"author":{"_account_id":15041,"name":"Domhnall Walsh","email":"domhnall.eam.walsh@hpe.com","username":"domhnall"},"change_message_id":"263a530eb451e38c4ff75235aaaac646b45158f2","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        :type backup: freezer.storage.base.Backup"},{"line_number":45,"context_line":"        \"\"\""},{"line_number":46,"context_line":"        backup \u003d backup.copy(storage\u003dself)"},{"line_number":47,"context_line":"        \"\"\":type: freezer.storage.base.Backup\"\"\""},{"line_number":48,"context_line":"        path \u003d backup.data_path"},{"line_number":49,"context_line":"        self.create_dirs(path.rsplit(\u0027/\u0027, 1)[0])"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_58b7f7d7","line":47,"range":{"start_line":47,"start_character":8,"end_line":47,"end_character":48},"updated":"2016-07-29 12:50:48.000000000","message":"Is this a duplicate of info in the docstring?","commit_id":"344592024f4a38925fe27b0eefb1de93402664a4"}],"freezer/storage/multiple.py":[{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"192e2bf21ae3381cf5639165b68077d14009b431","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                       engine,"},{"line_number":71,"context_line":"                       hostname_backup_name,"},{"line_number":72,"context_line":"                       recent_to_date\u003dNone):"},{"line_number":73,"context_line":"        backups \u003d \\"},{"line_number":74,"context_line":"            [s.get_level_zero(engine, hostname_backup_name, recent_to_date)"},{"line_number":75,"context_line":"             for s in self.storages]"},{"line_number":76,"context_line":"        # flat the list"}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_c38126c5","line":73,"updated":"2016-06-23 21:19:00.000000000","message":"The preferred convention is to use () instead of \\ for continuation.","commit_id":"bf459310604ac6890867136445d4bf8a10f83ae2"}],"freezer/storage/physical.py":[{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"192e2bf21ae3381cf5639165b68077d14009b431","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                       hostname_backup_name,"},{"line_number":45,"context_line":"                       recent_to_date\u003dNone):"},{"line_number":46,"context_line":"        \"\"\""},{"line_number":47,"context_line":"        Gets backups by backup_name and hostname"},{"line_number":48,"context_line":"        :type engine: freezer.engine.engine.BackupEngine"},{"line_number":49,"context_line":"        :param engine: Search for backups made by specified engine"},{"line_number":50,"context_line":"        :type hostname_backup_name: str"}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_83c9de28","line":47,"updated":"2016-06-23 21:19:00.000000000","message":"Needs to be empty lines in the doc.","commit_id":"bf459310604ac6890867136445d4bf8a10f83ae2"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"05c5ac95847ea2cad055408f1ff35539cc555eb5","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        :type backup: freezer.storage.base.Backup"},{"line_number":80,"context_line":"        :return:"},{"line_number":81,"context_line":"        \"\"\""},{"line_number":82,"context_line":"        pass"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    @abc.abstractmethod"},{"line_number":85,"context_line":"    def listdir(self, path):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3aaa91ec_e175f031","line":82,"updated":"2016-06-26 02:36:00.000000000","message":"NotImplementedError?","commit_id":"cba8959c0bac499d274018ecf9da4f1e2dc7a95d"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"05c5ac95847ea2cad055408f1ff35539cc555eb5","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        :param path:"},{"line_number":89,"context_line":"        :rtype: collections.Iterable[str]"},{"line_number":90,"context_line":"        \"\"\""},{"line_number":91,"context_line":"        pass"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def put_metadata(self,"},{"line_number":94,"context_line":"                     engine_metadata_path,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3aaa91ec_61af407d","line":91,"updated":"2016-06-26 02:36:00.000000000","message":"NotImplementedError?","commit_id":"cba8959c0bac499d274018ecf9da4f1e2dc7a95d"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"05c5ac95847ea2cad055408f1ff35539cc555eb5","unresolved":false,"context_lines":[{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    @abc.abstractmethod"},{"line_number":111,"context_line":"    def rmtree(self, path):"},{"line_number":112,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":12,"id":"3aaa91ec_81c86c56","line":112,"updated":"2016-06-26 02:36:00.000000000","message":"NotImplementedError?","commit_id":"cba8959c0bac499d274018ecf9da4f1e2dc7a95d"},{"author":{"_account_id":15041,"name":"Domhnall Walsh","email":"domhnall.eam.walsh@hpe.com","username":"domhnall"},"change_message_id":"263a530eb451e38c4ff75235aaaac646b45158f2","unresolved":false,"context_lines":[{"line_number":1,"context_line":"\"\"\""},{"line_number":2,"context_line":"(c) Copyright 2016 Hewlett-Packard Enterprise Development Company, L.P."},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":5,"context_line":"you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_d84007a8","line":2,"range":{"start_line":2,"start_character":58,"end_line":2,"end_character":65},"updated":"2016-07-29 12:50:48.000000000","message":"\"Company\" word gone?","commit_id":"344592024f4a38925fe27b0eefb1de93402664a4"},{"author":{"_account_id":15041,"name":"Domhnall Walsh","email":"domhnall.eam.walsh@hpe.com","username":"domhnall"},"change_message_id":"263a530eb451e38c4ff75235aaaac646b45158f2","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        backup \u003d backup.copy(self)"},{"line_number":105,"context_line":"        \"\"\":type backup: freezer.storage.base.Backup\"\"\""},{"line_number":106,"context_line":"        self.put_file(engine_metadata_path, backup.engine_metadata_path)"},{"line_number":107,"context_line":"        self.create_dirs(backup.metadata_path.rsplit(\u0027/\u0027, 1)[0])"},{"line_number":108,"context_line":"        self.put_file(freezer_metadata_path, backup.metadata_path)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_d8b12791","line":107,"range":{"start_line":107,"start_character":25,"end_line":107,"end_character":63},"updated":"2016-07-29 12:50:48.000000000","message":"This looks like it\u0027s equivalent to os.path.basename(backup.metadata_path)?","commit_id":"344592024f4a38925fe27b0eefb1de93402664a4"}],"freezer/storage/swift.py":[{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"192e2bf21ae3381cf5639165b68077d14009b431","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        for file in self.swift().get_container(split[0],"},{"line_number":38,"context_line":"                                               prefix\u003dsplit[1])[1]:"},{"line_number":39,"context_line":"            self.swift().delete_object(split[0], file[\u0027name\u0027])"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def put_file(self, from_path, to_path):"},{"line_number":42,"context_line":"        self.client_manager.create_swift()"},{"line_number":43,"context_line":"        split \u003d to_path.rsplit(\u0027/\u0027, 1)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_439256f7","line":40,"updated":"2016-06-23 21:19:00.000000000","message":"Probably needs some exception handling and logging when dealing with swift.","commit_id":"bf459310604ac6890867136445d4bf8a10f83ae2"},{"author":{"_account_id":17001,"name":"Tim Buckley","email":"timothy.jas.buckley@hpe.com","username":"timothy.jas.buckley"},"change_message_id":"20f605fbe05c35e474da7023be05919b59cebe53","unresolved":false,"context_lines":[{"line_number":206,"context_line":"            files \u003d self.swift().get_container(container\u003dsplit[0],"},{"line_number":207,"context_line":"                                               full_listing\u003dTrue,"},{"line_number":208,"context_line":"                                               prefix\u003dsplit[1])[1]"},{"line_number":209,"context_line":"            return set(f[\u0027name\u0027][len(split[1]):].split(\u0027/\u0027, 2)[1] for f in"},{"line_number":210,"context_line":"                       files)"},{"line_number":211,"context_line":"        except Exception as e:"},{"line_number":212,"context_line":"            logging.info(e)"},{"line_number":213,"context_line":"            return []"}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_f4cdd066","line":210,"range":{"start_line":209,"start_character":12,"end_line":210,"end_character":29},"updated":"2016-06-24 15:12:53.000000000","message":"This would really benefit from being expanded into a plain old for loop, it\u0027s extremely difficult to mentally parse","commit_id":"bf459310604ac6890867136445d4bf8a10f83ae2"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"05c5ac95847ea2cad055408f1ff35539cc555eb5","unresolved":false,"context_lines":[{"line_number":38,"context_line":"                                               prefix\u003dsplit[1])[1]:"},{"line_number":39,"context_line":"            try:"},{"line_number":40,"context_line":"                self.swift().delete_object(split[0], file[\u0027name\u0027])"},{"line_number":41,"context_line":"            except Exception as e:"},{"line_number":42,"context_line":"                raise e"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def put_file(self, from_path, to_path):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3aaa91ec_61e620e9","line":41,"updated":"2016-06-26 02:36:00.000000000","message":"Should log some error so that the context of the exception is clear?","commit_id":"cba8959c0bac499d274018ecf9da4f1e2dc7a95d"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"05c5ac95847ea2cad055408f1ff35539cc555eb5","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def put_file(self, from_path, to_path):"},{"line_number":45,"context_line":"        self.client_manager.create_swift()"},{"line_number":46,"context_line":"        split \u003d to_path.rsplit(\u0027/\u0027, 1)"},{"line_number":47,"context_line":"        with open(from_path, \u0027r\u0027) as meta_fd:"},{"line_number":48,"context_line":"            self.swift().put_object(split[0], split[1], meta_fd)"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3aaa91ec_a1d488eb","line":46,"updated":"2016-06-26 02:36:00.000000000","message":"Will this work on Windows?","commit_id":"cba8959c0bac499d274018ecf9da4f1e2dc7a95d"},{"author":{"_account_id":15041,"name":"Domhnall Walsh","email":"domhnall.eam.walsh@hpe.com","username":"domhnall"},"change_message_id":"263a530eb451e38c4ff75235aaaac646b45158f2","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    \"\"\""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def rmtree(self, path):"},{"line_number":34,"context_line":"        split \u003d path.rsplit(\u0027/\u0027, 1)"},{"line_number":35,"context_line":"        for file in self.swift().get_container(split[0],"},{"line_number":36,"context_line":"                                               prefix\u003dsplit[1])[1]:"},{"line_number":37,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_f3308cea","line":34,"range":{"start_line":34,"start_character":16,"end_line":34,"end_character":35},"updated":"2016-07-29 12:50:48.000000000","message":"Why use this instead of os.path.split()?","commit_id":"344592024f4a38925fe27b0eefb1de93402664a4"},{"author":{"_account_id":15041,"name":"Domhnall Walsh","email":"domhnall.eam.walsh@hpe.com","username":"domhnall"},"change_message_id":"263a530eb451e38c4ff75235aaaac646b45158f2","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        count \u003d 0"},{"line_number":76,"context_line":"        success \u003d False"},{"line_number":77,"context_line":"        split \u003d path.rsplit(\u0027/\u0027, 1)"},{"line_number":78,"context_line":"        while not success:"},{"line_number":79,"context_line":"            try:"},{"line_number":80,"context_line":"                LOG.info("}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_93f4b0f2","line":77,"range":{"start_line":77,"start_character":8,"end_line":77,"end_character":35},"updated":"2016-07-29 12:50:48.000000000","message":"See above","commit_id":"344592024f4a38925fe27b0eefb1de93402664a4"},{"author":{"_account_id":15041,"name":"Domhnall Walsh","email":"domhnall.eam.walsh@hpe.com","username":"domhnall"},"change_message_id":"263a530eb451e38c4ff75235aaaac646b45158f2","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        self.client_manager.create_swift()"},{"line_number":109,"context_line":"        headers \u003d {\u0027x-object-manifest\u0027: backup.segments_path}"},{"line_number":110,"context_line":"        LOG.info(\u0027[*] Uploading Swift Manifest: {0}\u0027.format(backup))"},{"line_number":111,"context_line":"        split \u003d backup.data_path.rsplit(\u0027/\u0027, 1)"},{"line_number":112,"context_line":"        self.swift().put_object(container\u003dsplit[0], obj\u003dsplit[1],"},{"line_number":113,"context_line":"                                contents\u003du\u0027\u0027, headers\u003dheaders)"},{"line_number":114,"context_line":"        LOG.info(\u0027Manifest successfully uploaded!\u0027)"},{"line_number":115,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_7345bc15","line":112,"range":{"start_line":111,"start_character":7,"end_line":112,"end_character":65},"updated":"2016-07-29 12:50:48.000000000","message":"container, obj \u003d os.path.split(backup.data_path) ?","commit_id":"344592024f4a38925fe27b0eefb1de93402664a4"},{"author":{"_account_id":15041,"name":"Domhnall Walsh","email":"domhnall.eam.walsh@hpe.com","username":"domhnall"},"change_message_id":"263a530eb451e38c4ff75235aaaac646b45158f2","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                separators\u003d(\u0027,\u0027, \u0027: \u0027), sort_keys\u003dTrue))"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def get_file(self, from_path, to_path):"},{"line_number":143,"context_line":"        split \u003d from_path.split(\u0027/\u0027, 1)"},{"line_number":144,"context_line":"        with open(to_path, \u0027ab\u0027) as obj_fd:"},{"line_number":145,"context_line":"            iterator \u003d self.swift().get_object("},{"line_number":146,"context_line":"                split[0], split[1],"}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_b347341c","line":143,"range":{"start_line":143,"start_character":8,"end_line":143,"end_character":38},"updated":"2016-07-29 12:50:48.000000000","message":"See above","commit_id":"344592024f4a38925fe27b0eefb1de93402664a4"}],"freezer/tests/freezer_tempest_plugin/tests/api/test_backup_compress.py":[{"author":{"_account_id":15041,"name":"Domhnall Walsh","email":"domhnall.eam.walsh@hpe.com","username":"domhnall"},"change_message_id":"263a530eb451e38c4ff75235aaaac646b45158f2","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        :return: the mimetype"},{"line_number":94,"context_line":"        \"\"\""},{"line_number":95,"context_line":"        \"\"\""},{"line_number":96,"context_line":"        Data is stored like data/tar/localhost_False/1469786264/0_1469786264 so"},{"line_number":97,"context_line":"        we need build the same directory structure"},{"line_number":98,"context_line":"        \"\"\""},{"line_number":99,"context_line":"        data_file_path \u003d \u0027data{0}{1}{0}{2}_{3}{0}{4}{0}{5}_{4}{0}data\u0027.format("}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_130560bb","line":96,"range":{"start_line":96,"start_character":8,"end_line":96,"end_character":77},"updated":"2016-07-29 12:50:48.000000000","message":"This needs to be reworded (and explained, maybe? The False looks particularly odd in there...)","commit_id":"344592024f4a38925fe27b0eefb1de93402664a4"}],"freezer/utils/streaming.py":[{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"4b2ab5c1e55c812eb90ad916f1c7ebfae6f0ec36","unresolved":false,"context_lines":[{"line_number":106,"context_line":"            super(QueuedThread, self).run()"},{"line_number":107,"context_line":"        except Exception as e:"},{"line_number":108,"context_line":"            self.rich_queue.force_stop()"},{"line_number":109,"context_line":"            print (traceback.print_exc(file\u003dsys.stdout))"},{"line_number":110,"context_line":"            raise e"}],"source_content_type":"text/x-python","patch_set":4,"id":"bab6814e_f7bcc407","line":109,"range":{"start_line":109,"start_character":19,"end_line":109,"end_character":28},"updated":"2016-05-20 19:42:58.000000000","message":"Where will this print in prod? Does it need to be logged instead?","commit_id":"a38c11d9492e23fd1235c9145b9438196a635d69"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"807159665b01fb8b0987d839b0af57d7f0e29391","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            self._exception_queue.put_nowait(e)"},{"line_number":111,"context_line":"            self.rich_queue.force_stop()"},{"line_number":112,"context_line":"            # Thread will exit at this point."},{"line_number":113,"context_line":"            print (traceback.print_exc(file\u003dsys.stdout))"},{"line_number":114,"context_line":"            raise e"}],"source_content_type":"text/x-python","patch_set":10,"id":"3aaa91ec_d1c76910","line":113,"range":{"start_line":113,"start_character":12,"end_line":113,"end_character":17},"updated":"2016-06-23 01:51:05.000000000","message":"This should be a log.exception call.","commit_id":"5ee9e377d9f78a496622de065fa80e299470575d"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"192e2bf21ae3381cf5639165b68077d14009b431","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            self._exception_queue.put_nowait(e)"},{"line_number":111,"context_line":"            self.rich_queue.force_stop()"},{"line_number":112,"context_line":"            # Thread will exit at this point."},{"line_number":113,"context_line":"            print (traceback.print_exc(file\u003dsys.stdout))"},{"line_number":114,"context_line":"            raise e"}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_c36be6ef","line":113,"updated":"2016-06-23 21:19:00.000000000","message":"This print statement is useless. Where is the output expected to go? stdout will never be looked at.","commit_id":"bf459310604ac6890867136445d4bf8a10f83ae2"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"05c5ac95847ea2cad055408f1ff35539cc555eb5","unresolved":false,"context_lines":[{"line_number":113,"context_line":"            self._exception_queue.put_nowait(e)"},{"line_number":114,"context_line":"            self.rich_queue.force_stop()"},{"line_number":115,"context_line":"            # Thread will exit at this point."},{"line_number":116,"context_line":"            LOG.error((traceback.print_exc(file\u003dsys.stdout)))"},{"line_number":117,"context_line":"            raise e"}],"source_content_type":"text/x-python","patch_set":12,"id":"3aaa91ec_010abc89","line":116,"updated":"2016-06-26 02:36:00.000000000","message":"LOG.exception(e) will log the stack trace.","commit_id":"cba8959c0bac499d274018ecf9da4f1e2dc7a95d"}],"freezer/utils/utils.py":[{"author":{"_account_id":17001,"name":"Tim Buckley","email":"timothy.jas.buckley@hpe.com","username":"timothy.jas.buckley"},"change_message_id":"20f605fbe05c35e474da7023be05919b59cebe53","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        return DateTime(datetime.datetime.now())"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"def path_join(*args):"},{"line_number":115,"context_line":"    \"\"\"Should work for windows and linux"},{"line_number":116,"context_line":"    :rtype: str"},{"line_number":117,"context_line":"    \"\"\""},{"line_number":118,"context_line":"    return \"/\".join([str(x) for x in args])"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"def get_mount_from_path(path):"}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_9400cc67","line":118,"range":{"start_line":114,"start_character":0,"end_line":118,"end_character":43},"updated":"2016-06-24 15:12:53.000000000","message":"Somewhat off-topic, but why does this exist when the standard library has os.path.join() ?","commit_id":"bf459310604ac6890867136445d4bf8a10f83ae2"},{"author":{"_account_id":15041,"name":"Domhnall Walsh","email":"domhnall.eam.walsh@hpe.com","username":"domhnall"},"change_message_id":"263a530eb451e38c4ff75235aaaac646b45158f2","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    \"\"\"Should work for windows and linux"},{"line_number":114,"context_line":"    :rtype: str"},{"line_number":115,"context_line":"    \"\"\""},{"line_number":116,"context_line":"    return \"/\".join([str(x) for x in args])"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"def get_mount_from_path(path):"}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_b3ca946c","line":116,"range":{"start_line":116,"start_character":11,"end_line":116,"end_character":43},"updated":"2016-07-29 12:50:48.000000000","message":"What\u0027s wrong with os.path.join() here?","commit_id":"344592024f4a38925fe27b0eefb1de93402664a4"}],"tests/unit/storages/test_local.py":[{"author":{"_account_id":15041,"name":"Domhnall Walsh","email":"domhnall.eam.walsh@hpe.com","username":"domhnall"},"change_message_id":"263a530eb451e38c4ff75235aaaac646b45158f2","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        backup_dir, files_dir, work_dir \u003d self.create_dirs()"},{"line_number":66,"context_line":"        storage \u003d local.LocalStorage(backup_dir,"},{"line_number":67,"context_line":"                                     work_dir,"},{"line_number":68,"context_line":"                                     10000)"},{"line_number":69,"context_line":"        storage.prepare()"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def test_info(self):"}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_f39b6c70","line":68,"range":{"start_line":68,"start_character":37,"end_line":68,"end_character":42},"updated":"2016-07-29 12:50:48.000000000","message":"This hard-coded number looks a little magical, could we at least add a comment to explain what it is and why it\u0027s set to this value?","commit_id":"344592024f4a38925fe27b0eefb1de93402664a4"},{"author":{"_account_id":15041,"name":"Domhnall Walsh","email":"domhnall.eam.walsh@hpe.com","username":"domhnall"},"change_message_id":"263a530eb451e38c4ff75235aaaac646b45158f2","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def test_info(self):"},{"line_number":72,"context_line":"        backup_dir, files_dir, work_dir \u003d self.create_dirs()"},{"line_number":73,"context_line":"        storage \u003d local.LocalStorage(backup_dir, work_dir, 10000)"},{"line_number":74,"context_line":"        storage.info()"}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_53899825","line":73,"range":{"start_line":73,"start_character":58,"end_line":73,"end_character":64},"updated":"2016-07-29 12:50:48.000000000","message":"See above","commit_id":"344592024f4a38925fe27b0eefb1de93402664a4"}]}
