Commits

Steve Borho committed b991864

editfiles: introduce a detecteditor function

Comments (0)

Files changed (1)

tortoisehg/hgqt/qtlib.py

         qurl = QUrl.fromLocalFile(path)
     return QDesktopServices.openUrl(qurl)
 
+def detecteditor(ui):
+    return ui.config('tortoisehg', 'editor')
+
 def openfiles(repo, files, parent=None):
     for filename in files:
         openlocalurl(repo.wjoin(filename))
     else:
         cwd = repo.root
     files = [util.shellquote(util.localpath(f)) for f in files]
-    editor = repo.ui.config('tortoisehg', 'editor')
+    editor = detecteditor(repo.ui)
     assert len(files) == 1 or lineno == None
     if editor:
         try: