Mercurial > hg
comparison mercurial/ignore.py @ 18088:52620e5db2f6
ignore: only read an ignore file once
author | Bryan O'Sullivan <bryano@fb.com> |
---|---|
date | Mon, 17 Dec 2012 15:52:44 -0800 |
parents | 5712e3b12274 |
children | 0127366df8fe |
comparison
equal
deleted
inserted
replaced
18087:5712e3b12274 | 18088:52620e5db2f6 |
---|---|
55 def readpats(root, files, warn): | 55 def readpats(root, files, warn): |
56 '''return a dict mapping ignore-file-name to list-of-patterns''' | 56 '''return a dict mapping ignore-file-name to list-of-patterns''' |
57 | 57 |
58 pats = {} | 58 pats = {} |
59 for f in files: | 59 for f in files: |
60 if f in pats: | |
61 continue | |
60 try: | 62 try: |
61 pats[f] = [] | 63 pats[f] = [] |
62 fp = open(f) | 64 fp = open(f) |
63 pats[f], warnings = ignorepats(fp) | 65 pats[f], warnings = ignorepats(fp) |
64 fp.close() | 66 fp.close() |