Show More
@@ -1380,21 +1380,25 b' def _rootsdirsandparents(kindpats):' | |||||
1380 |
|
1380 | |||
1381 | Returns a tuple of (roots, dirs, parents). |
|
1381 | Returns a tuple of (roots, dirs, parents). | |
1382 |
|
1382 | |||
1383 | >>> _rootsdirsandparents( |
|
1383 | >>> r = _rootsdirsandparents( | |
1384 | ... [(b'glob', b'g/h/*', b''), (b'glob', b'g/h', b''), |
|
1384 | ... [(b'glob', b'g/h/*', b''), (b'glob', b'g/h', b''), | |
1385 | ... (b'glob', b'g*', b'')]) |
|
1385 | ... (b'glob', b'g*', b'')]) | |
1386 | (['g/h', 'g/h', ''], [], set(['', 'g'])) |
|
1386 | >>> print(r[0:2], sorted(r[2])) # the set has an unstable output | |
1387 | >>> _rootsdirsandparents( |
|
1387 | (['g/h', 'g/h', ''], []) ['', 'g'] | |
|
1388 | >>> r = _rootsdirsandparents( | |||
1388 | ... [(b'rootfilesin', b'g/h', b''), (b'rootfilesin', b'', b'')]) |
|
1389 | ... [(b'rootfilesin', b'g/h', b''), (b'rootfilesin', b'', b'')]) | |
1389 | ([], ['g/h', ''], set(['', 'g'])) |
|
1390 | >>> print(r[0:2], sorted(r[2])) # the set has an unstable output | |
1390 | >>> _rootsdirsandparents( |
|
1391 | ([], ['g/h', '']) ['', 'g'] | |
|
1392 | >>> r = _rootsdirsandparents( | |||
1391 | ... [(b'relpath', b'r', b''), (b'path', b'p/p', b''), |
|
1393 | ... [(b'relpath', b'r', b''), (b'path', b'p/p', b''), | |
1392 | ... (b'path', b'', b'')]) |
|
1394 | ... (b'path', b'', b'')]) | |
1393 | (['r', 'p/p', ''], [], set(['', 'p'])) |
|
1395 | >>> print(r[0:2], sorted(r[2])) # the set has an unstable output | |
1394 | >>> _rootsdirsandparents( |
|
1396 | (['r', 'p/p', ''], []) ['', 'p'] | |
|
1397 | >>> r = _rootsdirsandparents( | |||
1395 | ... [(b'relglob', b'rg*', b''), (b're', b're/', b''), |
|
1398 | ... [(b'relglob', b'rg*', b''), (b're', b're/', b''), | |
1396 | ... (b'relre', b'rr', b'')]) |
|
1399 | ... (b'relre', b'rr', b'')]) | |
1397 | (['', '', ''], [], set([''])) |
|
1400 | >>> print(r[0:2], sorted(r[2])) # the set has an unstable output | |
|
1401 | (['', '', ''], []) [''] | |||
1398 | ''' |
|
1402 | ''' | |
1399 | r, d = _patternrootsanddirs(kindpats) |
|
1403 | r, d = _patternrootsanddirs(kindpats) | |
1400 |
|
1404 |
General Comments 0
You need to be logged in to leave comments.
Login now