def checkout_branch(self): """Launch the 'Checkout Branch' dialog.""" branch = choose_from_combo('Checkout Branch', self.model.local_branches) if not branch: return cola.notifier().broadcast(signals.checkout_branch, branch)
def branch_delete(self): """Launch the 'Delete Branch' dialog.""" branch = choose_from_combo('Delete Branch', self.model.local_branches) if not branch: return cola.notifier().broadcast(signals.delete_branch, branch)
def browse_other(self): """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 # Launch the repobrowser browse_git_branch(branch)
def diff_expression(self): """Diff using an arbitrary expression.""" expr = choose_from_combo('Enter Diff Expression', self.model.all_branches() + self.model.tags) if not expr: return cola.notifier().broadcast(signals.diff_expr_mode, expr)
def review_branch(self): """Diff against an arbitrary revision, branch, tag, etc.""" branch = choose_from_combo('Select Branch, Tag, or Commit-ish', self.model.all_branches() + self.model.tags) if not branch: return cola.notifier().broadcast(signals.review_branch_mode, branch)
def rebase(self): """Rebase onto a branch.""" branch = choose_from_combo('Rebase Branch', self.model.all_branches()) if not branch: return #TODO cmd status, output = self.model.git.rebase(branch, with_stderr=True, with_status=True) qtutils.log(status, output)
def diff_branch(self): """Launches a diff against a branch.""" branch = choose_from_combo('Select Branch, Tag, or Commit-ish', ['HEAD^'] + self.model.all_branches() + self.model.tags) if not branch: return zfiles_str = self.model.git.diff(branch, name_only=True, no_color=True, z=True).rstrip('\0') files = zfiles_str.split('\0') filename = choose_from_list('Select File', files) if not filename: return cola.notifier().broadcast(signals.branch_mode, branch, filename)