Plugins/VcsPlugins/vcsMercurial/hg.py

changeset 495
b31b0bffa5b0
parent 417
459855d3066e
child 537
72b32daeb8d6
equal deleted inserted replaced
492:01f3384d535a 495:b31b0bffa5b0
9 9
10 import os 10 import os
11 import shutil 11 import shutil
12 import urllib.request, urllib.parse, urllib.error 12 import urllib.request, urllib.parse, urllib.error
13 13
14 from PyQt4.QtCore import QProcess, SIGNAL, QFileInfo 14 from PyQt4.QtCore import QProcess, pyqtSignal, QFileInfo
15 from PyQt4.QtGui import QMessageBox, QApplication, QDialog, QInputDialog, QFileDialog 15 from PyQt4.QtGui import QMessageBox, QApplication, QDialog, QInputDialog, QFileDialog
16 16
17 from E5Gui.E5Application import e5App 17 from E5Gui.E5Application import e5App
18 18
19 from QScintilla.MiniEditor import MiniEditor 19 from QScintilla.MiniEditor import MiniEditor
51 """ 51 """
52 Class implementing the version control systems interface to Mercurial. 52 Class implementing the version control systems interface to Mercurial.
53 53
54 @signal committed() emitted after the commit action has completed 54 @signal committed() emitted after the commit action has completed
55 """ 55 """
56 committed = pyqtSignal()
57
56 def __init__(self, plugin, parent = None, name = None): 58 def __init__(self, plugin, parent = None, name = None):
57 """ 59 """
58 Constructor 60 Constructor
59 61
60 @param plugin reference to the plugin object 62 @param plugin reference to the plugin object
315 317
316 if not noDialog and not msg: 318 if not noDialog and not msg:
317 # call CommitDialog and get message from there 319 # call CommitDialog and get message from there
318 if self.__commitDialog is None: 320 if self.__commitDialog is None:
319 self.__commitDialog = HgCommitDialog(self, self.__ui) 321 self.__commitDialog = HgCommitDialog(self, self.__ui)
320 self.connect(self.__commitDialog, SIGNAL("accepted()"), 322 self.__commitDialog.accepted.connect(self.__vcsCommit_Step2)
321 self.__vcsCommit_Step2)
322 self.__commitDialog.show() 323 self.__commitDialog.show()
323 self.__commitDialog.raise_() 324 self.__commitDialog.raise_()
324 self.__commitDialog.activateWindow() 325 self.__commitDialog.activateWindow()
325 326
326 self.__commitData["name"] = name 327 self.__commitData["name"] = name
340 noDialog = self.__commitData["noDialog"] 341 noDialog = self.__commitData["noDialog"]
341 closeBranch = self.__commitData["closeBranch"] 342 closeBranch = self.__commitData["closeBranch"]
342 343
343 if self.__commitDialog is not None: 344 if self.__commitDialog is not None:
344 msg = self.__commitDialog.logMessage() 345 msg = self.__commitDialog.logMessage()
345 self.disconnect(self.__commitDialog, SIGNAL("accepted()"), 346 self.__commitDialog.accepted.disconnect(self.__vcsCommit_Step2)
346 self.__vcsCommit_Step2)
347 self.__commitDialog = None 347 self.__commitDialog = None
348 348
349 if not msg: 349 if not msg:
350 msg = '***' 350 msg = '***'
351 351
381 else: 381 else:
382 dia = HgDialog(self.trUtf8('Commiting changes to Mercurial repository')) 382 dia = HgDialog(self.trUtf8('Commiting changes to Mercurial repository'))
383 res = dia.startProcess(args, dname) 383 res = dia.startProcess(args, dname)
384 if res: 384 if res:
385 dia.exec_() 385 dia.exec_()
386 self.emit(SIGNAL("committed()")) 386 self.committed.emit()
387 if self.__forgotNames: 387 if self.__forgotNames:
388 model = e5App().getObject("Project").getModel() 388 model = e5App().getObject("Project").getModel()
389 for name in self.__forgotNames: 389 for name in self.__forgotNames:
390 model.updateVCSStatus(name) 390 model.updateVCSStatus(name)
391 self.__forgotNames = [] 391 self.__forgotNames = []

eric ide

mercurial