equal
deleted
inserted
replaced
445 con.xml |
445 con.xml |
446 dos |
446 dos |
447 mac |
447 mac |
448 mixed |
448 mixed |
449 unknown |
449 unknown |
450 |
|
451 Test detection of unintentional 'matchctx.existing()' invocation |
|
452 |
|
453 $ cat > $TESTTMP/existingcaller.py <<EOF |
|
454 > from mercurial import registrar |
|
455 > |
|
456 > filesetpredicate = registrar.filesetpredicate() |
|
457 > @filesetpredicate(b'existingcaller()', callexisting=False) |
|
458 > def existingcaller(mctx, x): |
|
459 > # this 'mctx.existing()' invocation is unintentional |
|
460 > existing = set(mctx.existing()) |
|
461 > return mctx.predicate(existing.__contains__, cache=False) |
|
462 > EOF |
|
463 |
|
464 $ cat >> .hg/hgrc <<EOF |
|
465 > [extensions] |
|
466 > existingcaller = $TESTTMP/existingcaller.py |
|
467 > EOF |
|
468 |
|
469 $ fileset 'existingcaller()' 2>&1 | tail -1 |
|
470 *ProgrammingError: *unexpected existing() invocation* (glob) |
|
471 |
450 |
472 Test 'revs(...)' |
451 Test 'revs(...)' |
473 ================ |
452 ================ |
474 |
453 |
475 small reminder of the repository state |
454 small reminder of the repository state |