[Updated] D11828: errors: use detailed exit code for detected case-collision

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Tue Nov 30 15:15:17 UTC 2021


Closed by commit rHG0b8e076e878c: errors: use detailed exit code for detected case-collision (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D11828?vs=31200&id=31215

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D11828/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D11828

AFFECTED FILES
  mercurial/scmutil.py
  tests/test-casecollision.t

CHANGE DETAILS

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 @@
   ? A
   $ hg add --config ui.portablefilenames=abort A
   abort: possible case-folding collision for A
-  [255]
+  [20]
   $ hg st
   A a
   ? A
diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -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)



To: martinvonz, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20211130/5b6ed7e0/attachment-0002.html>


More information about the Mercurial-patches mailing list