当前位置: 首页>>代码示例>>Python>>正文


Python Commit.find_all方法代码示例

本文整理汇总了Python中commit.Commit.find_all方法的典型用法代码示例。如果您正苦于以下问题:Python Commit.find_all方法的具体用法?Python Commit.find_all怎么用?Python Commit.find_all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在commit.Commit的用法示例。


在下文中一共展示了Commit.find_all方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: commits

# 需要导入模块: from commit import Commit [as 别名]
# 或者: from commit.Commit import find_all [as 别名]
    def commits(self, start='master', path='', max_count=10, skip=0):
        """
        A list of Commit objects representing the history of a given ref/commit

        ``start``
            is the branch/commit name (default 'master')

         ``path``
            is an optional path to limit the returned commits to
            Commits that do not contain that path will not be returned.

         ``max_count``
            is the maximum number of commits to return (default 10)

          ``skip``
            is the number of commits to skip (default 0) which will effectively
            move your commit-window by the given number.

        Returns
            ``git.Commit[]``
        """
        options = {'max_count': max_count,
                   'skip': skip}

        return Commit.find_all(self, start, path, **options)
开发者ID:dvdotsenko,项目名称:ges,代码行数:27,代码来源:repo.py

示例2: commit_deltas_from

# 需要导入模块: from commit import Commit [as 别名]
# 或者: from commit.Commit import find_all [as 别名]
    def commit_deltas_from(self, other_repo, ref='master', other_ref='master'):
        """
        Returns a list of commits that is in ``other_repo`` but not in self

        Returns
            git.Commit[]
        """
        repo_refs = self.git.rev_list(ref, '--').strip().splitlines()
        other_repo_refs = other_repo.git.rev_list(other_ref, '--').strip().splitlines()

        diff_refs = list(set(other_repo_refs) - set(repo_refs))
        return map(lambda ref: Commit.find_all(other_repo, ref, max_count=1)[0], diff_refs)
开发者ID:dvdotsenko,项目名称:ges,代码行数:14,代码来源:repo.py

示例3: commits_between

# 需要导入模块: from commit import Commit [as 别名]
# 或者: from commit.Commit import find_all [as 别名]
    def commits_between(self, frm, to):
        """
        The Commits objects that are reachable via ``to`` but not via ``frm``
        Commits are returned in chronological order.

        ``from``
            is the branch/commit name of the younger item

        ``to``
            is the branch/commit name of the older item

        Returns
            ``git.Commit[]``
        """
        return reversed(Commit.find_all(self, "%s..%s" % (frm, to)))
开发者ID:dvdotsenko,项目名称:ges,代码行数:17,代码来源:repo.py

示例4: commit

# 需要导入模块: from commit import Commit [as 别名]
# 或者: from commit.Commit import find_all [as 别名]
    def commit(self, id):
        """
        The Commit object for the specified id

        ``id``
            is the SHA1 identifier of the commit

        Returns
            git.Commit
        """
        options = {'max_count': 1}

        commits = Commit.find_all(self, id, **options)

        if not commits:
            raise ValueError, 'Invalid identifier %s' % id
        return commits[0]
开发者ID:directeur,项目名称:git-python,代码行数:19,代码来源:repo.py

示例5: commits_since

# 需要导入模块: from commit import Commit [as 别名]
# 或者: from commit.Commit import find_all [as 别名]
    def commits_since(self, start = 'master', since = '1970-01-01'):
        """
        The Commits objects that are newer than the specified date.
        Commits are returned in chronological order.

        ``start``
            is the branch/commit name (default 'master')

        ``since``
            is a string represeting a date/time

        Returns
            ``git.Commit[]``
        """
        options = {'since': since}

        return Commit.find_all(self, start, **options)
开发者ID:directeur,项目名称:git-python,代码行数:19,代码来源:repo.py

示例6: commit

# 需要导入模块: from commit import Commit [as 别名]
# 或者: from commit.Commit import find_all [as 别名]
    def commit(self, id, path = ''):
        """
        The Commit object for the specified id

        ``id``
            is the SHA1 identifier of the commit

        ``path``
            is an optional path, if set the returned commit must contain the path.

        Returns
            ``git.Commit``
        """
        options = {'max_count': 1}

        commits = Commit.find_all(self, id, path, **options)

        if not commits:
            raise ValueError, "Invalid identifier %s, or given path '%s' too restrictive" % ( id, path )
        return commits[0]
开发者ID:dvdotsenko,项目名称:ges,代码行数:22,代码来源:repo.py

示例7: commits

# 需要导入模块: from commit import Commit [as 别名]
# 或者: from commit.Commit import find_all [as 别名]
    def commits(self, start = 'master', max_count = 10, skip = 0):
        """
        A list of Commit objects representing the history of a given ref/commit

        ``start``
            is the branch/commit name (default 'master')

         ``max_count``
            is the maximum number of commits to return (default 10)

          ``skip``
            is the number of commits to skip (default 0)

        Returns
            ``git.Commit[]``
        """
        options = {'max_count': max_count,
                   'skip': skip}

        return Commit.find_all(self, start, **options)
开发者ID:directeur,项目名称:git-python,代码行数:22,代码来源:repo.py


注:本文中的commit.Commit.find_all方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。