def log(self, parent=None, branch=None, author=None, offset=0, limit=100,
            paths=None, first_parent=True):
        start_time = time()

        # TODO(dcramer): we should make this streaming
        cmd = ['log', '--pretty=format:%s' % (LOG_FORMAT,)]

        if not first_parent:
            # --date-order can be vastly slower. When --first-parent is
            # provided, the history returned is inherently linear, so
            # there's no freedom to reorder commits at all, meaning
            # --date-order would be effectively a no-op.
            cmd.append('--date-order')
        if first_parent:
            cmd.append('--first-parent')
        if author:
            cmd.append('--author=%s' % (author,))
        if offset:
            cmd.append('--skip=%d' % (offset,))
        if limit:
            cmd.append('--max-count=%d' % (limit,))

        if parent and branch:
            raise ValueError('Both parent and branch cannot be set')
        if branch:
            cmd.append(branch)

        # TODO(dcramer): determine correct way to paginate results in git as
        # combining --all with --parent causes issues
        elif not parent:
            cmd.append('--all')
        if parent:
            cmd.append(parent)

        if paths:
            cmd.append("--")
            cmd.extend([p.strip() for p in paths])

        try:
            result = self.run(cmd)
        except CommandError as cmd_error:
            err_msg = cmd_error.stderr
            if branch and branch in err_msg:
                import traceback
                import logging
                msg = traceback.format_exception(CommandError, cmd_error, None)
                logging.warning(msg)
                raise ValueError('Unable to fetch commit log for branch "{0}".'
                                 .format(branch))
            raise

        self.log_timing('log', start_time)

        for chunk in BufferParser(result, '\x02'):
            (sha, author, author_date, committer, committer_date,
             parents, message) = chunk.split('\x01')

            # sha may have a trailing newline due to git log adding it
            sha = sha.lstrip('\n')

            parents = filter(bool, parents.split(' '))

            author_date = datetime.utcfromtimestamp(float(author_date))
            committer_date = datetime.utcfromtimestamp(float(committer_date))

            yield LazyGitRevisionResult(
                vcs=self,
                id=sha,
                author=author,
                committer=committer,
                author_date=author_date,
                committer_date=committer_date,
                parents=parents,
                message=message,
            )
Makes a Job out of a job function.         Convenience function for constructor of :class:`toil.job.JobFunctionWrappingJob`.
dataset/ETHPy150Open dropbox/changes/changes/vcs/git.py/GitVcs.log--crossover with--dataset/ETHPy150Open BD2KGenomics/toil/src/toil/job.py/Job.wrapJobFn