def pathinstatus(path, status, uncleanpaths): """Test path is included by the status filter""" if util.any(c in self._statusfilter and path in e for c, e in status.iteritems()): return True if 'C' in self._statusfilter and path not in uncleanpaths: return True return False
def addfilestotree(treeroot, files, status, uncleanpaths): """Add files to the tree according to their state""" for path in files: if not pathinstatus(path, status, uncleanpaths): continue origpath = path path = self._repo.removeStandin(path) e = treeroot for p in hglib.tounicode(path).split('/'): if not p in e: e.addchild(p) e = e[p] for st, filesofst in status.iteritems(): if origpath in filesofst: e.setstatus(st) break else: e.setstatus('C')
def addfilestotree(treeroot, files, status, uncleanpaths): """Add files to the tree according to their state""" if self._namefilter: files = fnmatch.filter(files, '*%s*' % self._namefilter) for path in files: if not pathinstatus(path, status, uncleanpaths): continue origpath = path path = self._repo.removeStandin(path) e = treeroot for p in hglib.tounicode(path).split('/'): if not p in e: e.addchild(p) e = e[p] for st, filesofst in status.iteritems(): if origpath in filesofst: e.setstatus(st) break else: e.setstatus('C')