diff --git a/checkout.py b/checkout.py index 217a5a5a4..03e28f68c 100644 --- a/checkout.py +++ b/checkout.py @@ -343,7 +343,13 @@ class SvnCheckout(CheckoutBase, SvnMixIn): self._check_output_svn( ['copy', p.source_filename, p.filename]) if p.diff_hunks: - cmd = ['patch', '-p%s' % p.patchlevel, '--forward', '--force'] + cmd = [ + 'patch', + '-p%s' % p.patchlevel, + '--forward', + '--force', + '--no-backup-if-mismatch', + ] stdout += subprocess2.check_output( cmd, stdin=p.get(False), cwd=self.project_path) elif p.is_new and not os.path.exists(filepath): diff --git a/tests/checkout_test.py b/tests/checkout_test.py index 31e1f4f1f..1c4d7fdd5 100755 --- a/tests/checkout_test.py +++ b/tests/checkout_test.py @@ -307,7 +307,7 @@ class SvnCheckout(SvnBaseTest): def testException(self): self._check_exception( self._get_co(None), - 'While running patch -p1 --forward --force;\n' + 'While running patch -p1 --forward --force --no-backup-if-mismatch;\n' 'patching file chrome/file.cc\n' 'Hunk #1 FAILED at 3.\n' '1 out of 1 hunk FAILED -- saving rejects to file ' @@ -513,7 +513,7 @@ class ReadOnlyCheckout(SvnBaseTest): def testException(self): self._check_exception( self._get_co(None), - 'While running patch -p1 --forward --force;\n' + 'While running patch -p1 --forward --force --no-backup-if-mismatch;\n' 'patching file chrome/file.cc\n' 'Hunk #1 FAILED at 3.\n' '1 out of 1 hunk FAILED -- saving rejects to file '