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

fileview: connect editSelected from the annotate widget

Changeset eecb02b4af18

Parent 1853af848454

by Steve Borho

Changes to one file · Browse files at eecb02b4af18 Showing diff from parent 1853af848454 Diff from another changeset...

 
31
32
33
 
34
35
36
 
46
47
48
49
50
51
52
53
54
 
429
430
431
 
 
 
 
 
 
 
 
 
432
433
434
 
31
32
33
34
35
36
37
 
47
48
49
 
 
 
50
51
52
 
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
@@ -31,6 +31,7 @@
 from tortoisehg.util import hglib, patchctx  from tortoisehg.hgqt.i18n import _  from tortoisehg.hgqt import annotate, qscilib, qtlib, blockmatcher, lexers +from tortoisehg.hgqt import visdiff, wctxactions    qsci = Qsci.QsciScintilla   @@ -46,9 +47,6 @@
  searchRequested = pyqtSignal(unicode)   """Emitted (pattern) when user request to search content"""   - editSelected = pyqtSignal(unicode, object, int) - """Emitted (path, rev, line) when user requests to open editor""" -   grepRequested = pyqtSignal(unicode, dict)   """Emitted (pattern, opts) when user request to search changelog"""   @@ -429,6 +427,15 @@
  def sourceChanged(self, path, rev, line=None):   self.revForDiffChanged.emit(rev)   + @pyqtSlot(unicode, object, int) + def editSelected(self, path, rev, line): + """Open editor to show the specified file""" + repo = self._ctx._repo + path = hglib.fromunicode(path) + base = visdiff.snapshot(repo, [path], repo[rev])[0] + files = [os.path.join(base, path)] + wctxactions.edit(self, repo.ui, repo, files, line, self._find_text) +   def searchString(self, text):   self._find_text = text   self.clearHighlights()