Patchwork [1,of,5] histedit: refactor command names

login
register
mail settings
Submitter timeless@mozdev.org
Date Dec. 23, 2015, 9:09 a.m.
Message ID <9d8cbcdddae979a9e9d1.1450861799@waste.org>
Download mbox | patch
Permalink /patch/12286/
State Superseded
Headers show

Comments

timeless@mozdev.org - Dec. 23, 2015, 9:09 a.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1450828622 0
#      Tue Dec 22 23:57:02 2015 +0000
# Node ID 9d8cbcdddae979a9e9d188178d28b42a892cce75
# Parent  fe376159a58d9b3d748b669ac011b0eed0346fea
histedit: refactor command names

Future patches will actually include additional commands into this list

Patch

diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -218,20 +218,22 @@ 
 # leave the attribute unspecified.
 testedwith = 'internal'
 
-# i18n: command names and abbreviations must remain untranslated
 editcomment = _("""# Edit history between %s and %s
 #
 # Commits are listed from least to most recent
 #
 # Commands:
-#  p, pick = use commit
-#  e, edit = use commit, but stop for amending
-#  f, fold = use commit, but combine it with the one above
-#  r, roll = like fold, but discard this commit's description
-#  d, drop = remove commit from history
-#  m, mess = edit commit message without changing commit content
-#
-""")
+%s""") % ("%s", "%s",
+''.join(["#  %s\n" % l for l in (
+"p, pick = %s" % _("use commit"),
+"e, edit = %s" % _("use commit, but stop for amending"),
+"f, fold = %s" % _("use commit, but combine it with the one above"),
+"r, roll = %s" % _("like fold, but discard this commit's description"),
+"d, drop = %s" % _("remove commit from history"),
+"m, mess = %s" % _("edit commit message without changing commit content"),
+"",
+)])
+)
 
 class histeditstate(object):
     def __init__(self, repo, parentctxnode=None, actions=None, keep=None,