示例#1
0
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)
示例#2
0
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)
示例#3
0
文件: gitcmds.py 项目: mwh/git-cola
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)
示例#4
0
文件: search.py 项目: yjpark/git-cola
 def results(self):
     query, kwargs = self.common_args()
     return gitcmds.parse_rev_list(git.log('-S' + query, all=True,
                                           **kwargs))
示例#5
0
文件: search.py 项目: yjpark/git-cola
 def revisions(self, *args, **kwargs):
     revlist = git.log(*args, **kwargs)
     return gitcmds.parse_rev_list(revlist)
示例#6
0
def log(git, *args, **kwargs):
    return git.log(no_color=True,
                   no_abbrev_commit=True,
                   no_ext_diff=True,
                   *args,
                   **kwargs)[STDOUT]
示例#7
0
 def results(self):
     query, kwargs = self.common_args()
     return gitcmds.parse_rev_list(
         git.log('-S'+query, all=True, **kwargs)[STDOUT])
示例#8
0
 def revisions(self, *args, **kwargs):
     revlist = git.log(*args, **kwargs)[STDOUT]
     return gitcmds.parse_rev_list(revlist)
示例#9
0
def log(git, *args, **kwargs):
    return git.log(no_color=True, no_ext_diff=True, *args, **kwargs)[STDOUT]
示例#10
0
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)
示例#11
0
def log(git, *args, **kwargs):
    return core.decode(git.log(no_color=True,
                               no_ext_diff=True,
                               *args, **kwargs))
示例#12
0
def log(git, *args, **kwargs):
    return core.decode(
        git.log(no_color=True, no_ext_diff=True, *args, **kwargs))
示例#13
0
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)
示例#14
0
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)