diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -341,7 +341,7 @@ class casecollisionauditor(object): if fl in self._loweredfiles and f not in self._dirstate: msg = _(b'possible case-folding collision for %s') % f if self._abort: - raise error.Abort(msg) + raise error.StateError(msg) self._ui.warn(_(b"warning: %s\n") % msg) self._loweredfiles.add(fl) self._newfiles.add(f) diff --git a/tests/test-casecollision.t b/tests/test-casecollision.t --- a/tests/test-casecollision.t +++ b/tests/test-casecollision.t @@ -12,7 +12,7 @@ test file addition with colliding case ? A $ hg add --config ui.portablefilenames=abort A abort: possible case-folding collision for A - [255] + [20] $ hg st A a ? A