mercurial/scmutil.py
changeset 14482 58b36e9ea783
parent 14435 5f6090e559fa
child 14483 973959fbe8ec
equal deleted inserted replaced
14481:b2ee161328e0 14482:58b36e9ea783
   689                         % (repo.pathto(origsrc, cwd), repo.pathto(dst, cwd)))
   689                         % (repo.pathto(origsrc, cwd), repo.pathto(dst, cwd)))
   690             if repo.dirstate[dst] in '?r' and not dryrun:
   690             if repo.dirstate[dst] in '?r' and not dryrun:
   691                 wctx.add([dst])
   691                 wctx.add([dst])
   692         elif not dryrun:
   692         elif not dryrun:
   693             wctx.copy(origsrc, dst)
   693             wctx.copy(origsrc, dst)
       
   694 
       
   695 def readrequires(opener, supported):
       
   696     '''Reads and parses .hg/requires and checks if all entries found
       
   697     are in the list of supported features.'''
       
   698     requirements = set(opener.read("requires").splitlines())
       
   699     for r in requirements:
       
   700         if r not in supported:
       
   701             raise error.RequirementError(
       
   702                 _("requirement '%s' not supported") % r)
       
   703     return requirements