mercurial/patch.py
changeset 12345 e0ee3e822a9a
parent 12266 00658492e2aa
parent 12344 b6173aee4a47
child 12577 05210e955bef
--- a/mercurial/patch.py	Mon Sep 20 15:46:17 2010 +0200
+++ b/mercurial/patch.py	Mon Sep 20 22:29:13 2010 +0200
@@ -25,7 +25,7 @@
 
 def copyfile(src, dst, basedir):
     abssrc, absdst = [util.canonpath(basedir, basedir, x) for x in [src, dst]]
-    if os.path.exists(absdst):
+    if os.path.lexists(absdst):
         raise util.Abort(_("cannot create %s: destination already exists") %
                          dst)
 
@@ -923,7 +923,7 @@
     if afile == bfile:
         goodb = gooda
     else:
-        goodb = not nullb and os.path.exists(bfile)
+        goodb = not nullb and os.path.lexists(bfile)
     createfunc = hunk.createfile
     missing = not goodb and not gooda and not createfunc()