diff --git a/src/python/replay_merge.py b/src/python/replay_merge.py index 453fb642b3..96357f0158 100755 --- a/src/python/replay_merge.py +++ b/src/python/replay_merge.py @@ -162,13 +162,23 @@ def merge_replay( merge_fingerprint, ] assert repo.local_repo_path.exists() - if merge_result not in ( - MERGE_STATE.Merge_failed, - MERGE_STATE.Git_checkout_failed, - TEST_STATE.Git_checkout_failed, - ) and ( - merge_data[f"{merge_tool.name}_merge_fingerprint"] != merge_fingerprint - and not dont_check_fingerprints + + if ( # pylint: disable=too-many-boolean-expressions + merge_result + not in ( + MERGE_STATE.Git_checkout_failed, + TEST_STATE.Git_checkout_failed, + ) + and ( + merge_data[f"{merge_tool.name}_merge_fingerprint"] + != merge_fingerprint + and not dont_check_fingerprints + ) + and (merge_tool != MERGE_TOOL.spork) + and ( + merge_tool != MERGE_TOOL.gitmerge_resolve + or merge_result != MERGE_STATE.Merge_failed + ) ): assert repo.local_repo_path.exists() if create_artifacts: diff --git a/src/python/repo.py b/src/python/repo.py index 9dc6da917c..3424647f23 100755 --- a/src/python/repo.py +++ b/src/python/repo.py @@ -242,20 +242,7 @@ def copy_repo(self) -> None: ignore_dangling_symlinks=True, ) os.system("chmod -R 777 " + str(self.local_repo_path)) - # Check if chmod worked - # Retrieve the mode (permissions) of the file/directory - mode = os.stat(str(self.local_repo_path)).st_mode - # Mask out the permission bits with 0o777 (octal for 777) - if mode & 0o777 == 0o777: - logger.error( - f"The permissions for {str(self.local_repo_path)} are set to 777." - ) - else: - logger.error( - f"The permissions for {str(self.local_repo_path)} are not set to 777." - + f" Current permissions: {oct(mode & 0o777)}" - ) self.repo = Repo(self.local_repo_path) def checkout(self, commit: str, use_cache: bool = True) -> Tuple[bool, str]: