comparison mercurial/localrepo.py @ 4392:9770d260a405

Make rm --after simply mark files as removed, unless --force is also given
author Brendan Cully <brendan@kublai.com>
date Mon, 30 Apr 2007 08:51:59 -0700
parents 109077e7048d
children 0912d8df5e19
comparison
equal deleted inserted replaced
4391:722417b3d7fa 4392:9770d260a405
1029 if inst.errno != errno.ENOENT: 1029 if inst.errno != errno.ENOENT:
1030 raise 1030 raise
1031 if not wlock: 1031 if not wlock:
1032 wlock = self.wlock() 1032 wlock = self.wlock()
1033 for f in list: 1033 for f in list:
1034 p = self.wjoin(f) 1034 if unlink and os.path.exists(self.wjoin(f)):
1035 if os.path.exists(p):
1036 self.ui.warn(_("%s still exists!\n") % f) 1035 self.ui.warn(_("%s still exists!\n") % f)
1037 elif self.dirstate.state(f) == 'a': 1036 elif self.dirstate.state(f) == 'a':
1038 self.dirstate.forget([f]) 1037 self.dirstate.forget([f])
1039 elif f not in self.dirstate: 1038 elif f not in self.dirstate:
1040 self.ui.warn(_("%s not tracked!\n") % f) 1039 self.ui.warn(_("%s not tracked!\n") % f)