Example #1
0
    def get_stale_files(self, all_files, fileset_name):
        """
        Banana banana
        """
        stale = OrderedSet()

        previous_mtimes = self.mtimes[fileset_name]
        new_mtimes = defaultdict()

        for filename in all_files:
            mtime = get_mtime(filename)
            prev_mtime = previous_mtimes.pop(filename, None)
            new_mtimes[filename] = mtime
            if mtime == prev_mtime:
                continue

            stale.add(filename)

        self.mtimes[fileset_name] = new_mtimes

        unlisted = set(previous_mtimes.keys())

        ChangeTracker.all_stale_files |= stale
        ChangeTracker.all_unlisted_files |= unlisted

        return stale, unlisted
Example #2
0
    def get_stale_files(self, all_files, fileset_name):
        """
        Banana banana
        """
        stale = OrderedSet()

        previous_mtimes = self.mtimes[fileset_name]
        new_mtimes = defaultdict()

        for filename in all_files:
            mtime = get_mtime(filename)
            prev_mtime = previous_mtimes.pop(filename, None)
            new_mtimes[filename] = mtime
            if mtime == prev_mtime:
                continue

            stale.add(filename)

        self.mtimes[fileset_name] = new_mtimes

        unlisted = set(previous_mtimes.keys())

        ChangeTracker.all_stale_files |= stale
        ChangeTracker.all_unlisted_files |= unlisted

        return stale, unlisted
Example #3
0
    def add_hard_dependency(self, filename):
        """
        Banana banana
        """
        mtime = get_mtime(filename)

        if mtime != -1:
            self.hard_deps_mtimes[filename] = mtime
Example #4
0
    def add_hard_dependency(self, filename):
        """
        Banana banana
        """
        mtime = get_mtime(filename)

        if mtime != -1:
            self.hard_deps_mtimes[filename] = mtime
Example #5
0
    def hard_dependencies_are_stale(self):
        """
        Banana banana
        """
        for filename, last_mtime in self.hard_deps_mtimes.items():
            mtime = get_mtime(filename)

            if mtime == -1 or mtime != last_mtime:
                return True

        return False
Example #6
0
    def hard_dependencies_are_stale(self):
        """
        Banana banana
        """
        for filename, last_mtime in self.hard_deps_mtimes.items():
            mtime = get_mtime(filename)

            if mtime == -1 or mtime != last_mtime:
                return True

        return False