From patchwork Fri Dec 17 16:57:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: D11942: rhg: Accept different "invalid ignore pattern" error message formatting From: phabricator X-Patchwork-Id: 50268 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Fri, 17 Dec 2021 16:57:57 +0000 SimonSapin created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY 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. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11942 AFFECTED FILES tests/test-hgignore.t CHANGE DETAILS To: SimonSapin, #hg-reviewers Cc: mercurial-patches, mercurial-devel diff --git a/tests/test-hgignore.t b/tests/test-hgignore.t --- a/tests/test-hgignore.t +++ b/tests/test-hgignore.t @@ -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