# HG changeset patch # User Vadim Gelfer # Date 1141872520 28800 # Node ID 6a3d5a56f19c1d88f199050fd7c755466453e698 # Parent 91ebf29c15958c44c0e81cac3cb33bb568a79c37# Parent 89a6ce5ae510458f5c71527c32808902c66b007d merge with self. diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1920,7 +1920,7 @@ def remove(ui, repo, pat, *pats, **opts) def okaytoremove(abs, rel, exact): modified, added, removed, deleted, unknown = repo.changes(files=[abs]) reason = None - if modified: + if modified and not opts['force']: reason = _('is modified') elif added: reason = _('has been marked for add') @@ -2564,7 +2564,8 @@ table = { "^remove|rm": (remove, [('I', 'include', [], _('include names matching the given patterns')), - ('X', 'exclude', [], _('exclude names matching the given patterns'))], + ('X', 'exclude', [], _('exclude names matching the given patterns')), + ('f', 'force', None, _('remove file even if modified'))], _('hg remove [OPTION]... FILE...')), "rename|mv": (rename,