當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。