Patchwork D11942: rhg: Accept different "invalid ignore pattern" error message formatting

login
register
mail settings
Submitter phabricator
Date Dec. 17, 2021, 4:57 p.m.
Message ID <differential-rev-PHID-DREV-kclupwjiuyprczsmppz2-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50268/
State New
Headers show

Comments

phabricator - Dec. 17, 2021, 4:57 p.m.
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

Patch

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