mercurial/narrowspec.py
changeset 39539 8d8e61df8259
parent 39531 0d572769046a
child 39544 10a8472f6662
equal deleted inserted replaced
39538:238a1480d7ad 39539:8d8e61df8259
   162     includepats, excludepats, profiles = sparse.parseconfig(repo.ui, spec,
   162     includepats, excludepats, profiles = sparse.parseconfig(repo.ui, spec,
   163                                                             'narrow')
   163                                                             'narrow')
   164     if profiles:
   164     if profiles:
   165         raise error.Abort(_("including other spec files using '%include' is not"
   165         raise error.Abort(_("including other spec files using '%include' is not"
   166                             " supported in narrowspec"))
   166                             " supported in narrowspec"))
       
   167 
       
   168     validatepatterns(includepats)
       
   169     validatepatterns(excludepats)
       
   170 
   167     return includepats, excludepats
   171     return includepats, excludepats
   168 
   172 
   169 def save(repo, includepats, excludepats):
   173 def save(repo, includepats, excludepats):
       
   174     validatepatterns(includepats)
       
   175     validatepatterns(excludepats)
   170     spec = format(includepats, excludepats)
   176     spec = format(includepats, excludepats)
   171     repo.svfs.write(FILENAME, spec)
   177     repo.svfs.write(FILENAME, spec)
   172 
   178 
   173 def savebackup(repo, backupname):
   179 def savebackup(repo, backupname):
   174     if repository.NARROW_REQUIREMENT not in repo.requirements:
   180     if repository.NARROW_REQUIREMENT not in repo.requirements: