errors: use detailed exit code for detected case-collision
Differential Revision: https://phab.mercurial-scm.org/D11828
--- a/mercurial/scmutil.py Fri Nov 19 15:39:35 2021 -0800
+++ b/mercurial/scmutil.py Fri Nov 19 15:40:56 2021 -0800
@@ -341,7 +341,7 @@
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)
--- a/tests/test-casecollision.t Fri Nov 19 15:39:35 2021 -0800
+++ b/tests/test-casecollision.t Fri Nov 19 15:40:56 2021 -0800
@@ -12,7 +12,7 @@
? A
$ hg add --config ui.portablefilenames=abort A
abort: possible case-folding collision for A
- [255]
+ [20]
$ hg st
A a
? A