equal
deleted
inserted
replaced
2187 $ hg log -r 'foo\\' |
2187 $ hg log -r 'foo\\' |
2188 hg: parse error at 3: syntax error in revset 'foo\\' |
2188 hg: parse error at 3: syntax error in revset 'foo\\' |
2189 [255] |
2189 [255] |
2190 |
2190 |
2191 $ cd .. |
2191 $ cd .. |
|
2192 |
|
2193 Test registrar.delayregistrar via revset.extpredicate |
|
2194 |
|
2195 'extpredicate' decorator shouldn't register any functions until |
|
2196 'setup()' on it. |
|
2197 |
|
2198 $ cd repo |
|
2199 |
|
2200 $ cat <<EOF > $TESTTMP/custompredicate.py |
|
2201 > from mercurial import revset |
|
2202 > |
|
2203 > revsetpredicate = revset.extpredicate() |
|
2204 > |
|
2205 > @revsetpredicate('custom1()') |
|
2206 > def custom1(repo, subset, x): |
|
2207 > return revset.baseset([1]) |
|
2208 > @revsetpredicate('custom2()') |
|
2209 > def custom2(repo, subset, x): |
|
2210 > return revset.baseset([2]) |
|
2211 > |
|
2212 > def uisetup(ui): |
|
2213 > if ui.configbool('custompredicate', 'enabled'): |
|
2214 > revsetpredicate.setup() |
|
2215 > EOF |
|
2216 $ cat <<EOF > .hg/hgrc |
|
2217 > [extensions] |
|
2218 > custompredicate = $TESTTMP/custompredicate.py |
|
2219 > EOF |
|
2220 |
|
2221 $ hg debugrevspec "custom1()" |
|
2222 hg: parse error: unknown identifier: custom1 |
|
2223 [255] |
|
2224 $ hg debugrevspec "custom2()" |
|
2225 hg: parse error: unknown identifier: custom2 |
|
2226 [255] |
|
2227 $ hg debugrevspec "custom1() or custom2()" --config custompredicate.enabled=true |
|
2228 1 |
|
2229 2 |
|
2230 |
|
2231 $ cd .. |