mercurial/context.py
branchstable
changeset 12344 b6173aee4a47
parent 12067 a4fbbe0fbc38
child 12345 e0ee3e822a9a
child 12360 4ae3e5dffa60
--- a/mercurial/context.py	Mon Sep 20 21:46:39 2010 +0200
+++ b/mercurial/context.py	Mon Sep 20 21:46:56 2010 +0200
@@ -824,7 +824,7 @@
         wlock = self._repo.wlock()
         try:
             for f in list:
-                if unlink and os.path.exists(self._repo.wjoin(f)):
+                if unlink and os.path.lexists(self._repo.wjoin(f)):
                     self._repo.ui.warn(_("%s still exists!\n") % f)
                 elif self._repo.dirstate[f] == 'a':
                     self._repo.dirstate.forget(f)
@@ -852,7 +852,7 @@
 
     def copy(self, source, dest):
         p = self._repo.wjoin(dest)
-        if not (os.path.exists(p) or os.path.islink(p)):
+        if not os.path.lexists(p):
             self._repo.ui.warn(_("%s does not exist!\n") % dest)
         elif not (os.path.isfile(p) or os.path.islink(p)):
             self._repo.ui.warn(_("copy failed: %s is not a file or a "