hgext/histedit.py
changeset 27206 7a523b6d5265
parent 27205 787d8cc3f04e
child 27207 2d8dbeb2462c
equal deleted inserted replaced
27205:787d8cc3f04e 27206:7a523b6d5265
   373         # trim to 75 columns by default so it's not stupidly wide in my editor
   373         # trim to 75 columns by default so it's not stupidly wide in my editor
   374         # (the 5 more are left for verb)
   374         # (the 5 more are left for verb)
   375         maxlen = self.repo.ui.configint('histedit', 'linelen', default=80)
   375         maxlen = self.repo.ui.configint('histedit', 'linelen', default=80)
   376         maxlen = max(maxlen, 22) # avoid truncating hash
   376         maxlen = max(maxlen, 22) # avoid truncating hash
   377         return util.ellipsis(line, maxlen)
   377         return util.ellipsis(line, maxlen)
       
   378 
       
   379     def tostate(self):
       
   380         """Print an action in format used by histedit state files
       
   381            (the first line is a verb, the remainder is the second)
       
   382         """
       
   383         return "%s\n%s" % (self.verb, node.hex(self.node))
   378 
   384 
   379     def constraints(self):
   385     def constraints(self):
   380         """Return a set of constrains that this action should be verified for
   386         """Return a set of constrains that this action should be verified for
   381         """
   387         """
   382         return set([_constraints.noduplicates, _constraints.noother])
   388         return set([_constraints.noduplicates, _constraints.noother])