Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.7, 0.7.1, and 0.7.2

history: add tortoisehg.longsummary option

Concatenate summary lines until they reach 80 chars. For
users with strict commit message rules, this can be quite
useful.

Changeset 3153d31959a9

Parent b254149d601e

by Steve Borho

Changes to 2 files · Browse files at 3153d31959a9 Showing diff from parent b254149d601e Diff from another changeset...

 
114
115
116
 
 
 
117
118
119
 
114
115
116
117
118
119
120
121
122
@@ -114,6 +114,9 @@
  'Color changesets by author name. If not enabled,'   ' the changes are colored green for merge, red for'   ' non-trivial parents, black for normal. Default: False'), + ('Long Summary', 'tortoisehg.longsummary', ['False', 'True'], + 'Concatenate multiple lines of changeset summary' + ' until they reach 80 characters. Default: False'),   ('Log Batch Size', 'tortoisehg.graphlimit', ['500'],   'The number of revisions to read and display in the'   ' changelog viewer in a single batch. Default: 500'),
 
101
102
103
104
 
 
 
 
 
 
 
 
105
106
107
 
101
102
103
 
104
105
106
107
108
109
110
111
112
113
114
@@ -101,7 +101,14 @@
  ctx = self.repo.changectx(revid)     summary = ctx.description().replace('\0', '') - summary = summary.split('\n')[0] + if self.repo.ui.configbool('tortoisehg', 'longsummary'): + lines = summary.split('\n') + summary = lines.pop(0) + while len(summary) < 80 and lines: + summary += ' ' + lines.pop(0) + summary = summary[0:80] + else: + summary = summary.split('\n')[0]   summary = gobject.markup_escape_text(toutf(summary))   node = self.repo.lookup(revid)   tags = self.repo.nodetags(node)