Fixed a crash when converting a project to/from Mercurial largefiles.

Thu, 06 Mar 2014 18:21:33 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 06 Mar 2014 18:21:33 +0100
changeset 3332
7d279abef824
parent 3327
1338767b5315
child 3333
dcd4391e9d43

Fixed a crash when converting a project to/from Mercurial largefiles.

Plugins/VcsPlugins/vcsMercurial/LargefilesExtension/largefiles.py file | annotate | diff | comparison | revisions
--- a/Plugins/VcsPlugins/vcsMercurial/LargefilesExtension/largefiles.py	Tue Mar 04 19:52:06 2014 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/LargefilesExtension/largefiles.py	Thu Mar 06 18:21:33 2014 +0100
@@ -9,6 +9,7 @@
 
 import os
 
+from PyQt4.QtCore import QTimer
 from PyQt4.QtGui import QDialog
 
 from E5Gui.E5Application import e5App
@@ -87,12 +88,14 @@
             
             # step 3: close current project and open new one
             if res:
-                e5App().getObject("Project").openProject(newProjectFile)
                 if direction == 'largefiles':
                     self.vcs.hgEditConfig(newName, largefilesData={
                         "minsize": minSize, "pattern": patterns})
                 else:
                     self.vcs.hgEditConfig(newName, withLargefiles=False)
+                QTimer.singleShot(
+                    0, lambda: e5App().getObject("Project").openProject(
+                        newProjectFile))
     
     def hgAdd(self, names, mode):
         """

eric ide

mercurial