errors: use detailed exit code for detected case-collision
authorMartin von Zweigbergk <martinvonz@google.com>
Fri, 19 Nov 2021 15:40:56 -0800
changeset 48367 0b8e076e878c
parent 48366 8e855e9984a6
child 48368 8c4881c07f57
errors: use detailed exit code for detected case-collision Differential Revision: https://phab.mercurial-scm.org/D11828
mercurial/scmutil.py
tests/test-casecollision.t
--- 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