Пример #1
0
    def __call__(self, dirname=''):
        path = svn_utils.joinpath(dirname, self.path)

        if os.path.isfile(path):
            for path in self._finder(dirname,path):
                if os.path.isfile(path):
                    yield path
                elif os.path.isdir(path):
                    for item in self.find(path):
                        yield item
Пример #2
0
    def __call__(self, dirname=''):
        path = svn_utils.joinpath(dirname, self.path)

        if os.path.isfile(path):
            for path in self._finder(dirname, path):
                if os.path.isfile(path):
                    yield path
                elif os.path.isdir(path):
                    for item in self.find(path):
                        yield item
Пример #3
0
    def find(self, dirname=''):
        path = svn_utils.joinpath(dirname, self.entries_path)

        if not os.path.isfile(path):
            # entries file doesn't exist
            return
        for path in self._finder(dirname, path):
            if os.path.isfile(path):
                yield path
            elif os.path.isdir(path):
                for item in self.find(path):
                    yield item
Пример #4
0
 def _finder(self, dirname, filename):
     f = open(filename, 'rU')
     try:
         data = f.read()
     finally:
         f.close()
     for match in self.pattern.finditer(data):
         path = match.group(1)
         # postproc was formerly used when the svn finder
         # was an re_finder for calling unescape
         path = self.postproc(path)
         yield svn_utils.joinpath(dirname, path)
Пример #5
0
    def find(self, dirname=''):
        path = svn_utils.joinpath(dirname, self.entries_path)

        if not os.path.isfile(path):
            # entries file doesn't exist
            return
        for path in self._finder(dirname, path):
            if os.path.isfile(path):
                yield path
            elif os.path.isdir(path):
                for item in self.find(path):
                    yield item
Пример #6
0
 def _finder(self, dirname, filename):
     f = open(filename, 'rU')
     try:
         data = f.read()
     finally:
         f.close()
     for match in self.pattern.finditer(data):
         path = match.group(1)
         # postproc was formerly used when the svn finder
         # was an re_finder for calling unescape
         path = self.postproc(path)
         yield svn_utils.joinpath(dirname, path)