Clarify keymap entries for local git operations
To further distinguish the local vs remote cherry pick operation, add 'local' to the name in the keymap. Same for checkout (though it has no remote). Change-Id: Idcca8a9dbddfc571eda32634a7dc2a7bfb8a070a
This commit is contained in:
parent
80460e3b4a
commit
45471c9217
@ -39,8 +39,8 @@ TOGGLE_REVIEWED = 'toggle reviewed'
|
||||
TOGGLE_HIDDEN = 'toggle hidden'
|
||||
REVIEW = 'review'
|
||||
DIFF = 'diff'
|
||||
CHECKOUT = 'checkout'
|
||||
CHERRY_PICK = 'cherry pick'
|
||||
LOCAL_CHECKOUT = 'local checkout'
|
||||
LOCAL_CHERRY_PICK = 'local cherry pick'
|
||||
SEARCH_RESULTS = 'search results'
|
||||
NEXT_CHANGE = 'next change'
|
||||
PREV_CHANGE = 'previous change'
|
||||
@ -48,7 +48,7 @@ TOGGLE_HIDDEN_COMMENTS = 'toggle hidden comments'
|
||||
ABANDON_CHANGE = 'abandon change'
|
||||
RESTORE_CHANGE = 'restore change'
|
||||
REBASE_CHANGE = 'rebase change'
|
||||
CHERRY_PICK_CHANGE = 'cherry-pick change'
|
||||
CHERRY_PICK_CHANGE = 'cherry pick change'
|
||||
REFRESH = 'refresh'
|
||||
EDIT_TOPIC = 'edit topic'
|
||||
EDIT_COMMIT_MESSAGE = 'edit commit message'
|
||||
@ -82,8 +82,8 @@ DEFAULT_KEYMAP = {
|
||||
TOGGLE_HIDDEN: 'k',
|
||||
REVIEW: 'r',
|
||||
DIFF: 'd',
|
||||
CHECKOUT: 'c',
|
||||
CHERRY_PICK: 'x',
|
||||
LOCAL_CHECKOUT: 'c',
|
||||
LOCAL_CHERRY_PICK: 'x',
|
||||
SEARCH_RESULTS: 'u',
|
||||
NEXT_CHANGE: 'n',
|
||||
PREV_CHANGE: 'p',
|
||||
|
@ -355,7 +355,7 @@ class ChangeView(urwid.WidgetWrap):
|
||||
def help(self):
|
||||
key = self.app.config.keymap.formatKeys
|
||||
ret = [
|
||||
(key(keymap.CHECKOUT),
|
||||
(key(keymap.LOCAL_CHECKOUT),
|
||||
"Checkout the most recent revision into the local repo"),
|
||||
(key(keymap.DIFF),
|
||||
"Show the diff of the mont recent revision"),
|
||||
@ -373,7 +373,7 @@ class ChangeView(urwid.WidgetWrap):
|
||||
"Back to the list of changes"),
|
||||
(key(keymap.TOGGLE_REVIEWED),
|
||||
"Toggle the reviewed flag for the current change"),
|
||||
(key(keymap.CHERRY_PICK),
|
||||
(key(keymap.LOCAL_CHERRY_PICK),
|
||||
"Cherry-pick the most recent revision onto the local repo"),
|
||||
(key(keymap.ABANDON_CHANGE),
|
||||
"Abandon this change"),
|
||||
@ -724,11 +724,11 @@ class ChangeView(urwid.WidgetWrap):
|
||||
row = self.revision_rows[self.last_revision_key]
|
||||
row.diff(None)
|
||||
return None
|
||||
if keymap.CHECKOUT in commands:
|
||||
if keymap.LOCAL_CHECKOUT in commands:
|
||||
row = self.revision_rows[self.last_revision_key]
|
||||
row.checkout(None)
|
||||
return None
|
||||
if keymap.CHERRY_PICK in commands:
|
||||
if keymap.LOCAL_CHERRY_PICK in commands:
|
||||
row = self.revision_rows[self.last_revision_key]
|
||||
row.cherryPick(None)
|
||||
return None
|
||||
|
Loading…
x
Reference in New Issue
Block a user