cola.views.main – Main window

This view provides the main git-cola user interface.

class cola.views.main.MainView(parent=None)

The main cola interface.

action_copy()
action_cut()
action_delete()
branch_create()
Launch the ‘Create Branch’ dialog.
branch_delete()
Launch the ‘Delete Branch’ dialog.
branch_diff()
Diff against an arbitrary revision, branch, tag, etc.
browse_commits()
Launch the ‘Browse Commits’ dialog.
browse_current()
Launch the ‘Browse Current Branch’ dialog.
browse_other()
Prompt for a branch and inspect content at that point in time.
checkout_branch()
Launch the ‘Checkout Branch’ dialog.
cherry_pick()
Launch the ‘Cherry-Pick’ dialog.
commit()
Attempt to create a commit from the index and commit message.
copy_display()
diff_branch()
Launches a diff against a branch.
diff_context_menu_event(event)
Create the context menu for the diff display.
diff_context_menu_setup()
Set up the context menu for the diff display.
diff_expression()
Diff using an arbitrary expression.
diff_key_press_event(event)
Handle shortcut keys in the diff view.
diff_selection()
dragEnterEvent(event)
Accepts drops
dropEvent(event)
Apply dropped patches with git-am
export_patches()
Run ‘git format-patch’ on a list of commits.
export_state()
Exports data for save/restore
fetch()
Launch the ‘fetch’ remote dialog.
goto_grep()
Called when Search -> Grep’s right-click ‘goto’ action.
grep()
Prompt and use ‘git grep’ to find the content.
import_state(state)
Imports data for save/restore
load_commitmsg()
Load a commit message from a file.
mode
open_repo()
Spawn a new cola session.
process_diff_selection(selected=False, staged=True, apply_to_worktree=False, reverse=False)
Implement un/staging of selected lines or hunks.
pull()
Launch the ‘pull’ remote dialog.
push()
Launch the ‘push’ remote dialog.
rebase()
Rebase onto a branch.
review_branch()
Diff against an arbitrary revision, branch, tag, etc.
selected_line()
set_display(text)
Set the diff text display.
show_cursor_position()
Update the UI with the current row and column.
stage()
Stage selected files, or all files if no selection exists.
stage_hunk()
Stage a specific hunk.
stage_hunk_selection()
Stage selected lines.
undo_hunk()
Destructively remove a hunk from a worktree file.
undo_selection()
Destructively check out content for the selected file from $head.
unstage()
Unstage selected files, or all files if no selection exists.
unstage_hunk(cached=True)
Unstage a hunk.
unstage_hunk_selection()
Unstage selected lines.

Previous topic

Views

Next topic

cola.views.mainwindow – Main window base class

This Page