1 from __future__
import absolute_import
, division
, print_function
, unicode_literals
5 from ..widgets
import archive
6 from ..widgets
import browse
7 from ..widgets
import compare
8 from ..widgets
import createbranch
9 from ..widgets
import createtag
10 from ..widgets
import dag
11 from ..widgets
import editremotes
12 from ..widgets
import finder
13 from ..widgets
import grep
14 from ..widgets
import merge
15 from ..widgets
import patch
16 from ..widgets
import recent
17 from ..widgets
import remote
18 from ..widgets
import search
19 from ..widgets
import stash
22 'Others::LaunchEditor': {
23 'title': 'Launch Editor',
24 'action': cmds
.run(cmds
.LaunchEditor
),
27 'Others::RevertUnstagedEdits': {
28 'title': 'Revert Unstaged Edits...',
29 'action': cmds
.run(cmds
.RevertUnstagedEdits
),
33 'title': 'New Repository...',
34 'action': guicmds
.open_new_repo
,
39 'action': guicmds
.open_repo
,
42 'File::OpenRepoNewWindow': {
43 'title': 'Open in New Window...',
44 'action': guicmds
.open_repo_in_new_window
,
47 # 'File::CloneRepo': {
48 # 'title': 'Clone...',
49 # 'action': guicmds.spawn_clone,
53 'title': 'Refresh...',
54 'action': cmds
.run(cmds
.Refresh
),
58 'title': 'Find Files',
59 'action': finder
.finder
,
62 'File::EditRemotes': {
63 'title': 'Edit Remotes...',
64 'action': editremotes
.editor
,
67 'File::RecentModified': {
68 'title': 'Recently Modified Files...',
69 'action': recent
.browse_recent_files
,
72 'File::ApplyPatches': {
73 'title': 'Apply Patches...',
74 'action': patch
.apply_patches
,
77 'File::ExportPatches': {
78 'title': 'Export Patches...',
79 'action': guicmds
.export_patches
,
82 'File::SaveAsTarZip': {
83 'title': 'Save As Tarball/Zip...',
84 'action': archive
.save_archive
,
87 # 'File::Preferences': {
88 # 'title': 'Preferences',
89 # 'action': prefs.preferences,
92 'Actions::Fetch': {'title': 'Fetch...', 'action': remote
.fetch
, 'icon': 'download'},
93 'Actions::Pull': {'title': 'Pull...', 'action': remote
.pull
, 'icon': 'pull'},
94 'Actions::Push': {'title': 'Push...', 'action': remote
.push
, 'icon': 'push'},
95 'Actions::Stash': {'title': 'Stash...', 'action': stash
.view
, 'icon': 'commit'},
96 'Actions::CreateTag': {
97 'title': 'Create Tag...',
98 'action': createtag
.create_tag
,
101 'Actions::CherryPick': {
102 'title': 'Cherry-Pick...',
103 'action': guicmds
.cherry_pick
,
104 'icon': 'cherry_pick',
108 'action': merge
.local_merge
,
111 'Actions::AbortMerge': {
112 'title': 'Abort Merge...',
113 'action': cmds
.run(cmds
.AbortMerge
),
116 'Actions::UpdateSubmodules': {
117 'title': 'Update All Submodules...',
118 'action': cmds
.run(cmds
.SubmodulesUpdate
),
121 'Actions::ResetSoft': {
122 'title': 'Reset Branch (Soft)',
123 'action': guicmds
.reset_soft
,
124 'icon': 'style_dialog_reset',
125 'tooltip': cmds
.ResetSoft
.tooltip('<commit>'),
127 'Actions::ResetMixed': {
128 'title': 'Reset Branch and Stage (Mixed)',
129 'action': guicmds
.reset_mixed
,
130 'icon': 'style_dialog_reset',
131 'tooltip': cmds
.ResetMixed
.tooltip('<commit>'),
133 'Actions::RestoreWorktree': {
134 'title': 'Restore Worktree',
135 'action': guicmds
.restore_worktree
,
137 'tooltip': cmds
.RestoreWorktree
.tooltip('<commit>'),
139 'Actions::ResetKeep': {
140 'title': 'Restore Worktree and Reset All (Keep Unstaged Changes)',
141 'action': guicmds
.reset_keep
,
142 'icon': 'style_dialog_reset',
143 'tooltip': cmds
.ResetKeep
.tooltip('<commit>'),
145 'Actions::ResetHard': {
146 'title': 'Restore Worktre and Reset All (Hard)',
147 'action': guicmds
.reset_hard
,
148 'icon': 'style_dialog_reset',
149 'tooltip': cmds
.ResetHard
.tooltip('<commit>'),
157 'title': 'Search...',
158 'action': search
.search
,
163 'action': cmds
.run(cmds
.StageOrUnstage
),
166 'Commit::AmendLast': {
167 'title': 'Amend Last Commit',
168 'action': cmds
.run(cmds
.AmendMode
),
171 'Commit::UndoLastCommit': {
172 'title': 'Undo Last Commit',
173 'action': cmds
.run(cmds
.UndoLastCommit
),
174 'icon': 'style_dialog_discard',
176 'Commit::StageAll': {
177 'title': 'Stage All Untracked',
178 'action': cmds
.run(cmds
.StageUntracked
),
181 'Commit::UnstageAll': {
182 'title': 'Unstage All',
183 'action': cmds
.run(cmds
.UnstageAll
),
188 'action': cmds
.run(cmds
.UnstageSelected
),
191 'Commit::LoadCommitMessage': {
192 'title': 'Load Commit Message...',
193 'action': guicmds
.load_commitmsg
,
196 'Commit::GetCommitMessageTemplate': {
197 'title': 'Get Commit Message Template',
198 'action': cmds
.run(cmds
.LoadCommitMessageFromTemplate
),
199 'icon': 'style_dialog_apply',
202 'title': 'Launch Diff tool',
203 'action': cmds
.run(cmds
.LaunchDifftool
),
206 'Diff::Expression': {
207 'title': 'Expression...',
208 'action': guicmds
.diff_expression
,
212 'title': 'Branches...',
213 'action': compare
.compare_branches
,
218 'action': cmds
.run(cmds
.Diffstat
),
222 'title': 'Review...',
223 'action': guicmds
.review_branch
,
227 'title': 'Create...',
228 'action': createbranch
.create_new_branch
,
231 'Branch::Checkout': {
232 'title': 'Checkout...',
233 'action': guicmds
.checkout_branch
,
237 'title': 'Delete...',
238 'action': guicmds
.delete_branch
,
241 'Branch::DeleteRemote': {
242 'title': 'Delete Remote Branch...',
243 'action': guicmds
.delete_remote_branch
,
247 'title': 'Rename Branch...',
248 'action': guicmds
.rename_branch
,
251 'Branch::BrowseCurrent': {
252 'title': 'Browse Current Branch...',
253 'action': guicmds
.browse_current
,
256 'Branch::BrowseOther': {
257 'title': 'Browse Other Branch...',
258 'action': guicmds
.browse_other
,
261 'Branch::VisualizeCurrent': {
262 'title': 'Visualize Current Branch...',
263 'action': cmds
.run(cmds
.VisualizeCurrent
),
266 'Branch::VisualizeAll': {
267 'title': 'Visualize All Branches...',
268 'action': cmds
.run(cmds
.VisualizeAll
),
271 'View::FileBrowser': {
272 'title': 'File Browser...',
273 'action': browse
.worktree_browser
,
276 'View::DAG': {'title': 'DAG...', 'action': dag
.git_dag
, 'icon': 'cola'},
278 # 'Rebase::StartInteractive': {
279 # 'title': 'Start Interactive Rebase...',
280 # 'action': lambda: app().activeWindow().rebase_start(),
284 # 'title': 'Edit...',
285 # 'action': lambda: cmds.rebase_edit_todo(),
288 # 'Rebase::Continue': {
289 # 'title': 'Continue',
290 # 'action': lambda: cmds.rebase_continue(),
293 # 'Rebase::SkipCurrentPatch': {
294 # 'title': 'Skip Current Patch',
295 # 'action': lambda: cmds.rebase_skip(),
300 # 'action': lambda: cmds.rebase_abort(),