comparison mercurial/store.py @ 39698:f44187605315

localrepo: move store() from store module I want logic related to requirements handling to be in the localrepo module so it is all in one place. I would have loved to inline this logic. Unfortunately, statichttprepo also calls it. I didn't want to inline it twice. We could potentially refactor statichttppeer. But meh. Differential Revision: https://phab.mercurial-scm.org/D4574
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 12 Sep 2018 15:07:27 -0700
parents 576eef1ab43d
children 2d45b549392f
comparison
equal deleted inserted replaced
39697:98ca9078807a 39698:f44187605315
583 path += '/' 583 path += '/'
584 for e in self.fncache: 584 for e in self.fncache:
585 if e.startswith(path) and self._exists(e): 585 if e.startswith(path) and self._exists(e):
586 return True 586 return True
587 return False 587 return False
588
589 def store(requirements, path, vfstype):
590 if 'store' in requirements:
591 if 'fncache' in requirements:
592 return fncachestore(path, vfstype, 'dotencode' in requirements)
593 return encodedstore(path, vfstype)
594 return basicstore(path, vfstype)