def browse_other(): """Prompt for a branch and inspect content at that point in time.""" # Prompt for a branch to browse branch = choose_ref(N_('Browse Commits...'), N_('Browse')) if not branch: return BrowseDialog.browse(branch)
def browse_other(): """Prompt for a branch and inspect content at that point in time.""" # Prompt for a branch to browse branch = choose_from_combo('Browse Revision...', gitcmds.all_refs()) if not branch: return BrowseDialog.browse(branch)
def browse_other(): """Prompt for a branch and inspect content at that point in time.""" # Prompt for a branch to browse branch = choose_from_combo(N_('Browse Revision...'), gitcmds.all_refs()) if not branch: return BrowseDialog.browse(branch)
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)
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)
def browse_current(): """Launch the 'Browse Current Branch' dialog.""" branch = gitcmds.current_branch() BrowseDialog.browse(branch)
def save_blob_dialog(self): sha1 = self.selected_sha1() if sha1 is None: return return BrowseDialog.browse(sha1)
def save_blob_dialog(self): return BrowseDialog.browse(self._clicked_item.commit.sha1)
def compare_file(): """Launches a dialog for comparing revisions touching a file path""" filename = BrowseDialog.select_file('HEAD') if not filename: return compare(filename)