# HG changeset patch # User Simon Sapin # Date 1639760173 -3600 # Node ID 262a38f1042768ab933c5522af59daad5fa65440 # Parent c9abfb80b4e3f1d44aadfc8b0ecf5d0428c07781 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 diff -r c9abfb80b4e3 -r 262a38f10427 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