~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

  • Committer: mbp at sourcefrog
  • Date: 2005-03-29 08:01:30 UTC
  • Revision ID: mbp@sourcefrog.net-20050329080130-89b78af279b196b3
match ignore patterns like ./config.h

Show diffs side-by-side

added added

removed removed

Lines of Context:
308
308
        
309
309
        for pat in self.get_ignore_list():
310
310
            if '/' in pat:
311
 
                if fnmatch.fnmatchcase(filename, pat):
 
311
                # as a special case, you can put ./ at the start of a pattern;
 
312
                # this is good to match in the top-level only;
 
313
                if pat[:2] == './':
 
314
                    newpat = pat[2:]
 
315
                else:
 
316
                    newpat = pat
 
317
                if fnmatch.fnmatchcase(filename, newpat):
312
318
                    return pat
313
319
            else:
314
320
                if fnmatch.fnmatchcase(splitpath(filename)[-1], pat):