comparison mercurial/dirstate.py @ 2008:11ffa1267185

Don't ignore everything if all hgignore files are empty.
author Thomas Arendsen Hein <thomas@intevation.de>
date Sun, 26 Mar 2006 22:32:44 +0200
parents ff8b39daa930
children a59da8cc35e4
comparison
equal deleted inserted replaced
2007:2ffa36dc3423 2008:11ffa1267185
98 and any other files specified in the [ui] section of .hgrc.''' 98 and any other files specified in the [ui] section of .hgrc.'''
99 if self.blockignore: 99 if self.blockignore:
100 return False 100 return False
101 if not self.ignorefunc: 101 if not self.ignorefunc:
102 ignore = self.hgignore() 102 ignore = self.hgignore()
103 if ignore: 103 allpats = []
104 [allpats.extend(patlist) for patlist in ignore.values()]
105 if allpats:
104 try: 106 try:
105 allpats = []
106 [allpats.extend(patlist) for patlist in ignore.values()]
107 files, self.ignorefunc, anypats = ( 107 files, self.ignorefunc, anypats = (
108 util.matcher(self.root, inc=allpats, src='.hgignore')) 108 util.matcher(self.root, inc=allpats, src='.hgignore'))
109 except util.Abort: 109 except util.Abort:
110 # Re-raise an exception where the src is the right file 110 # Re-raise an exception where the src is the right file
111 for f, patlist in ignore.items(): 111 for f, patlist in ignore.items():