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

visdiff: improve responsiveness of visual diff window

open window immediately, then create snapshots in background

Changeset 3ee74d16161b

Parent 274e1ae1598a

by Steve Borho

Changes to one file · Browse files at 3ee74d16161b Showing diff from parent 274e1ae1598a Diff from another changeset...

 
358
359
360
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
361
362
363
364
365
366
 
377
378
379
380
381
382
383
384
 
388
389
390
391
392
393
394
 
402
403
404
405
406
407
408
 
413
414
415
416
417
418
419
420
421
422
423
 
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
 
378
379
380
 
391
392
393
 
 
394
395
396
 
400
401
402
 
403
404
405
 
413
414
415
 
416
417
418
 
423
424
425
 
426
427
428
 
429
430
431
@@ -358,9 +358,23 @@
  fcol.add_attribute(cell, 'text', 1)   treeview.append_column(fcol)   + if ctx1b: + ctxa = ctx1a.ancestor(ctx1b) + else: + ctxa = ctx1a + + self.ctxs = (ctx1a, ctx1b, ctxa, ctx2) + self.copies = cpy + + model = gtk.ListStore(str, str) + treeview.set_model(model) + + gobject.idle_add(self.fillmodel, repo, model, sa, sb) + + def fillmodel(self, repo, model, sa, sb): + ctx1a, ctx1b, ctxa, ctx2 = self.ctxs   mod_a, add_a, rem_a = sa   mod_b, add_b, rem_b = sb - self.copies = cpy   sources = set(self.copies.values())     MA = mod_a | add_a | mod_b | add_b @@ -377,8 +391,6 @@
  files = sources | mod_b | rem_b | ((mod_a | add_a) - add_b)   dir1b = snapshot(repo, files, ctx1b, tmproot)[0]   rev1b = '@%d' % ctx1b.rev() - - ctxa = ctx1a.ancestor(ctx1b)   if ctxa == ctx1a:   dira = dir1a   elif ctxa == ctx1b: @@ -388,7 +400,6 @@
  dira = snapshot(repo, MAR, ctxa, tmproot)[0]   reva = '@%d' % ctxa.rev()   else: - ctxa = ctx1a   dir1b, dira = None, None   rev1b, reva = '', ''   @@ -402,7 +413,6 @@
    self.dirs = (dir1a, dir1b, dira, dir2)   self.revs = (rev1a, rev1b, reva, rev2) - self.ctxs = (ctx1a, ctx1b, ctxa, ctx2)     def get_status(file, mod, add, rem):   if file in mod: @@ -413,11 +423,9 @@
  return 'R'   return ' '   - model = gtk.ListStore(str, str)   for f in mod_a | add_a | rem_a:   model.append([get_status(f, mod_a, add_a, rem_a), hglib.toutf(f)])   - treeview.set_model(model)   self.connect('response', self.response)     def search_filelist(self, model, column, key, iter):