rhg: Accept different "invalid ignore pattern" error message formatting
authorSimon Sapin <simon.sapin@octobus.net>
Fri, 17 Dec 2021 17:56:13 +0100
changeset 48512 262a38f10427
parent 48511 c9abfb80b4e3
child 48513 47f2a82ae3e4
rhg: Accept different "invalid ignore pattern" error message formatting At the moment rhg compiles all patterns into a single big regular expression, so it’s not practical to find out which file the invalid bit of syntax came from. Differential Revision: https://phab.mercurial-scm.org/D11942
tests/test-hgignore.t
--- a/tests/test-hgignore.t	Fri Dec 17 16:54:22 2021 +0100
+++ b/tests/test-hgignore.t	Fri Dec 17 17:56:13 2021 +0100
@@ -9,10 +9,6 @@
   > EOF
 #endif
 
-TODO: fix rhg bugs that make this test fail when status is enabled
-  $ unset RHG_STATUS
-
-
   $ hg init ignorerepo
   $ cd ignorerepo
 
@@ -63,9 +59,19 @@
   ? syntax
 
   $ echo "*.o" > .hgignore
+#if no-rhg
   $ hg status
   abort: $TESTTMP/ignorerepo/.hgignore: invalid pattern (relre): *.o (glob)
   [255]
+#endif
+#if rhg
+  $ hg status
+  Unsupported syntax regex parse error:
+      ^(?:*.o)
+          ^
+  error: repetition operator missing expression
+  [255]
+#endif
 
 Ensure given files are relative to cwd