mercurial/localrepo.py
changeset 4392 9770d260a405
parent 4373 109077e7048d
child 4417 0912d8df5e19
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1031,8 +1031,7 @@ class localrepository(repo.repository):
         if not wlock:
             wlock = self.wlock()
         for f in list:
-            p = self.wjoin(f)
-            if os.path.exists(p):
+            if unlink and os.path.exists(self.wjoin(f)):
                 self.ui.warn(_("%s still exists!\n") % f)
             elif self.dirstate.state(f) == 'a':
                 self.dirstate.forget([f])