comparison mercurial/commands.py @ 14434:cc8c09855d19

dirstate: rename forget to drop It has substantially different semantics from forget at the command layer, so change it to avoid confusion. We can't simply combine it with remove because we need to explicitly drop non-added files in some cases like commit.
author Matt Mackall <mpm@selenic.com>
date Thu, 26 May 2011 17:15:35 -0500
parents 90937dd4d94b
children 5f6090e559fa
comparison
equal deleted inserted replaced
14433:7658221da551 14434:cc8c09855d19
4262 repo.wwrite(f, fc.data(), fc.flags()) 4262 repo.wwrite(f, fc.data(), fc.flags())
4263 4263
4264 audit_path = scmutil.pathauditor(repo.root) 4264 audit_path = scmutil.pathauditor(repo.root)
4265 for f in remove[0]: 4265 for f in remove[0]:
4266 if repo.dirstate[f] == 'a': 4266 if repo.dirstate[f] == 'a':
4267 repo.dirstate.forget(f) 4267 repo.dirstate.drop(f)
4268 continue 4268 continue
4269 audit_path(f) 4269 audit_path(f)
4270 try: 4270 try:
4271 util.unlinkpath(repo.wjoin(f)) 4271 util.unlinkpath(repo.wjoin(f))
4272 except OSError: 4272 except OSError: