Пример #1
0
    def update_revision_lists(self, filename=None, show_versions=False):
        num_results = self.num_results
        if filename:
            rev_list = self.git.log('--', filename,
                                    max_count=num_results,
                                    no_color=True,
                                    pretty='oneline')
        else:
            rev_list = self.git.log(max_count=num_results,
                                    no_color=True,
                                    pretty='oneline', all=True)

        commit_list = gitcmds.parse_rev_list(rev_list)
        commit_list.reverse()
        commits = map(lambda x: x[0], commit_list)
        descriptions = map(lambda x: core.decode(x[1]), commit_list)
        if show_versions:
            fancy_descr_list = map(lambda x: self.describe(*x), commit_list)
            self.set_descriptions_start(fancy_descr_list)
            self.set_descriptions_end(fancy_descr_list)
        else:
            self.set_descriptions_start(descriptions)
            self.set_descriptions_end(descriptions)

        self.set_revisions_start(commits)
        self.set_revisions_end(commits)

        return commits
Пример #2
0
 def results(self):
     query, kwargs = self.common_args()
     return gitcmds.parse_rev_list(git.log('-S' + query, all=True,
                                           **kwargs))
Пример #3
0
 def revisions(self, *args, **kwargs):
     revlist = git.log(*args, **kwargs)
     return gitcmds.parse_rev_list(revlist)
Пример #4
0
 def results(self):
     query, kwargs = self.common_args()
     return gitcmds.parse_rev_list(
         git.log('-S'+query, all=True, **kwargs)[STDOUT])
Пример #5
0
 def revisions(self, *args, **kwargs):
     revlist = git.log(*args, **kwargs)[STDOUT]
     return gitcmds.parse_rev_list(revlist)
Пример #6
0
 def revisions(self, *args, **kwargs):
     revlist = self.model.git.log(*args, **kwargs)
     return gitcmds.parse_rev_list(revlist)