Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

repoview: fix gotoAncestor(), which is triggered by mouse middle-click

* fix indent level
* add missing revFromindex()

Changeset 819b4464200b

Parent 606ae7c22280

by Yuya Nishihara

Changes to one file · Browse files at 819b4464200b Showing diff from parent 606ae7c22280 Diff from another changeset...

 
219
220
221
222
223
224
225
226
227
228
229
230
 
 
 
 
 
 
 
 
 
 
231
232
233
 
219
220
221
 
 
 
 
 
 
 
 
 
222
223
224
225
226
227
228
229
230
231
232
233
234
@@ -219,15 +219,16 @@
  self.updateActions()     def gotoAncestor(self, index): - if rev is None or self.current_rev is None: - return - ctx = self.context(self.current_rev) - ctx2 = self.context(rev) - if ctx.thgmqunappliedpatch() or ctx2.thgmqunappliedpatch(): - return - ancestor = ctx.ancestor(ctx2) - self.showMessage.emit(_("Goto ancestor of %s and %s")%(ctx.rev(), ctx2.rev())) - self.goto(ancestor.rev()) + rev = self.revFromindex(index) + if rev is None or self.current_rev is None: + return + ctx = self.context(self.current_rev) + ctx2 = self.context(rev) + if ctx.thgmqunappliedpatch() or ctx2.thgmqunappliedpatch(): + return + ancestor = ctx.ancestor(ctx2) + self.showMessage.emit(_("Goto ancestor of %s and %s")%(ctx.rev(), ctx2.rev())) + self.goto(ancestor.rev())     def updateActions(self):   if len(self._rev_history) > 0: