From 45471c9217f276c3c9fce678a4a9899fa169c8ee Mon Sep 17 00:00:00 2001 From: "James E. Blair" <jeblair@hp.com> Date: Sun, 31 Aug 2014 16:41:28 -0700 Subject: [PATCH] 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 --- gertty/keymap.py | 10 +++++----- gertty/view/change.py | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gertty/keymap.py b/gertty/keymap.py index d163ee5..8a6dfd0 100644 --- a/gertty/keymap.py +++ b/gertty/keymap.py @@ -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', diff --git a/gertty/view/change.py b/gertty/view/change.py index 504666c..8b6b8d9 100644 --- a/gertty/view/change.py +++ b/gertty/view/change.py @@ -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