##// END OF EJS Templates
fileset: detect unintentional existing() invocation at runtime...
fileset: detect unintentional existing() invocation at runtime A fileset predicate can invoke 'matchctx.existing()' successfully, even if it isn't marked as "existing caller". It is aborted only in some corner cases: e.g. there were one deleted file in the working directory (see 8a0513bf030a for detail). This patch makes 'matchctx.existing()' invocation abort if not '_existingenabled', which is true only while "existing caller" running. After this changes, non-"existing caller" predicate function is aborted immediately, whenever it invokes 'matchctx.existing()'. This prevent developer from forgetting to mark a predicate as "existing caller". BTW, unintentional 'matchctx.status()' invocation can be detected easily without any additional trick like this patch, because it returns 'None' if a predicate isn't marked as "status caller", and referring field (e.g. '.modified') of it is always aborted.
FUJIWARA Katsunori -
r27464:c39ecb2b default
Show More
Name Size Modified Last Commit Author
/ mercurial / help
internals
common.txt Loading ...
config.txt Loading ...
dates.txt Loading ...
diffs.txt Loading ...
environment.txt Loading ...
extensions.txt Loading ...
filesets.txt Loading ...
glossary.txt Loading ...
hg.1.txt Loading ...
hgignore.5.txt Loading ...
hgignore.txt Loading ...
hgrc.5.txt Loading ...
hgweb.txt Loading ...
merge-tools.txt Loading ...
multirevs.txt Loading ...
patterns.txt Loading ...
phases.txt Loading ...
revisions.txt Loading ...
revsets.txt Loading ...
scripting.txt Loading ...
subrepos.txt Loading ...
templates.txt Loading ...
urls.txt Loading ...