mercurial/context.py
changeset 12345 e0ee3e822a9a
parent 12270 166b9866580a
parent 12344 b6173aee4a47
child 12361 2754c8273132
--- a/mercurial/context.py	Mon Sep 20 15:46:17 2010 +0200
+++ b/mercurial/context.py	Mon Sep 20 22:29:13 2010 +0200
@@ -825,7 +825,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)
@@ -853,7 +853,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 "