示例#1
0
文件: fastlog.py 项目: zerkella/eden
    def run(self):
        # type: () -> None
        revs = None
        paths = self.paths

        self._paths_to_fetch = len(paths)
        for path in paths:
            g = self.generate(path)
            gen = smartset.generatorset(g, iterasc=False)
            gen.reverse()
            if revs:
                revs = smartset.addset(revs, gen, ascending=False)
            else:
                revs = gen

        if revs:
            for rev in revs:
                if self.stopped():
                    break
                self.queue.put((self.id, True, rev))
        # The end marker (self.id, True, None) indicates that the thread
        # completed successfully. Don't send it if the thread is stopped.
        # The thread can be stopped for one of two reasons:
        #  1. The fastlog service failed - in this case, flagging a successful
        #     finish is harmful, because it will stop us continuing with local
        #     results, truncating output.
        #  2. The caller is going to ignore all future results from us. In this
        #     case, it'll ignore the end marker anyway - it's discarding the
        #     entire queue.
        if not self.stopped():
            self.queue.put((self.id, True, None))
示例#2
0
文件: __init__.py 项目: xmonader/eden
def _smartlogrevset(orig, repo, subset, x):
    revs = orig(repo, subset, x)
    snapshotstring = revsetlang.formatspec("snapshot()")
    return smartset.addset(
        revs,
        repo.unfiltered().anyrevs([snapshotstring], user=True))