mercurial/patch.py
changeset 14369 f8932d540088
parent 14368 baf2807b9a7d
child 14370 17cea10c343e
--- a/mercurial/patch.py	Wed May 18 23:48:13 2011 +0200
+++ b/mercurial/patch.py	Wed May 18 23:48:13 2011 +0200
@@ -923,7 +923,7 @@
         self.hunk = ['GIT binary patch\n']
 
     def createfile(self):
-        return self.gitpatch.op in ('ADD', 'RENAME', 'COPY')
+        return self.gitpatch.op == 'ADD'
 
     def rmfile(self):
         return self.gitpatch.op == 'DELETE'
@@ -1209,9 +1209,7 @@
                 gp.path = pathstrip(gp.path, strip - 1)[1]
                 if gp.oldpath:
                     gp.oldpath = pathstrip(gp.oldpath, strip - 1)[1]
-                # Binary patches really overwrite target files, copying them
-                # will just make it fails with "target file exists"
-                if gp.op in ('COPY', 'RENAME') and not gp.binary:
+                if gp.op in ('COPY', 'RENAME'):
                     backend.copy(gp.oldpath, gp.path)
                 changed[gp.path] = gp
         else: