mercurial/narrowspec.py
changeset 38870 ae2962bb56a3
parent 38869 ad24b581e4d9
child 38871 204e074c188e
equal deleted inserted replaced
38869:ad24b581e4d9 38870:ae2962bb56a3
   111         spec = repo.vfs.read(FILENAME)
   111         spec = repo.vfs.read(FILENAME)
   112     except IOError as e:
   112     except IOError as e:
   113         # Treat "narrowspec does not exist" the same as "narrowspec file exists
   113         # Treat "narrowspec does not exist" the same as "narrowspec file exists
   114         # and is empty".
   114         # and is empty".
   115         if e.errno == errno.ENOENT:
   115         if e.errno == errno.ENOENT:
   116             # Without this the next call to load will use the cached
       
   117             # non-existence of the file, which can cause some odd issues.
       
   118             repo.invalidate(clearfilecache=True)
       
   119             return set(), set()
   116             return set(), set()
   120         raise
   117         raise
   121     # maybe we should care about the profiles returned too
   118     # maybe we should care about the profiles returned too
   122     includepats, excludepats, profiles = sparse.parseconfig(repo.ui, spec,
   119     includepats, excludepats, profiles = sparse.parseconfig(repo.ui, spec,
   123                                                             'narrow')
   120                                                             'narrow')