Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions easybuild/tools/filetools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1540,18 +1540,14 @@ def validate_patch_spec(patch_spec):
_log.deprecated(msg, '5.0')


def apply_patch(patch_file, dest, fn=None, copy=False, level=None, use_git_am=False, use_git=False):
def apply_patch(patch_file, dest, fn=None, copy=False, level=None, use_git=False):
"""
Apply a patch to source code in directory dest
- assume unified diff created with "diff -ru old new"

Raises EasyBuildError on any error and returns True on success
"""

if use_git_am:
_log.deprecated("'use_git_am' named argument in apply_patch function has been renamed to 'use_git'", '5.0')
use_git = True

if build_option('extended_dry_run'):
# skip checking of files in dry run mode
patch_filename = os.path.basename(patch_file)
Expand Down
9 changes: 0 additions & 9 deletions test/framework/filetools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1765,15 +1765,6 @@ def test_apply_patch(self):

self.assertNotIn("I'm a toy, and very proud of it", ft.read_file(toy_source_path))

# mock stderr to catch deprecation warning caused by setting 'use_git_am'
self.allow_deprecated_behaviour()
self.mock_stderr(True)
ft.apply_patch(toy_patch, self.test_prefix, use_git_am=True)
stderr = self.get_stderr()
self.mock_stderr(False)
self.assertIn("I'm a toy, and very proud of it", ft.read_file(toy_source_path))
self.assertIn("'use_git_am' named argument in apply_patch function has been renamed to 'use_git'", stderr)

def test_copy_file(self):
"""Test copy_file function."""
testdir = os.path.dirname(os.path.abspath(__file__))
Expand Down