コード例 #1
0
    def extra_footers(self):
        """Get any extra footers for this commit as an OrderedDict of
    {footer: [values]}.

    Extra footers are stored as git-notes on the refs/notes/extra_footers ref.
    """
        footer_lines = []
        raw = self.notes('refs/notes/extra_footers')
        if raw is not None:
            _, footer_lines = CommitData.parse_raw_message(
                [''] + raw.rstrip('\n').splitlines())
        return CommitData.frozen_dict_from_kv_pairs(footer_lines)
コード例 #2
0
ファイル: commit.py プロジェクト: eunchong/infra
  def extra_footers(self):
    """Get any extra footers for this commit as an OrderedDict of
    {footer: [values]}.

    Extra footers are stored as git-notes on the refs/notes/extra_footers ref.
    """
    footer_lines = []
    raw = self.notes('refs/notes/extra_footers')
    if raw is not None:
      _, footer_lines = CommitData.parse_raw_message(
        [''] + raw.rstrip('\n').splitlines()
      )
    return CommitData.frozen_dict_from_kv_pairs(footer_lines)
コード例 #3
0
 def data(self):
     """Get a structured data representation of this commit."""
     try:
         raw_data = self.repo.run('cat-file', 'commit', self.hsh)
     except CalledProcessError:
         return INVALID
     return CommitData.from_raw(raw_data)
コード例 #4
0
ファイル: commit.py プロジェクト: eunchong/infra
 def data(self):
   """Get a structured data representation of this commit."""
   try:
     raw_data = self.repo.run('cat-file', 'commit', self.hsh)
   except CalledProcessError:
     return INVALID
   return CommitData.from_raw(raw_data)