eric7/Plugins/VcsPlugins/vcsMercurial/HgStatusDialog.py

branch
eric7
changeset 8621
8c9f41115c04
parent 8412
16e8c2896469
child 8651
ce4c3c401482
equal deleted inserted replaced
8620:84f7f7867b5f 8621:8c9f41115c04
166 "Reverts the changes of the selected files")) 166 "Reverts the changes of the selected files"))
167 167
168 self.__actionsMenu.addSeparator() 168 self.__actionsMenu.addSeparator()
169 169
170 self.__forgetAct = self.__actionsMenu.addAction( 170 self.__forgetAct = self.__actionsMenu.addAction(
171 self.tr("Forget missing"), self.__forget) 171 self.tr("Forget Missing"), self.__forget)
172 self.__forgetAct.setToolTip(self.tr( 172 self.__forgetAct.setToolTip(self.tr(
173 "Forgets about the selected missing files")) 173 "Forgets about the selected missing files"))
174 self.__restoreAct = self.__actionsMenu.addAction( 174 self.__restoreAct = self.__actionsMenu.addAction(
175 self.tr("Restore missing"), self.__restoreMissing) 175 self.tr("Restore Missing"), self.__restoreMissing)
176 self.__restoreAct.setToolTip(self.tr( 176 self.__restoreAct.setToolTip(self.tr(
177 "Restores the selected missing files")) 177 "Restores the selected missing files"))
178 178
179 self.__actionsMenu.addSeparator() 179 self.__actionsMenu.addSeparator()
180 180
583 project.getModel().updateVCSStatus(name) 583 project.getModel().updateVCSStatus(name)
584 self.vcs.checkVCSStatus() 584 self.vcs.checkVCSStatus()
585 585
586 def __forget(self): 586 def __forget(self):
587 """ 587 """
588 Private slot to handle the Remove context menu entry. 588 Private slot to handle the Forget Missing context menu entry.
589 """ 589 """
590 names = [os.path.join(self.__repoPath, itm.text(self.__pathColumn)) 590 names = [os.path.join(self.__repoPath, itm.text(self.__pathColumn))
591 for itm in self.__getMissingItems()] 591 for itm in self.__getMissingItems()]
592 if not names: 592 if not names:
593 EricMessageBox.information( 593 EricMessageBox.information(
594 self, 594 self,
595 self.tr("Remove"), 595 self.tr("Forget Missing"),
596 self.tr("""There are no missing entries""" 596 self.tr("""There are no missing entries"""
597 """ available/selected.""")) 597 """ available/selected."""))
598 return 598 return
599 599
600 self.vcs.hgForget(names) 600 self.vcs.vcsForget(names)
601 self.on_refreshButton_clicked() 601 self.on_refreshButton_clicked()
602 602
603 def __revert(self): 603 def __revert(self):
604 """ 604 """
605 Private slot to handle the Revert context menu entry. 605 Private slot to handle the Revert context menu entry.
612 self.tr("Revert"), 612 self.tr("Revert"),
613 self.tr("""There are no uncommitted changes""" 613 self.tr("""There are no uncommitted changes"""
614 """ available/selected.""")) 614 """ available/selected."""))
615 return 615 return
616 616
617 self.vcs.hgRevert(names) 617 self.vcs.vcsRevert(names)
618 self.raise_() 618 self.raise_()
619 self.activateWindow() 619 self.activateWindow()
620 self.on_refreshButton_clicked() 620 self.on_refreshButton_clicked()
621 621
622 project = ericApp().getObject("Project") 622 project = ericApp().getObject("Project")
631 names = [os.path.join(self.__repoPath, itm.text(self.__pathColumn)) 631 names = [os.path.join(self.__repoPath, itm.text(self.__pathColumn))
632 for itm in self.__getMissingItems()] 632 for itm in self.__getMissingItems()]
633 if not names: 633 if not names:
634 EricMessageBox.information( 634 EricMessageBox.information(
635 self, 635 self,
636 self.tr("Revert"), 636 self.tr("Revert Missing"),
637 self.tr("""There are no missing entries""" 637 self.tr("""There are no missing entries"""
638 """ available/selected.""")) 638 """ available/selected."""))
639 return 639 return
640 640
641 self.vcs.hgRevert(names) 641 self.vcs.vcsRevert(names)
642 self.on_refreshButton_clicked() 642 self.on_refreshButton_clicked()
643 self.vcs.checkVCSStatus() 643 self.vcs.checkVCSStatus()
644 644
645 def __diff(self): 645 def __diff(self):
646 """ 646 """
662 self.diff.show() 662 self.diff.show()
663 self.diff.start(names, refreshable=True) 663 self.diff.start(names, refreshable=True)
664 664
665 def __sbsDiff(self): 665 def __sbsDiff(self):
666 """ 666 """
667 Private slot to handle the Diff context menu entry. 667 Private slot to handle the Side-By-Side Diff context menu entry.
668 """ 668 """
669 names = [os.path.join(self.__repoPath, itm.text(self.__pathColumn)) 669 names = [os.path.join(self.__repoPath, itm.text(self.__pathColumn))
670 for itm in self.__getModifiedItems()] 670 for itm in self.__getModifiedItems()]
671 if not names: 671 if not names:
672 EricMessageBox.information( 672 EricMessageBox.information(
673 self, 673 self,
674 self.tr("Side-by-Side Diff"), 674 self.tr("Differences Side-By-Side"),
675 self.tr("""There are no uncommitted changes""" 675 self.tr("""There are no uncommitted changes"""
676 """ available/selected.""")) 676 """ available/selected."""))
677 return 677 return
678 elif len(names) > 1: 678 elif len(names) > 1:
679 EricMessageBox.information( 679 EricMessageBox.information(
680 self, 680 self,
681 self.tr("Side-by-Side Diff"), 681 self.tr("Differences Side-By-Side"),
682 self.tr("""Only one file with uncommitted changes""" 682 self.tr("""Only one file with uncommitted changes"""
683 """ must be selected.""")) 683 """ must be selected."""))
684 return 684 return
685 685
686 self.vcs.hgSbsDiff(names[0]) 686 self.vcs.vcsSbsDiff(names[0])
687 687
688 def __getCommitableItems(self): 688 def __getCommitableItems(self):
689 """ 689 """
690 Private method to retrieve all entries the user wants to commit. 690 Private method to retrieve all entries the user wants to commit.
691 691

eric ide

mercurial