예제 #1
0
def diff_branch():
    """Launches a diff against a branch."""
    branch = choose_from_combo('Select Branch, Tag, or Commit-ish',
                               ['HEAD^'] +
                               cola.model().all_branches() +
                               cola.model().tags)
    if not branch:
        return
    zfiles_str = git.instance().diff(branch, name_only=True,
                                     no_color=True,
                                     z=True).rstrip('\0')
    files = [core.decode(f) for f in zfiles_str.split('\0')]

    filename = BrowseDialog.select_file_from_list(files)
    if not filename:
        return
    cola.notifier().broadcast(signals.branch_mode, branch, filename)
예제 #2
0
파일: guicmds.py 프로젝트: mwh/git-cola
def diff_branch():
    """Launches a diff against a branch."""
    branch = choose_from_combo('Select Branch, Tag, or Commit-ish',
                               ['HEAD^'] +
                               cola.model().all_branches() +
                               cola.model().tags)
    if not branch:
        return
    files = gitcmds.diff_filenames(branch)
    if not files:
        qtutils.critical('No Differences',
                         'No differences found for "%s"' % branch)
        return
    filename = BrowseDialog.select_file_from_list(files)
    if not filename:
        return
    cola.notifier().broadcast(signals.branch_mode, branch, filename)