2 from .. import difftool
4 from ..widgets
import archive
5 from ..widgets
import browse
6 from ..widgets
import compare
7 from ..widgets
import createbranch
8 from ..widgets
import createtag
9 from ..widgets
import dag
10 from ..widgets
import diff
11 from ..widgets
import editremotes
12 from ..widgets
import finder
13 from ..widgets
import grep
14 from ..widgets
import merge
15 from ..widgets
import recent
16 from ..widgets
import remote
17 from ..widgets
import search
18 from ..widgets
import stash
21 'Others::LaunchEditor': {
22 'title': 'Launch Editor',
23 'action': cmds
.run(cmds
.LaunchEditor
),
26 'Others::RevertUnstagedEdits': {
27 'title': 'Revert Unstaged Edits...',
28 'action': cmds
.run(cmds
.RevertUnstagedEdits
),
32 'title': 'Quick Open...',
33 'action': guicmds
.open_quick_repo_search
,
37 'title': 'New Repository...',
38 'action': guicmds
.open_new_repo
,
43 'action': guicmds
.open_repo
,
46 'File::OpenRepoNewWindow': {
47 'title': 'Open in New Window...',
48 'action': guicmds
.open_repo_in_new_window
,
51 # 'File::CloneRepo': {
52 # 'title': 'Clone...',
53 # 'action': guicmds.spawn_clone,
57 'title': 'Refresh...',
58 'action': cmds
.run(cmds
.Refresh
),
62 'title': 'Find Files',
63 'action': finder
.finder
,
66 'File::EditRemotes': {
67 'title': 'Edit Remotes...',
68 'action': editremotes
.editor
,
71 'File::RecentModified': {
72 'title': 'Recently Modified Files...',
73 'action': recent
.browse_recent_files
,
76 'File::ApplyPatches': {
77 'title': 'Apply Patches...',
78 'action': diff
.apply_patches
,
81 'File::ExportPatches': {
82 'title': 'Export Patches...',
83 'action': guicmds
.export_patches
,
86 'File::SaveAsTarZip': {
87 'title': 'Save As Tarball/Zip...',
88 'action': archive
.save_archive
,
91 # 'File::Preferences': {
92 # 'title': 'Preferences',
93 # 'action': prefs.preferences,
96 'Actions::Fetch': {'title': 'Fetch...', 'action': remote
.fetch
, 'icon': 'download'},
97 'Actions::Pull': {'title': 'Pull...', 'action': remote
.pull
, 'icon': 'pull'},
98 'Actions::Push': {'title': 'Push...', 'action': remote
.push
, 'icon': 'push'},
99 'Actions::Stash': {'title': 'Stash...', 'action': stash
.view
, 'icon': 'commit'},
100 'Actions::CreateTag': {
101 'title': 'Create Tag...',
102 'action': createtag
.create_tag
,
105 'Actions::CherryPick': {
106 'title': 'Cherry-Pick...',
107 'action': guicmds
.cherry_pick
,
108 'icon': 'cherry_pick',
112 'action': merge
.local_merge
,
115 'Actions::AbortMerge': {
116 'title': 'Abort Merge...',
117 'action': cmds
.run(cmds
.AbortMerge
),
120 'Actions::UpdateSubmodules': {
121 'title': 'Update All Submodules...',
122 'action': cmds
.run(cmds
.SubmodulesUpdate
),
125 'Actions::ResetSoft': {
126 'title': 'Reset Branch (Soft)',
127 'action': guicmds
.reset_soft
,
128 'icon': 'style_dialog_reset',
129 'tooltip': cmds
.ResetSoft
.tooltip('<commit>'),
131 'Actions::ResetMixed': {
132 'title': 'Reset Branch and Stage (Mixed)',
133 'action': guicmds
.reset_mixed
,
134 'icon': 'style_dialog_reset',
135 'tooltip': cmds
.ResetMixed
.tooltip('<commit>'),
137 'Actions::RestoreWorktree': {
138 'title': 'Restore Worktree',
139 'action': guicmds
.restore_worktree
,
141 'tooltip': cmds
.RestoreWorktree
.tooltip('<commit>'),
143 'Actions::ResetKeep': {
144 'title': 'Restore Worktree and Reset All (Keep Unstaged Changes)',
145 'action': guicmds
.reset_keep
,
146 'icon': 'style_dialog_reset',
147 'tooltip': cmds
.ResetKeep
.tooltip('<commit>'),
149 'Actions::ResetHard': {
150 'title': 'Restore Worktre and Reset All (Hard)',
151 'action': guicmds
.reset_hard
,
152 'icon': 'style_dialog_reset',
153 'tooltip': cmds
.ResetHard
.tooltip('<commit>'),
161 'title': 'Search...',
162 'action': search
.search
,
167 'action': cmds
.run(cmds
.StageOrUnstage
),
170 'Commit::AmendLast': {
171 'title': 'Amend Last Commit',
172 'action': cmds
.run(cmds
.AmendMode
),
175 'Commit::UndoLastCommit': {
176 'title': 'Undo Last Commit',
177 'action': cmds
.run(cmds
.UndoLastCommit
),
178 'icon': 'style_dialog_discard',
180 'Commit::StageModified': {
181 'title': 'Stage Modified',
182 'action': cmds
.run(cmds
.StageModified
),
185 'Commit::StageUntracked': {
186 'title': 'Stage Untracked',
187 'action': cmds
.run(cmds
.StageUntracked
),
190 'Commit::UnstageAll': {
191 'title': 'Unstage All',
192 'action': cmds
.run(cmds
.UnstageAll
),
197 'action': cmds
.run(cmds
.UnstageSelected
),
200 'Commit::LoadCommitMessage': {
201 'title': 'Load Commit Message...',
202 'action': guicmds
.load_commitmsg
,
205 'Commit::GetCommitMessageTemplate': {
206 'title': 'Get Commit Message Template',
207 'action': cmds
.run(cmds
.LoadCommitMessageFromTemplate
),
208 'icon': 'style_dialog_apply',
211 'title': 'Launch Diff tool',
212 'action': cmds
.run(difftool
.LaunchDifftool
),
215 'Diff::Expression': {
216 'title': 'Expression...',
217 'action': guicmds
.diff_expression
,
221 'title': 'Branches...',
222 'action': compare
.compare_branches
,
227 'action': cmds
.run(cmds
.Diffstat
),
231 'title': 'Review...',
232 'action': guicmds
.review_branch
,
236 'title': 'Create...',
237 'action': createbranch
.create_new_branch
,
240 'Branch::Checkout': {
241 'title': 'Checkout...',
242 'action': guicmds
.checkout_branch
,
246 'title': 'Delete...',
247 'action': guicmds
.delete_branch
,
250 'Branch::DeleteRemote': {
251 'title': 'Delete Remote Branch...',
252 'action': guicmds
.delete_remote_branch
,
256 'title': 'Rename Branch...',
257 'action': guicmds
.rename_branch
,
260 'Branch::BrowseCurrent': {
261 'title': 'Browse Current Branch...',
262 'action': guicmds
.browse_current
,
265 'Branch::BrowseOther': {
266 'title': 'Browse Other Branch...',
267 'action': guicmds
.browse_other
,
270 'Branch::VisualizeCurrent': {
271 'title': 'Visualize Current Branch...',
272 'action': cmds
.run(cmds
.VisualizeCurrent
),
275 'Branch::VisualizeAll': {
276 'title': 'Visualize All Branches...',
277 'action': cmds
.run(cmds
.VisualizeAll
),
280 'View::FileBrowser': {
281 'title': 'File Browser...',
282 'action': browse
.worktree_browser
,
285 'View::DAG': {'title': 'DAG...', 'action': dag
.git_dag
, 'icon': 'cola'},
287 # 'Rebase::StartInteractive': {
288 # 'title': 'Start Interactive Rebase...',
289 # 'action': lambda: app().activeWindow().rebase_start(),
293 # 'title': 'Edit...',
294 # 'action': lambda: cmds.rebase_edit_todo(),
297 # 'Rebase::Continue': {
298 # 'title': 'Continue',
299 # 'action': lambda: cmds.rebase_continue(),
302 # 'Rebase::SkipCurrentPatch': {
303 # 'title': 'Skip Current Patch',
304 # 'action': lambda: cmds.rebase_skip(),
309 # 'action': lambda: cmds.rebase_abort(),