diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -4880,8 +4880,7 @@ def remove(ui, repo, *pats, **opts): elif after: list = deleted for f in modified + added + clean: - ui.warn(_('not removing %s: file still exists (use -f' - ' to force removal)\n') % m.rel(f)) + ui.warn(_('not removing %s: file still exists\n') % m.rel(f)) ret = 1 else: list = deleted + clean diff --git a/tests/test-remove.t b/tests/test-remove.t --- a/tests/test-remove.t +++ b/tests/test-remove.t @@ -107,7 +107,7 @@ 20 state added, options -A $ echo b > bar $ hg add bar $ remove -A bar - not removing bar: file still exists (use -f to force removal) + not removing bar: file still exists exit code: 1 A bar ./bar @@ -117,7 +117,7 @@ 20 state added, options -A 21 state clean, options -A $ remove -A foo - not removing foo: file still exists (use -f to force removal) + not removing foo: file still exists exit code: 1 ? bar ./bar @@ -128,7 +128,7 @@ 22 state modified, options -A $ echo b >> foo $ remove -A foo - not removing foo: file still exists (use -f to force removal) + not removing foo: file still exists exit code: 1 M foo ? bar @@ -220,7 +220,7 @@ dir, options -A $ rm test/bar $ remove -A test - not removing test/foo: file still exists (use -f to force removal) (glob) + not removing test/foo: file still exists (glob) removing test/bar (glob) exit code: 1 R test/bar