Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.0.5, 2.1, and 2.1.1

stable repowidget: stop treating dragged binary files as patches

Dragging a large binary file over any part of the workbench (even when the
workbench is sitting in the background behind other windows) will cause the
repowidget's dragEnterEvent to try to parse the file as a patch. This will
cause the workbench (as well as the file explorer window from which the drag
originated) to hang for several seconds.

Changeset 161fbab6745a

Parent 6d9d2452e11f

by Phil Currier

Changes to one file · Browse files at 161fbab6745a Showing diff from parent 6d9d2452e11f Diff from another changeset...

 
442
443
444
 
 
 
 
445
446
447
 
442
443
444
445
446
447
448
449
450
451
@@ -442,6 +442,10 @@
  continue   try:   pf = open(p, 'rb') + earlybytes = pf.read(4096) + if '\0' in earlybytes: + continue + pf.seek(0)   filename, message, user, date, branch, node, p1, p2 = \   patch.extract(self.repo.ui, pf)   if filename: