~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Jelmer Vernooij
  • Date: 2006-06-07 12:19:04 UTC
  • mto: This revision was merged to the branch mainline in revision 1753.
  • Revision ID: jelmer@samba.org-20060607121904-25ea202d89f1d17e
Move inventory to commit builder.
Add is_inside_or_parent_of_any()

Show diffs side-by-side

added added

removed removed

Lines of Context:
351
351
        return False
352
352
 
353
353
 
 
354
def is_inside_or_parent_of_any(dir_list, fname):
 
355
    """True if fname is a child or a parent of any of the given files."""
 
356
    for dirname in dir_list:
 
357
        if is_inside(dirname, fname) or is_inside(fname, dirname):
 
358
            return True
 
359
    else:
 
360
        return False
 
361
 
 
362
 
354
363
def pumpfile(fromfile, tofile):
355
364
    """Copy contents of one file to another."""
356
365
    BUFSIZE = 32768