src/eric7/Plugins/VcsPlugins/vcsGit/GitStatusDialog.py

branch
eric7
changeset 9573
9960d19d66b5
parent 9482
a2bc06a54d9d
child 9576
be9f8e7e42e0
equal deleted inserted replaced
9572:3b46c662a004 9573:9960d19d66b5
674 ] 674 ]
675 if not names: 675 if not names:
676 EricMessageBox.information( 676 EricMessageBox.information(
677 self, 677 self,
678 self.tr("Commit"), 678 self.tr("Commit"),
679 self.tr("""There are no entries selected to be""" """ committed."""), 679 self.tr("""There are no entries selected to be committed."""),
680 ) 680 )
681 return 681 return
682 682
683 if Preferences.getVCS("AutoSaveFiles"): 683 if Preferences.getVCS("AutoSaveFiles"):
684 vm = ericApp().getObject("ViewManager") 684 vm = ericApp().getObject("ViewManager")
718 if not names: 718 if not names:
719 EricMessageBox.information( 719 EricMessageBox.information(
720 self, 720 self,
721 self.tr("Add"), 721 self.tr("Add"),
722 self.tr( 722 self.tr(
723 """There are no unversioned entries""" """ available/selected.""" 723 """There are no unversioned entries available/selected."""
724 ), 724 ),
725 ) 725 )
726 return 726 return
727 727
728 self.vcs.vcsAdd(names) 728 self.vcs.vcsAdd(names)
744 if not names: 744 if not names:
745 EricMessageBox.information( 745 EricMessageBox.information(
746 self, 746 self,
747 self.tr("Stage"), 747 self.tr("Stage"),
748 self.tr( 748 self.tr(
749 """There are no stageable entries""" """ available/selected.""" 749 """There are no stageable entries available/selected."""
750 ), 750 ),
751 ) 751 )
752 return 752 return
753 753
754 self.vcs.vcsAdd(names) 754 self.vcs.vcsAdd(names)
770 if not names: 770 if not names:
771 EricMessageBox.information( 771 EricMessageBox.information(
772 self, 772 self,
773 self.tr("Unstage"), 773 self.tr("Unstage"),
774 self.tr( 774 self.tr(
775 """There are no unstageable entries""" """ available/selected.""" 775 """There are no unstageable entries available/selected."""
776 ), 776 ),
777 ) 777 )
778 return 778 return
779 779
780 self.vcs.gitUnstage(names) 780 self.vcs.gitUnstage(names)
795 ] 795 ]
796 if not names: 796 if not names:
797 EricMessageBox.information( 797 EricMessageBox.information(
798 self, 798 self,
799 self.tr("Forget Missing"), 799 self.tr("Forget Missing"),
800 self.tr("""There are no missing entries""" """ available/selected."""), 800 self.tr("""There are no missing entries available/selected."""),
801 ) 801 )
802 return 802 return
803 803
804 self.vcs.vcsRemove(names, stageOnly=True) 804 self.vcs.vcsRemove(names, stageOnly=True)
805 self.on_refreshButton_clicked() 805 self.on_refreshButton_clicked()
843 ] 843 ]
844 if not names: 844 if not names:
845 EricMessageBox.information( 845 EricMessageBox.information(
846 self, 846 self,
847 self.tr("Restore Missing"), 847 self.tr("Restore Missing"),
848 self.tr("""There are no missing entries""" """ available/selected."""), 848 self.tr("""There are no missing entries available/selected."""),
849 ) 849 )
850 return 850 return
851 851
852 self.vcs.vcsRevert(names) 852 self.vcs.vcsRevert(names)
853 self.on_refreshButton_clicked() 853 self.on_refreshButton_clicked()
879 if not namesW and not namesS: 879 if not namesW and not namesS:
880 EricMessageBox.information( 880 EricMessageBox.information(
881 self, 881 self,
882 self.tr("Differences"), 882 self.tr("Differences"),
883 self.tr( 883 self.tr(
884 """There are no uncommitted changes""" """ available/selected.""" 884 """There are no uncommitted changes available/selected."""
885 ), 885 ),
886 ) 886 )
887 return 887 return
888 888
889 diffMode = "work2stage2repo" 889 diffMode = "work2stage2repo"
1253 else self.tr("Revert hunk") 1253 else self.tr("Revert hunk")
1254 ) 1254 )
1255 res = EricMessageBox.yesNo( 1255 res = EricMessageBox.yesNo(
1256 self, 1256 self,
1257 title, 1257 title,
1258 self.tr("""Are you sure you want to revert the selected""" """ changes?"""), 1258 self.tr("""Are you sure you want to revert the selected changes?"""),
1259 ) 1259 )
1260 if res: 1260 if res:
1261 if cursor.hasSelection(): 1261 if cursor.hasSelection():
1262 patch = self.lDiffParser.createLinesPatch( 1262 patch = self.lDiffParser.createLinesPatch(
1263 startIndex, endIndex, reverse=True 1263 startIndex, endIndex, reverse=True

eric ide

mercurial