Patchwork [6,of,9] histedit: remove makedesc

login
register
mail settings
Submitter Mateusz Kwapich
Date Dec. 2, 2015, 8:22 p.m.
Message ID <b546c0415d7fb6df9d18.1449087778@mitrandir-mbp1.local>
Download mbox | patch
Permalink /patch/11770/
State Accepted
Headers show

Comments

Mateusz Kwapich - Dec. 2, 2015, 8:22 p.m.
# HG changeset patch
# User Mateusz Kwapich <mitrandir@fb.com>
# Date 1449087541 28800
#      Wed Dec 02 12:19:01 2015 -0800
# Node ID b546c0415d7fb6df9d1824f160be90378d51dce8
# Parent  757f3974870e4be3861c4a220fd79385bde59414
histedit: remove makedesc

It's a dead code now.

Patch

diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -1145,23 +1145,6 @@ 
                              hint=_('see "hg help phases" for details'))
     return [c.node() for c in ctxs]
 
-def makedesc(repo, action, rev):
-    """build a initial action line for a ctx
-
-    line are in the form:
-
-      <action> <hash> <rev> <summary>
-    """
-    ctx = repo[rev]
-    summary = ''
-    if ctx.description():
-        summary = ctx.description().splitlines()[0]
-    line = '%s %s %d %s' % (action, ctx, ctx.rev(), summary)
-    # trim to 80 columns so it's not stupidly wide in my editor
-    maxlen = repo.ui.configint('histedit', 'linelen', default=80)
-    maxlen = max(maxlen, 22) # avoid truncating hash
-    return util.ellipsis(line, maxlen)
-
 def ruleeditor(repo, ui, actions, editcomment=""):
     """open an editor to edit rules