def log_helper(all=False, extra_args=None): """Return parallel arrays containing the SHA-1s and summaries.""" revs = [] summaries = [] args = [] if extra_args: args = extra_args output = git.log(pretty='oneline', no_color=True, all=all, *args) for line in map(core.decode, output.splitlines()): match = REV_LIST_REGEX.match(line) if match: revs.append(match.group(1)) summaries.append(match.group(2)) return (revs, summaries)
def diff_info(sha1, git=git, merge=True): if merge: mergefmt = 'Merge: %P%n' else: mergefmt = '' log = git.log('-1', '--pretty=format:' 'commit %H%n' + mergefmt + 'Author: %aN <%aE>%n' 'Date: %aD%n' '%n%s%n%n%b', sha1) return core.decode(log) + '\n\n' + sha1_diff(sha1)
def results(self): query, kwargs = self.common_args() return gitcmds.parse_rev_list(git.log('-S' + query, all=True, **kwargs))
def revisions(self, *args, **kwargs): revlist = git.log(*args, **kwargs) return gitcmds.parse_rev_list(revlist)
def log(git, *args, **kwargs): return git.log(no_color=True, no_abbrev_commit=True, no_ext_diff=True, *args, **kwargs)[STDOUT]
def results(self): query, kwargs = self.common_args() return gitcmds.parse_rev_list( git.log('-S'+query, all=True, **kwargs)[STDOUT])
def revisions(self, *args, **kwargs): revlist = git.log(*args, **kwargs)[STDOUT] return gitcmds.parse_rev_list(revlist)
def log(git, *args, **kwargs): return git.log(no_color=True, no_ext_diff=True, *args, **kwargs)[STDOUT]
def diff_info(sha1, git=git): log = git.log('-1', '--pretty=format:%b', sha1) decoded = core.decode(log).strip() if decoded: decoded += '\n\n' return decoded + sha1_diff(sha1)
def log(git, *args, **kwargs): return core.decode(git.log(no_color=True, no_ext_diff=True, *args, **kwargs))
def log(git, *args, **kwargs): return core.decode( git.log(no_color=True, no_ext_diff=True, *args, **kwargs))
def diff_info(sha1, git=git): log = git.log("-1", "--pretty=format:%b", sha1) decoded = core.decode(log).strip() if decoded: decoded += "\n\n" return decoded + sha1_diff(sha1)