##// 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 impl From<StatusError> for CommandError {
222 impl From<StatusError> for CommandError {
223 fn from(error: StatusError) -> Self {
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 ? syntax
59 ? syntax
60
60
61 $ echo "*.o" > .hgignore
61 $ echo "*.o" > .hgignore
62 #if no-rhg
63 $ hg status
62 $ hg status
64 abort: $TESTTMP/ignorerepo/.hgignore: invalid pattern (relre): *.o (glob)
63 abort: $TESTTMP/ignorerepo/.hgignore: invalid pattern (relre): *.o (glob)
65 [255]
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 $ echo 're:^(?!a).*\.o$' > .hgignore
66 $ echo 're:^(?!a).*\.o$' > .hgignore
77 #if no-rhg
78 $ hg status
67 $ hg status
79 A dir/b.o
68 A dir/b.o
80 ? .hgignore
69 ? .hgignore
81 ? a.c
70 ? a.c
82 ? a.o
71 ? a.o
83 ? syntax
72 ? syntax
84 #endif
85 #if rhg
73 #if rhg
86 $ hg status
74 $ hg status --config rhg.on-unsupported=abort
87 Unsupported syntax regex parse error:
75 unsupported feature: Unsupported syntax regex parse error:
88 ^(?:^(?!a).*\.o$)
76 ^(?:^(?!a).*\.o$)
89 ^^^
77 ^^^
90 error: look-around, including look-ahead and look-behind, is not supported
78 error: look-around, including look-ahead and look-behind, is not supported
91 [255]
79 [252]
92 #endif
80 #endif
93
81
94 Ensure given files are relative to cwd
82 Ensure given files are relative to cwd
General Comments 0
You need to be logged in to leave comments. Login now