Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0, 1.0.1, and 1.0.2

hglib: cache detected diff tools

It's somewhat expensive to detect all the installed tools, so don't do it
more than once per application instance.

Changeset e479ff36a915

Parent 17ad0cd5f14a

by Steve Borho

Changes to one file · Browse files at e479ff36a915 Showing diff from parent 17ad0cd5f14a Diff from another changeset...

 
226
227
228
 
229
 
 
 
230
231
232
 
255
256
257
 
258
259
260
 
226
227
228
229
230
231
232
233
234
235
236
 
259
260
261
262
263
264
265
@@ -226,7 +226,11 @@
  return values     +_difftools = None  def difftools(ui): + global _difftools + if _difftools: + return _difftools   tools = {}   for cmd, path in ui.configitems('extdiff'):   if cmd.startswith('cmd.'): @@ -255,6 +259,7 @@
  mopts = ui.config('merge-tools', t + '.diff3args', '')   dopts, mopts = shlex.split(dopts), shlex.split(mopts)   tools[t] = [filemerge._findtool(ui, t), dopts, mopts] + _difftools = tools   return tools