comparison mercurial/util.py @ 4180:51ee2868a571

util._matcher: update comments This should match the code better. Except for bugs...
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sat, 10 Mar 2007 23:00:45 -0300
parents 6f9474044736
children 01c4ea5e788c
comparison
equal deleted inserted replaced
4179:da0588996ecc 4180:51ee2868a571
395 cwd - the current working directory, if relevant 395 cwd - the current working directory, if relevant
396 names - patterns to find 396 names - patterns to find
397 inc - patterns to include 397 inc - patterns to include
398 exc - patterns to exclude 398 exc - patterns to exclude
399 head - a regex to prepend to patterns to control whether a match is rooted 399 head - a regex to prepend to patterns to control whether a match is rooted
400 dflt_pat - if a pattern in names has no explicit type, assume this one
401 src - where these patterns came from (e.g. .hgignore)
400 402
401 a pattern is one of: 403 a pattern is one of:
402 'glob:<rooted glob>' 404 'glob:<glob>' - a glob relative to cwd
403 're:<rooted regexp>' 405 're:<regexp>' - a regular expression
404 'path:<rooted path>' 406 'path:<path>' - a path relative to canonroot
405 'relglob:<relative glob>' 407 'relglob:<glob>' - an unrooted glob (*.c matches C files in all dirs)
406 'relpath:<relative path>' 408 'relpath:<path>' - a path relative to cwd
407 'relre:<relative regexp>' 409 'relre:<regexp>' - a regexp that doesn't have to match the start of a name
408 '<rooted path or regexp>' 410 '<something>' - one of the cases above, selected by the dflt_pat argument
409 411
410 returns: 412 returns:
411 a 3-tuple containing 413 a 3-tuple containing
412 - list of explicit non-pattern names passed in 414 - list of roots (places where one should start a recursive walk of the fs);
415 this often matches the explicit non-pattern names passed in, but also
416 includes the initial part of glob: patterns that has no glob characters
413 - a bool match(filename) function 417 - a bool match(filename) function
414 - a bool indicating if any patterns were passed in 418 - a bool indicating if any patterns were passed in
415 419
416 todo: 420 todo:
417 make head regex a rooted bool 421 make head regex a rooted bool