changeset 48512:262a38f10427

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
author Simon Sapin <simon.sapin@octobus.net>
date Fri, 17 Dec 2021 17:56:13 +0100
parents c9abfb80b4e3
children 47f2a82ae3e4
files tests/test-hgignore.t
diffstat 1 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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