Beispiel #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)
Beispiel #2
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
    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)