Plugins/VcsPlugins/vcsMercurial/LargefilesExtension/largefiles.py

changeset 3332
7d279abef824
parent 3315
bd1a25ead18d
child 3359
6b6c224d67d6
equal deleted inserted replaced
3327:1338767b5315 3332:7d279abef824
7 Module implementing the largefiles extension interface. 7 Module implementing the largefiles extension interface.
8 """ 8 """
9 9
10 import os 10 import os
11 11
12 from PyQt4.QtCore import QTimer
12 from PyQt4.QtGui import QDialog 13 from PyQt4.QtGui import QDialog
13 14
14 from E5Gui.E5Application import e5App 15 from E5Gui.E5Application import e5App
15 16
16 from ..HgExtension import HgExtension 17 from ..HgExtension import HgExtension
85 dia.exec_() 86 dia.exec_()
86 res = dia.normalExit() and os.path.isfile(newProjectFile) 87 res = dia.normalExit() and os.path.isfile(newProjectFile)
87 88
88 # step 3: close current project and open new one 89 # step 3: close current project and open new one
89 if res: 90 if res:
90 e5App().getObject("Project").openProject(newProjectFile)
91 if direction == 'largefiles': 91 if direction == 'largefiles':
92 self.vcs.hgEditConfig(newName, largefilesData={ 92 self.vcs.hgEditConfig(newName, largefilesData={
93 "minsize": minSize, "pattern": patterns}) 93 "minsize": minSize, "pattern": patterns})
94 else: 94 else:
95 self.vcs.hgEditConfig(newName, withLargefiles=False) 95 self.vcs.hgEditConfig(newName, withLargefiles=False)
96 QTimer.singleShot(
97 0, lambda: e5App().getObject("Project").openProject(
98 newProjectFile))
96 99
97 def hgAdd(self, names, mode): 100 def hgAdd(self, names, mode):
98 """ 101 """
99 Public method used to add a file to the Mercurial repository. 102 Public method used to add a file to the Mercurial repository.
100 103

eric ide

mercurial