Plugins/VcsPlugins/vcsMercurial/HgStatusDialog.py

changeset 536
6d8d39753c82
parent 495
b31b0bffa5b0
child 537
72b32daeb8d6
equal deleted inserted replaced
535:4b00d7336e19 536:6d8d39753c82
12 from PyQt4.QtCore import pyqtSlot, Qt, QProcess, QTimer 12 from PyQt4.QtCore import pyqtSlot, Qt, QProcess, QTimer
13 from PyQt4.QtGui import QWidget, QDialogButtonBox, QMenu, QHeaderView, QTreeWidgetItem, \ 13 from PyQt4.QtGui import QWidget, QDialogButtonBox, QMenu, QHeaderView, QTreeWidgetItem, \
14 QMessageBox, QLineEdit 14 QMessageBox, QLineEdit
15 15
16 from E5Gui.E5Application import e5App 16 from E5Gui.E5Application import e5App
17 from E5Gui import E5MessageBox
17 18
18 from .Ui_HgStatusDialog import Ui_HgStatusDialog 19 from .Ui_HgStatusDialog import Ui_HgStatusDialog
19 20
20 import Preferences 21 import Preferences
21 22
365 Private slot to handle the Commit context menu entry. 366 Private slot to handle the Commit context menu entry.
366 """ 367 """
367 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \ 368 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
368 for itm in self.__getModifiedItems()] 369 for itm in self.__getModifiedItems()]
369 if not names: 370 if not names:
370 QMessageBox.information(self, 371 E5MessageBox.information(self,
371 self.trUtf8("Commit"), 372 self.trUtf8("Commit"),
372 self.trUtf8("""There are no uncommitted changes available/selected.""")) 373 self.trUtf8("""There are no uncommitted changes available/selected."""))
373 return 374 return
374 375
375 if Preferences.getVCS("AutoSaveFiles"): 376 if Preferences.getVCS("AutoSaveFiles"):
391 Private slot to handle the Add context menu entry. 392 Private slot to handle the Add context menu entry.
392 """ 393 """
393 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \ 394 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
394 for itm in self.__getUnversionedItems()] 395 for itm in self.__getUnversionedItems()]
395 if not names: 396 if not names:
396 QMessageBox.information(self, 397 E5MessageBox.information(self,
397 self.trUtf8("Add"), 398 self.trUtf8("Add"),
398 self.trUtf8("""There are no unversioned entries available/selected.""")) 399 self.trUtf8("""There are no unversioned entries available/selected."""))
399 return 400 return
400 401
401 self.vcs.vcsAdd(names) 402 self.vcs.vcsAdd(names)
411 Private slot to handle the Remove context menu entry. 412 Private slot to handle the Remove context menu entry.
412 """ 413 """
413 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \ 414 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
414 for itm in self.__getMissingItems()] 415 for itm in self.__getMissingItems()]
415 if not names: 416 if not names:
416 QMessageBox.information(self, 417 E5MessageBox.information(self,
417 self.trUtf8("Remove"), 418 self.trUtf8("Remove"),
418 self.trUtf8("""There are no missing entries available/selected.""")) 419 self.trUtf8("""There are no missing entries available/selected."""))
419 return 420 return
420 421
421 self.vcs.hgForget(names) 422 self.vcs.hgForget(names)
426 Private slot to handle the Revert context menu entry. 427 Private slot to handle the Revert context menu entry.
427 """ 428 """
428 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \ 429 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
429 for itm in self.__getModifiedItems()] 430 for itm in self.__getModifiedItems()]
430 if not names: 431 if not names:
431 QMessageBox.information(self, 432 E5MessageBox.information(self,
432 self.trUtf8("Revert"), 433 self.trUtf8("Revert"),
433 self.trUtf8("""There are no uncommitted changes available/selected.""")) 434 self.trUtf8("""There are no uncommitted changes available/selected."""))
434 return 435 return
435 436
436 self.vcs.vcsRevert(names) 437 self.vcs.vcsRevert(names)

eric ide

mercurial