Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 1247:7a70dafbf4b9
Make remove command really unlink files.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Wed, 14 Sep 2005 10:50:03 -0700 |
parents | 3b4f05ff3130 |
children | a5355fa5e33a |
comparison
equal
deleted
inserted
replaced
1241:3b4f05ff3130 | 1247:7a70dafbf4b9 |
---|---|
1311 return True | 1311 return True |
1312 for src, abs, rel, exact in walk(repo, (pat,) + pats, opts): | 1312 for src, abs, rel, exact in walk(repo, (pat,) + pats, opts): |
1313 if okaytoremove(abs, rel, exact): | 1313 if okaytoremove(abs, rel, exact): |
1314 if not exact: ui.status('removing %s\n' % rel) | 1314 if not exact: ui.status('removing %s\n' % rel) |
1315 names.append(abs) | 1315 names.append(abs) |
1316 for name in names: | |
1317 try: | |
1318 os.unlink(name) | |
1319 except OSError, inst: | |
1320 if inst.errno != errno.ENOENT: raise | |
1316 repo.remove(names) | 1321 repo.remove(names) |
1317 | 1322 |
1318 def revert(ui, repo, *names, **opts): | 1323 def revert(ui, repo, *names, **opts): |
1319 """revert modified files or dirs back to their unmodified states""" | 1324 """revert modified files or dirs back to their unmodified states""" |
1320 node = opts['rev'] and repo.lookup(opts['rev']) or \ | 1325 node = opts['rev'] and repo.lookup(opts['rev']) or \ |