Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.0, 2.0.1, and 2.0.2

stable qreorder: use patchctx to read summaries (close #153)

Changeset 806c70ae7d7a

Parent 1e96c965505c

by Steve Borho

Changes to one file · Browse files at 806c70ae7d7a Showing diff from parent 1e96c965505c Diff from another changeset...

 
147
148
149
150
151
152
153
154
155
156
157
158
159
 
 
 
160
161
162
 
181
182
183
184
185
186
187
188
189
190
 
 
191
192
193
 
147
148
149
 
 
 
 
 
 
 
 
 
 
150
151
152
153
154
155
 
174
175
176
 
 
 
 
 
 
 
177
178
179
180
181
@@ -147,16 +147,9 @@
  ulw.clear()   alw.clear()   for p in reversed(patchnames): - # Each row in the patch list has the - # format [patchname] patchdescription - # The patch description is the first line of the patch message - # If the message has more than one line, we add "..." to the first - # line to create the patch description - patchmessage = mq.patchheader(self.repo.mq.join(p)).message - patchdesc = patchmessage[0] - if len(patchmessage) > 1: - patchdesc = patchdesc + '...' - item = QListWidgetItem('[%s]\t%s' % (hglib.tounicode(p), hglib.tounicode(patchdesc))) + ctx = self.repo.changectx(p) + desc = ctx.longsummary() + item = QListWidgetItem('[%s]\t%s' % (hglib.tounicode(p), desc))   # Save the patchname with the item so that we can easily   # retrieve it later   item.patchname = p @@ -181,13 +174,8 @@
  self.alw.setFocus()     def showSummary(self, item): - try: - # Note that item.patchname uses the local encoding and hence does - # not need to be converted from unicode - txt = '\n'.join(mq.patchheader(self.repo.mq.join(item.patchname)).message) - self.summ.setText(hglib.tounicode(txt)) - except: - pass + ctx = self.repo.changectx(item.patchname) + self.summ.setText(hglib.tounicode(ctx.description()))     def accept(self):   self._writesettings()