##// END OF EJS Templates
rhg: fallback to slow path on invalid patterns in hgignore
Arseniy Alekseyev -
r50434:8076298b stable
parent child Browse files
Show More
@@ -221,7 +221,12 b' impl From<(RevlogError, &str)> for Comma'
221 221
222 222 impl From<StatusError> for CommandError {
223 223 fn from(error: StatusError) -> Self {
224 CommandError::abort(format!("{}", error))
224 match error {
225 StatusError::Pattern(_) => {
226 CommandError::unsupported(format!("{}", error))
227 }
228 _ => CommandError::abort(format!("{}", error)),
229 }
225 230 }
226 231 }
227 232
@@ -59,36 +59,24 b' Should display baz only:'
59 59 ? syntax
60 60
61 61 $ echo "*.o" > .hgignore
62 #if no-rhg
63 62 $ hg status
64 63 abort: $TESTTMP/ignorerepo/.hgignore: invalid pattern (relre): *.o (glob)
65 64 [255]
66 #endif
67 #if rhg
68 $ hg status
69 Unsupported syntax regex parse error:
70 ^(?:*.o)
71 ^
72 error: repetition operator missing expression
73 [255]
74 #endif
75 65
76 66 $ echo 're:^(?!a).*\.o$' > .hgignore
77 #if no-rhg
78 67 $ hg status
79 68 A dir/b.o
80 69 ? .hgignore
81 70 ? a.c
82 71 ? a.o
83 72 ? syntax
84 #endif
85 73 #if rhg
86 $ hg status
87 Unsupported syntax regex parse error:
74 $ hg status --config rhg.on-unsupported=abort
75 unsupported feature: Unsupported syntax regex parse error:
88 76 ^(?:^(?!a).*\.o$)
89 77 ^^^
90 78 error: look-around, including look-ahead and look-behind, is not supported
91 [255]
79 [252]
92 80 #endif
93 81
94 82 Ensure given files are relative to cwd
General Comments 0
You need to be logged in to leave comments. Login now