webkit
2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
|
Classes | |
class | AntPatternToRETest |
Functions | |
def | ant_pattern_to_re (ant_pattern) |
def | glob (dir_path, includes=' **/*', excludes=default_excludes, entry_type=FILE, prune_dirs=prune_dirs, max_depth=25) |
def | test_matching (self) |
def test_conversion( self ): self.assertEqual( '^somepath$', ant_pattern_to_re( 'somepath' ).pattern ) More... | |
Variables | |
string | prune_dirs = '.git .bzr .hg .svn _MTN _darcs CVS SCCS ' |
string | default_excludes |
exclude_pats = prune_pats + '*~ #*# . More... | |
int | DIR = 1 |
int | FILE = 2 |
int | DIR_LINK = 4 |
int | FILE_LINK = 8 |
int | LINKS = DIR_LINK | FILE_LINK |
int | ALL_NO_LINK = DIR | FILE |
int | ALL = DIR | FILE | LINKS |
next_pos = match.end() | |
print 'Converting', ant_pattern More... | |
is_dir = os.path.isdir( full_path ) | |
print 'Testing:', full_path, More... | |
included = apply_filter( full_path, include_filter ) | |
print '===> marked for recursion', More... | |
rejected = apply_filter( full_path, exclude_filter ) | |
link = os.path.islink( full_path ) | |
print '=> not included or rejected' More... | |
is_file = os.path.isfile( full_path ) | |
int | entry_type = is_file and FILE_LINK or DIR_LINK |
print '=> unknown entry type' More... | |
def devtools.antglob.ant_pattern_to_re | ( | ant_pattern | ) |
Generates a regular expression from the ant pattern. Matching convention: **/a: match 'a', 'dir/a', 'dir1/dir2/a' a/**/b: match 'a/b', 'a/c/b', 'a/d/c/b' *.py: match 'script.py' but not 'a/script.py'
def devtools.antglob.glob | ( | dir_path, | |
includes = '**/*' , |
|||
excludes = default_excludes , |
|||
entry_type = FILE , |
|||
prune_dirs = prune_dirs , |
|||
max_depth = 25 |
|||
) |
def devtools.antglob.test_matching | ( | self | ) |
def test_conversion( self ): self.assertEqual( '^somepath$', ant_pattern_to_re( 'somepath' ).pattern )
string devtools.antglob.default_excludes |
exclude_pats = prune_pats + '*~ #*# .
#* %*% ._* .gitignore .cvsignore vssver.scc .DS_Store'.split()
int devtools.antglob.DIR = 1 |
int devtools.antglob.DIR_LINK = 4 |
int devtools.antglob.FILE = 2 |
int devtools.antglob.FILE_LINK = 8 |
devtools.antglob.included = apply_filter( full_path, include_filter ) |
print '===> marked for recursion',
devtools.antglob.is_dir = os.path.isdir( full_path ) |
print 'Testing:', full_path,
devtools.antglob.is_file = os.path.isfile( full_path ) |
devtools.antglob.link = os.path.islink( full_path ) |
print '=> not included or rejected'
devtools.antglob.next_pos = match.end() |
print 'Converting', ant_pattern
print 'Matched', match.group() print match.start(0), next_pos
string devtools.antglob.prune_dirs = '.git .bzr .hg .svn _MTN _darcs CVS SCCS ' |
devtools.antglob.rejected = apply_filter( full_path, exclude_filter ) |