Restore lexists() changes lost in e0ee3e822a9a merge
authorPatrick Mezard <pmezard@gmail.com>
Mon, 20 Sep 2010 22:41:10 +0200
changeset 12357 cb59654c2c7a
parent 12345 e0ee3e822a9a
child 12358 d0a97814b7d7
Restore lexists() changes lost in e0ee3e822a9a merge
mercurial/cmdutil.py
--- a/mercurial/cmdutil.py	Mon Sep 20 22:29:13 2010 +0200
+++ b/mercurial/cmdutil.py	Mon Sep 20 22:41:10 2010 +0200
@@ -363,7 +363,7 @@
             islink, isexec = gp.mode
             dst = repo.wjoin(gp.path)
             # patch won't create empty files
-            if gp.op == 'ADD' and not os.path.exists(dst):
+            if gp.op == 'ADD' and not os.path.lexists(dst):
                 flags = (isexec and 'x' or '') + (islink and 'l' or '')
                 repo.wwrite(gp.path, '', flags)
             util.set_flags(dst, islink, isexec)
@@ -521,7 +521,7 @@
                     score = 0
                     for s in srcs:
                         t = os.path.join(dest, util.localpath(s[0])[striplen:])
-                        if os.path.exists(t):
+                        if os.path.lexists(t):
                             score += 1
                     return score