comparison hgext/histedit.py @ 37084:f0b6fbea00cf

stringutil: bulk-replace call sites to point to new module This might conflict with other patches floating around, sorry.
author Yuya Nishihara <yuya@tcha.org>
date Thu, 22 Mar 2018 21:56:20 +0900
parents 17692fefc8f2
children 3d3cff1f6bde
comparison
equal deleted inserted replaced
37083:f99d64e8a4e4 37084:f0b6fbea00cf
207 registrar, 207 registrar,
208 repair, 208 repair,
209 scmutil, 209 scmutil,
210 util, 210 util,
211 ) 211 )
212 from mercurial.utils import (
213 stringutil,
214 )
212 215
213 pickle = util.pickle 216 pickle = util.pickle
214 release = lock.release 217 release = lock.release
215 cmdtable = {} 218 cmdtable = {}
216 command = registrar.command(cmdtable) 219 command = registrar.command(cmdtable)
463 line = '%s %s %d %s' % (self.verb, ctx, ctx.rev(), summary) 466 line = '%s %s %d %s' % (self.verb, ctx, ctx.rev(), summary)
464 # trim to 75 columns by default so it's not stupidly wide in my editor 467 # trim to 75 columns by default so it's not stupidly wide in my editor
465 # (the 5 more are left for verb) 468 # (the 5 more are left for verb)
466 maxlen = self.repo.ui.configint('histedit', 'linelen') 469 maxlen = self.repo.ui.configint('histedit', 'linelen')
467 maxlen = max(maxlen, 22) # avoid truncating hash 470 maxlen = max(maxlen, 22) # avoid truncating hash
468 return util.ellipsis(line, maxlen) 471 return stringutil.ellipsis(line, maxlen)
469 472
470 def tostate(self): 473 def tostate(self):
471 """Print an action in format used by histedit state files 474 """Print an action in format used by histedit state files
472 (the first line is a verb, the remainder is the second) 475 (the first line is a verb, the remainder is the second)
473 """ 476 """